-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: restructure interval selector hooks for improved modularity and maintainability #334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: restructure interval selector hooks for improved modularity and maintainability #334
Conversation
…improved modularity and maintainability
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
…ntly and improve navigation handling
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…torCalendar and streamline date range handling
… calendar interval handling
|
Offering a refactor on the current proposal. I mainly focused on improving state management and removing all unnecessary bloat.
I didn't touche the animation / navigation / mouse handling parts as they are less critical to the behavior of the component. Not sure however how much we need all the ref passing around and editing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Note
Modernizes the interval selector and its integrations with a modular architecture and streamlined API.
use-interval-selector,use-interval-selector-input,use-interval-selector-navigation, anduse-interval-selector-state; removes legacy monolithic logic andinterval-selector.utilsIntervalSelectornow acceptsrelativeSuggestionsandintervalSuggestions(with defaults) and no longer usesvalue/onValueChangeor option/value stringstypes.tsandutils(constants,format) for clearer types and formatting;generateDurationShortcutnow returns the highest present unit;parseTextIntervalno longer treats duration shortcuts as intervalsIntervalSelectorCalendarandIntervalSelectorSuggestionsto operate onIntervalSelectiondirectly; keyboard navigation refactored to work with unified suggestions listintervalValuestate/props and wiring directly toselectiontest/setup.ts, and splits Vitest config into storybook and unit projectsWritten by Cursor Bugbot for commit eda7588. This will update automatically on new commits. Configure here.