Skip to content

Conversation

@Ammaar-Alam
Copy link
Member

changing caret cursor behavior and overall making cursor smoother to make typing feel better

changing caret cursor behavior and overall making cursor smoother to make typing feel better
Copilot AI review requested due to automatic review settings October 26, 2025 21:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a smoother cursor experience for typing by introducing a "caret" cursor mode with glide animations. The changes enable the cursor to smoothly transition between characters instead of jumping abruptly, and disable blinking during active typing to reduce visual distraction.

Key Changes:

  • Added caret cursor mode with smooth glide animations and typing-aware blink behavior
  • Implemented overlay-based cursor positioning system for precise control
  • Enhanced cursor mode synchronization across components with dynamic state management

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
public/js/cursor.js Introduced overlay cursor system, typing state tracking, and cursor mode synchronization logic
public/css/styles.css Added CSS custom properties and styles for cursor overlay animations
client/src/components/Typing.jsx Integrated cursor style state management and typing activity detection
client/src/components/Typing.css Added caret-specific styles and animation controls for different cursor modes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

/**
* Track whether the user is actively typing to control blink behaviour
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'behaviour' to 'behavior'.

Suggested change
* Track whether the user is actively typing to control blink behaviour
* Track whether the user is actively typing to control blink behavior

Copilot uses AI. Check for mistakes.

// Cursor-specific duration (caret snappier)
overlay.style.setProperty('--cursor-glide-duration', useCaret ? '95ms' : '95ms');
overlay.style.setProperty('--cursor-glide-duration', useCaret ? '85ms' : '110ms');
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic numbers '85ms' and '110ms' should be extracted as named constants or CSS custom properties to improve maintainability and ensure consistency with values defined elsewhere (e.g., line 16 in styles.css defines '--cursor-glide-duration: 95ms').

Copilot uses AI. Check for mistakes.
@Ammaar-Alam Ammaar-Alam merged commit f784344 into master Oct 26, 2025
@Ammaar-Alam Ammaar-Alam deleted the feature/polish branch October 26, 2025 21:53
Ammaar-Alam added a commit that referenced this pull request Nov 7, 2025
complete migratino of backend database, directory structure, basic things like git ignore, components, and placeholder frontend for db testing
Ammaar-Alam added a commit that referenced this pull request Dec 5, 2025
making changes to cursor glide over text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants