Skip to content

WIP: BREAKING CHANGE - Add interactive circular progress ring with dr…#1

Draft
mxsrdesu wants to merge 3 commits intover-1.0from
progress-circle-update
Draft

WIP: BREAKING CHANGE - Add interactive circular progress ring with dr…#1
mxsrdesu wants to merge 3 commits intover-1.0from
progress-circle-update

Conversation

@mxsrdesu
Copy link
Member

@mxsrdesu mxsrdesu commented Sep 6, 2025

…ag functionality

  • Implemented complete ProgressRing component system with:

    • CircularInput: Main interactive component with click and drag handling
    • CircularTrack: Background circle
    • CircularProgress: Progress arc showing current position
    • CircularThumb: Draggable handle for seeking
    • useCircularDrag: Custom hook for mouse/touch drag events
    • Context system for sharing state between components
  • Features:

    • Click anywhere in ring to play/pause video
    • Drag thumb to seek through video
    • Touch support for mobile devices
    • Keyboard accessibility (arrow keys, space, page up/down)
    • Accurate positioning for both fixed and percentage-based sizes
    • Real-time progress updates as video plays
  • Refactored VideoPlayer into modular architecture:

    • Split logic into separate hooks, utils, and components
    • Created reusable Video, Thumbnail, PlayButton components
    • Added proper TypeScript types and interfaces
    • Implemented UI library conventions with proper folder structure
  • Fixed issues:

    • Drag only triggers on thumb, not anywhere in ring
    • Accurate positioning for percentage-based sizes using ResizeObserver
    • Proper event handling to allow play/pause while maintaining drag functionality
    • HMR compatibility by removing defaultProps exports
  • Visual improvements:

    • Bright red progress ring for visibility
    • White thumb with red stroke for better contrast
    • Larger thumb (radius 8) for easier grabbing
    • Smooth animations and proper z-indexing

BREAKING CHANGE: VideoPlayer component structure has been completely refactored. Existing implementations may need updates to import paths and prop handling.

…ag functionality

- Implemented complete ProgressRing component system with:
  - CircularInput: Main interactive component with click and drag handling
  - CircularTrack: Background circle
  - CircularProgress: Progress arc showing current position
  - CircularThumb: Draggable handle for seeking
  - useCircularDrag: Custom hook for mouse/touch drag events
  - Context system for sharing state between components

- Features:
  - Click anywhere in ring to play/pause video
  - Drag thumb to seek through video
  - Touch support for mobile devices
  - Keyboard accessibility (arrow keys, space, page up/down)
  - Accurate positioning for both fixed and percentage-based sizes
  - Real-time progress updates as video plays

- Refactored VideoPlayer into modular architecture:
  - Split logic into separate hooks, utils, and components
  - Created reusable Video, Thumbnail, PlayButton components
  - Added proper TypeScript types and interfaces
  - Implemented UI library conventions with proper folder structure

- Fixed issues:
  - Drag only triggers on thumb, not anywhere in ring
  - Accurate positioning for percentage-based sizes using ResizeObserver
  - Proper event handling to allow play/pause while maintaining drag functionality
  - HMR compatibility by removing defaultProps exports

- Visual improvements:
  - Bright red progress ring for visibility
  - White thumb with red stroke for better contrast
  - Larger thumb (radius 8) for easier grabbing
  - Smooth animations and proper z-indexing

BREAKING CHANGE: VideoPlayer component structure has been completely refactored.
Existing implementations may need updates to import paths and prop handling.
- Add new modular progress ring architecture with CircularInput, CircularTrack, CircularProgress, and CircularThumb components
- Implement configurable ring positioning (inside/outside video player) with adjustable offsets
- Add customizable track styling with stroke width, color, fill, and line cap options
- Enhance interactivity with click-to-seek functionality and configurable click tolerance
- Implement full accessibility support with keyboard navigation, ARIA labels, and focus management
- Add responsive sizing support for both pixel and percentage-based dimensions
- Integrate progress ring with VideoPlayer component for seamless video seeking
- Update useVideoPlayerState hook to track hasStarted state for ring interaction logic
- Expand DevShowcase with comprehensive examples demonstrating all new progress ring features
- Clean up old reference files and consolidate component structure
- Improve type definitions with detailed ProgressRingProps interface
- Add CircularInputContext for managing shared state across circular components
- Implement utility functions for polar coordinate calculations and geometry handling

BREAKING CHANGES:
- Progress ring API has been redesigned with new prop structure
- Removed old circular progress implementation in favor of new modular system
@mxsrdesu mxsrdesu changed the base branch from main to ver-1.0 September 10, 2025 01:31
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.

1 participant