Skip to content

Commit 29f160e

Browse files
abdulrahmancodesFelixMalfait
authored andcommitted
Improve command menu animation (twentyhq#16197)
https://github.com/user-attachments/assets/c9ff288d-0e68-4877-af6b-8685a6bbeeaf <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Removes legacy layout and refactors `CommandMenuPageLayout` to use width-based animation with shared constants and close-animation cleanup. > > - **UI/Command Menu**: > - **Refactor `CommandMenuPageLayout`**: > - Switch to width/margin animation on `StyledSidePanelWrapper`; remove side panel `x` translate animation. > - Use shared `COMMAND_MENU_SIDE_PANEL_WIDTH` constant. > - Add close-state handling via `isCommandMenuClosingState` and `useCommandMenuCloseAnimationCompleteCleanup` on animation completion. > - Simplify props: remove `isSidePanelOpen`; rely on `isCommandMenuOpenedState` and internal `shouldRenderContent`. > - **Cleanup**: > - Remove obsolete `CommandMenuLayout.tsx`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d6cb011. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
1 parent 05a8533 commit 29f160e

File tree

2 files changed

+0
-154
lines changed

2 files changed

+0
-154
lines changed

packages/twenty-front/src/modules/object-record/components/CommandMenuLayout.tsx

Lines changed: 0 additions & 151 deletions
This file was deleted.

packages/twenty-front/src/modules/object-record/components/CommandMenuPageLayout.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ export const CommandMenuPageLayout = ({
126126
>
127127
<StyledSidePanel
128128
initial={false}
129-
animate={{
130-
x: isCommandMenuOpened ? 0 : COMMAND_MENU_SIDE_PANEL_WIDTH,
131-
}}
132129
transition={{
133130
duration: theme.animation.duration.normal,
134131
}}

0 commit comments

Comments
 (0)