Repository navigation
chore: add a CSS transition callbacks example screen - #10340
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughAdds a “Transition Callbacks” screen to the CSS transitions examples. The screen uses selectable transition configurations, cycles shared style states, supports preview unmounting, displays optional style-change visualization, and logs callback events with event counts and a clear action. The screen is exported and registered under the miscellaneous transitions routes. Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/common-app/src/apps/css/examples/transitions/screens/miscellaneous/TransitionCallbacks.tsx (1)
69-71: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse
performance.now()for all transition interval timestamps.Replace all three
Date.now()calls withperformance.now(). Mixing clock sources can produce incorrect or negative intervals.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1887b61b-b4cd-4184-bf18-c024b63b7fcc
📒 Files selected for processing (1)
apps/common-app/src/apps/css/examples/transitions/screens/miscellaneous/TransitionCallbacks.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Adds a Transition Callbacks screen to the CSS example app, next to the existing Animation Callbacks one, so the transition lifecycle props can be exercised by hand.
A config selector drives the settings, so
transitionProperty,transitionDurationandtransitionDelaycan be added, removed or retuned while the example runs. Duration and delay take a value per property, which makes it easy to see that each property keeps its own timeline. Trigger changes the style, Unmount view interrupts a running transition, and the log records every callback with itselapsedTimenext to the time since the trigger, which makes the delay thatelapsedTimeexcludes visible.It lives under Miscellaneous, mirroring where the animation counterpart sits.
Demo
transitioncallbacksdemo.mp4
Verified on device and emulator. With
width/opacitytransitioned over1s/2sand delays of0s/500ms, the log reportsstart (width)right away andstart (opacity)half a second later, thenend (width) at 1.00sandend (opacity) at 2.00s, soelapsedTimestays free of the delay. Unmounting mid-flight reportscancelinstead ofend, and a0sduration with no delay produces no transition and no events, matching the CSS rule that the combined duration has to be greater than zero.