-
Notifications
You must be signed in to change notification settings - Fork 264
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
fix(time-select): [time-select]After manually modifying the time, the initial time cannot be selected again. #2415
base: dev
Are you sure you want to change the base?
Conversation
WalkthroughThe changes in this pull request modify the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
packages/renderless/src/time-panel/vue.ts (1)
Line range hint
1-120
: Add test coverage for the time reselection scenario.Given this fixes a specific bug where initial time couldn't be reselected, we should add test coverage to prevent regression.
Would you like me to help create test cases that verify:
- Initial time selection works
- Manual time modification works
- Reselection of initial time works after modification
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- packages/renderless/src/time-panel/vue.ts (1 hunks)
🔇 Additional comments (1)
packages/renderless/src/time-panel/vue.ts (1)
57-57
: LGTM! The fix correctly synchronizes state.The change ensures that
lastEmitValue
is synchronized withrealValue
when a valid time is selected, which should fix the issue of not being able to reselect the initial time.Let's verify the state management logic:
✅ Verification successful
Based on the results, I can now generate the final response:
State synchronization is correctly implemented
The verification confirms that
lastEmitValue
is properly handled across the codebase:
- In
vue.ts
, it's synchronized withrealValue
during value updates- In
index.ts
, it's used as expected in the emit logic to prevent duplicate emissions🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for other places where lastEmitValue might need similar synchronization # Test 1: Check if lastEmitValue is properly handled in emitPick rg -A 5 "lastEmitValue" # Test 2: Look for other state updates that might affect time selection ast-grep --pattern 'state.realValue = $_'Length of output: 1679
a9edc38
to
3dd83ab
Compare
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #2170
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit