-
Notifications
You must be signed in to change notification settings - Fork 176
✨ Add closing animation to ReasoningMessage #3734
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
base: main
Are you sure you want to change the base?
✨ Add closing animation to ReasoningMessage #3734
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Unexpected error on running flow
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Updates to Preview Branch (devin/1760065164-add-reasoning-message-closing-animation) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
Check changeset necessityStatus: NOT REQUIRED Reason:
Changeset (copy & paste):<!-- No changeset required: changes only affect @liam-hq/app (ignored). --> |
- Migrate from conditional rendering to Radix UI Collapsible components - Add slideUp animation for smooth closing transitions - Use CollapsibleRoot, CollapsibleTrigger, and CollapsibleContent - Update CSS with data-state selectors for open/closed animations - Add prefers-reduced-motion support for accessibility - Maintain auto-collapse behavior after 500ms during workflow execution Implements option 1 from GitHub issue #5816 Reference: ViewErrorsCollapsible implementation pattern Co-Authored-By: [email protected] <[email protected]>
76a4ed4
to
36418ff
Compare
Issue
Why is this change needed?
The ReasoningMessage component currently only has a slideDown animation when expanding, but no closing animation when collapsing - it just disappears instantly. This creates an asymmetric and jarring user experience. Issue #5816 requested implementing a smooth closing animation using Option 1 (Radix UI Collapsible approach).
Changes Made
Migration to Radix UI Collapsible:
CollapsibleRoot
,CollapsibleTrigger
, andCollapsibleContent
handleToggle
function in favor of Radix'sonOpenChange
CollapsibleTrigger asChild
to maintain button semantics while letting Radix control behaviorEnhanced Animations:
slideUp
animation for closing transitionsvar(--radix-collapsible-content-height)
0.2s ease
to200ms ease-out
(consistent with ViewErrorsCollapsible)overflow: hidden
to content for smooth height transitionsAccessibility:
@media (prefers-reduced-motion: reduce)
supportaria-expanded
attribute for screen readersImplementation Details
This follows the exact pattern used in
ViewErrorsCollapsible
component. Radix UI automatically manages thedata-state
attribute ("open"
or"closed"
) and provides the--radix-collapsible-content-height
CSS variable for smooth animations.Human Review Checklist
Must test:
prefers-reduced-motion: reduce
disables animations appropriatelyRequested by: [email protected]
Link to Devin run: https://app.devin.ai/sessions/fa5c15d75ce341f48cd70517f50f9a38