-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
406 animate the command menu button #10305
406 animate the command menu button #10305
Conversation
…rstand-its-the-same-button
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 enhances the command menu button with smooth animations and transitions, improving visual feedback and user experience.
- Added animated transformation of dots icon to X icon in
PageHeaderOpenCommandMenuButton.tsx
using SVG animations - Introduced new
AnimatedButton
component intwenty-ui
with support for custom animations and styling variants - Added fade in/out animations with
AnimatePresence
toCommandMenuContainer
for smoother transitions - Merged open/close command menu buttons into a single component with rotation animation
- Added feature flag
IsCommandMenuV2Enabled
to control new animation behavior
6 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile
...wenty-front/src/modules/ui/layout/page-header/components/PageHeaderOpenCommandMenuButton.tsx
Show resolved
Hide resolved
...wenty-front/src/modules/ui/layout/page-header/components/PageHeaderOpenCommandMenuButton.tsx
Show resolved
Hide resolved
…the-same-button' of github.com:twentyhq/twenty into 406-animate-the-k-button-to-make-people-understand-its-the-same-button
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.
Really interesting implementation! I love the effect. Good job!
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.
Looks good! 💯
const isButtonVisible = | ||
!location.pathname.startsWith('/objects/') && | ||
!location.pathname.startsWith('/object/'); |
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.
Is there a safest way to determine whether the button should be visible? Do you think we'll want to add it to more pages soon? If so, could we make it simpler to update the code?
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.
I think that we will potentially add it everywhere, so we will just have to remove this check ;)
Closes twentyhq/core-team-issues#406
AnimatedButton
. All the button styling could be extracted to another file so we don't duplicate the code, but sinceAnimatedLightIconButton
duplicates the style fromLightIconButton
, I did the same here.open
toclose
stateBefore
Enregistrement.de.l.ecran.2025-02-18.a.17.21.51.mov
After
Enregistrement.de.l.ecran.2025-02-18.a.17.11.36.mov