Manual animations on website#7483
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a manual animation scrubbing feature to the docs playground. A new ChangesManual Animation Scrubbing in Playground
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Controls as ManualAnimationControls
participant TimeSetter as TimeSetter
participant Manager as ManualAnimationManager
participant MockClock as MockTimeContext
participant Chart as Recharts Chart
User->>Controls: select "manual" radio
Controls->>Manager: enabled=true wraps chart
Chart->>Manager: animation starts → register handle
Manager->>MockClock: tick handle with current mock time
User->>TimeSetter: drag mouse on overlay
TimeSetter->>MockClock: setMockTime(x → chart time)
MockClock->>Manager: listeners replay new mock time
Manager->>Chart: tick(newTime) → update animation progress
Chart-->>User: re-renders at scrubbed position
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@www/src/components/ManualAnimationContext.tsx`:
- Around line 151-158: The radio buttons in the animation preference section are
using `defaultChecked` which makes them uncontrolled components that won't
update when `isManualAnimationEnabled` changes externally. Replace
`defaultChecked` with `checked` for both radio buttons: the first radio button
should use `checked={!isManualAnimationEnabled}` for the Autoplay option, and
the second should use `checked={isManualAnimationEnabled}` for the Manual
Animations option. This will make them controlled components that properly
reflect the current state value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2a641a1b-d9c7-44cb-86d6-8349df9bd1c7
📒 Files selected for processing (3)
www/src/components/CodeEditorWithPreview.tsxwww/src/components/ManualAnimationContext.tsxwww/src/docs/exampleComponents/AreaChart/AreaChartExample.tsx
Bundle ReportBundle size has no change ✅ |
|
Tip All tests passed and all changes approved!🟢 UI Tests: 198 tests unchanged |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7483 +/- ##
==========================================
- Coverage 88.39% 88.10% -0.30%
==========================================
Files 602 603 +1
Lines 13911 13975 +64
Branches 3514 3524 +10
==========================================
+ Hits 12296 12312 +16
- Misses 1432 1476 +44
- Partials 183 187 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Staging Deployment Details
These deployments will remain available for 30 days. |
|
Staging Deployment Details
These deployments will remain available for 30 days. |
Uses the new 3.9 animation controls to implement manual animation overrides on the website. Should work on all charts.
Summary by CodeRabbit
New Features
New Features
Bug Fixes