-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Animated the Sidebar Objects Tree view opening/closing #9287
base: main
Are you sure you want to change the base?
Animated the Sidebar Objects Tree view opening/closing #9287
Conversation
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.
PR Summary
This PR adds smooth animations to the sidebar objects tree view by implementing a new expandable container component using Framer Motion for transitions.
- Added new
NavigationDrawerSubItemAnimatedExpandableContainer
component with height/opacity animations and 300ms duration - Modified
NavigationDrawerItemForObjectMetadataItem
to use animated container for sub-items expansion - Updated
CurrentWorkspaceMemberFavorites
to animate folder content expansion/collapse - Animations use theme-consistent easing and timing (300ms) for a polished feel
3 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile
...vigation/navigation-drawer/components/NavigationDrawerSubItemAnimatedExpandableContainer.tsx
Outdated
Show resolved
Hide resolved
...vigation/navigation-drawer/components/NavigationDrawerSubItemAnimatedExpandableContainer.tsx
Outdated
Show resolved
Hide resolved
...vigation/navigation-drawer/components/NavigationDrawerSubItemAnimatedExpandableContainer.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/favorites/components/CurrentWorkspaceMemberFavorites.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/settings/hooks/useExpandedAnimation.ts
Outdated
Show resolved
Hide resolved
...vigation/navigation-drawer/components/NavigationDrawerSubItemAnimatedExpandableContainer.tsx
Outdated
Show resolved
Hide resolved
...vigation/navigation-drawer/components/NavigationDrawerSubItemAnimatedExpandableContainer.tsx
Outdated
Show resolved
Hide resolved
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.
Great job, some comments about the implementation and component naming ! 🙂
packages/twenty-front/src/modules/settings/hooks/useExpandedAnimation.ts
Outdated
Show resolved
Hide resolved
...vigation/navigation-drawer/components/NavigationDrawerSubItemAnimatedExpandableContainer.tsx
Outdated
Show resolved
Hide resolved
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.
Thanks for the tests and the refactor, just adding a comment to clarify where the hook should take place
...wenty-ui/src/layout/animated-expandable-container/components/AnimatedExpandableContainer.tsx
Outdated
Show resolved
Hide resolved
@magrinj |
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.
PR Summary
(updates since last review)
This PR continues the implementation of sidebar animations by introducing a new reusable AnimatedExpandableContainer component and refactoring existing components to use it. Here are the key changes:
- Created new
AnimatedExpandableContainer
in twenty-ui package with Framer Motion animations and configurable dimensions/durations - Removed old static
ExpandableContainer
in favor of the new animated version - Refactored
AdvancedSettingsWrapper
and favorites components to use the new container - Added comprehensive Storybook stories demonstrating different animation configurations
The implementation looks solid and matches the desired 300ms animation requirement from the issue.
11 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/settings/hooks/useExpandedAnimation.ts
Show resolved
Hide resolved
...src/layout/animated-expandable-container/__stories__/AnimatedExpandableContainer.stories.tsx
Show resolved
Hide resolved
...wenty-ui/src/layout/animated-expandable-container/components/AnimatedExpandableContainer.tsx
Outdated
Show resolved
Hide resolved
...wenty-ui/src/layout/animated-expandable-container/components/AnimatedExpandableContainer.tsx
Outdated
Show resolved
Hide resolved
I think that putting it into twenty-ui is not critical for now, let's be cautious and extract utils, states and hook into the relevant files and folders, remember to keep one util per file, etc. |
closes #6485
2024-12-31.00-15-33.mov