Skip to content
Merged
Show file tree
Hide file tree
Changes from 142 commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
ad10e0a
Enhance navigation menu item components with icon color customization
abdulrahmancodes Feb 2, 2026
8cbbc1b
Refactor NavigationMenuItemIcon to enhance icon color handling
abdulrahmancodes Feb 2, 2026
2a5c2cf
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 2, 2026
ef617aa
Add IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED feature flag
abdulrahmancodes Feb 2, 2026
986a36a
Add navigation menu edit mode hooks and state management
abdulrahmancodes Feb 2, 2026
2affeaf
Enhance Save and Cancel Buttons with Inverted Style Support
abdulrahmancodes Feb 2, 2026
c8a7ce4
Add Navigation Menu Edit Mode Bar and Enhance Workspace Navigation Items
abdulrahmancodes Feb 2, 2026
3672bb7
Add Navigation Menu Item Edit Page and Update Command Menu Configuration
abdulrahmancodes Feb 2, 2026
e80574b
Enhance Workspace Navigation Menu Items with Active Item Click Handling
abdulrahmancodes Feb 2, 2026
2d04977
Refactor NavigationDrawerItemForObjectMetadataItem to Simplify Compon…
abdulrahmancodes Feb 2, 2026
4224522
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 2, 2026
9e487f0
Add Workflows Folder and Update Navigation Menu Structure
abdulrahmancodes Feb 3, 2026
9f9c766
Refactor Navigation Menu Item Structure and Introduce Workspace Secti…
abdulrahmancodes Feb 3, 2026
b38039f
Refactor Navigation Menu Item State Management and Update Component L…
abdulrahmancodes Feb 3, 2026
a65322d
Update NavigationDrawerItem Width Calculation for Enhanced Layout
abdulrahmancodes Feb 3, 2026
4611e83
Enhance Command Menu Navigation Item Editing with Move and Remove Fun…
abdulrahmancodes Feb 3, 2026
3865922
Add New Sidebar Item Page to Command Menu and Update Navigation Struc…
abdulrahmancodes Feb 3, 2026
df50bf4
Remove unused targetObjectMetadataId assignment in useSaveNavigationM…
abdulrahmancodes Feb 4, 2026
9aaefbb
Enhance Command Menu New Sidebar Item Page with System Object Support
abdulrahmancodes Feb 4, 2026
f3f8a0c
Add View Support to Command Menu New Sidebar Item Page
abdulrahmancodes Feb 4, 2026
c89eee4
Enhance Command Menu List with Custom No Results Text
abdulrahmancodes Feb 4, 2026
ff92bde
Enhance Back Navigation Logic in Command Menu New Sidebar Item Page
abdulrahmancodes Feb 4, 2026
e2d4375
Refactor Navigation Menu Item Draft Management and Enhance Command Me…
abdulrahmancodes Feb 4, 2026
70a338b
Enhance Command Menu Navigation Item Editing and Sorting Logic
abdulrahmancodes Feb 4, 2026
b32d04b
Refactor Workspace Navigation Menu Item Rendering and Sorting Logic
abdulrahmancodes Feb 4, 2026
c516f95
Add Object Selection for View Editing in Command Menu
abdulrahmancodes Feb 4, 2026
2cf2ea6
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 4, 2026
5110c27
Enhance NavigationDrawerItem to include secondary label for object me…
abdulrahmancodes Feb 4, 2026
41aa60d
Integrate command menu functionality into NavigationMenuEditModeBar
abdulrahmancodes Feb 4, 2026
fc592d3
Add CommandMenuFolderInfo component and integrate into CommandMenuPag…
abdulrahmancodes Feb 4, 2026
b26b28f
Add link field to NavigationMenuItem and related inputs
abdulrahmancodes Feb 5, 2026
b9e5dd3
Add CommandMenuLinkInfo component and integrate into CommandMenuPageInfo
abdulrahmancodes Feb 5, 2026
ebef220
Enhance navigation menu item functionality with drag-and-drop support
abdulrahmancodes Feb 5, 2026
aeb62f4
Add CommandMenuItemWithAddToNavigationDrag component for enhanced dra…
abdulrahmancodes Feb 5, 2026
e1925c5
Refactor command menu components for improved icon handling and searc…
abdulrahmancodes Feb 5, 2026
ea920aa
Enhance CommandMenuSubViewWithSearch component and integrate into nav…
abdulrahmancodes Feb 5, 2026
3682e54
Add Command Menu Components for Enhanced Navigation Functionality
abdulrahmancodes Feb 5, 2026
479dabc
Implement New Sidebar Item Components for Command Menu
abdulrahmancodes Feb 5, 2026
8f079b2
Refactor CommandMenuNavigationMenuItemEditPage for improved search ha…
abdulrahmancodes Feb 5, 2026
6b2bf17
Add Command Menu Components for Enhanced Editing Functionality
abdulrahmancodes Feb 5, 2026
d4d06a8
Refactor Command Menu Components for Improved Icon Handling and Styling
abdulrahmancodes Feb 5, 2026
ee57a19
Remove CommandMenuEditFolderRenameSubView Component
abdulrahmancodes Feb 5, 2026
8237a41
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 5, 2026
71e4db6
Fix import order and clean up GraphQL type definitions in generated m…
abdulrahmancodes Feb 5, 2026
5153c73
Refactor Command Menu Components to Use Flattened Workspace Section I…
abdulrahmancodes Feb 5, 2026
45af0ca
Refactor Command Menu Components to Integrate Owner Section
abdulrahmancodes Feb 5, 2026
1061f81
Enhance Command Menu Folder Picker and Organize Actions Components
abdulrahmancodes Feb 5, 2026
9c6a117
Refactor useMouseDownNavigation Hook to Simplify Event Handling
abdulrahmancodes Feb 5, 2026
5b6798f
Refactor Command Menu Sub View to Integrate Navigation Header
abdulrahmancodes Feb 5, 2026
d04df4b
Refactor useNavigationMenuItemMoveRemove Hook to Improve Position Swa…
abdulrahmancodes Feb 5, 2026
e9cd87c
Add useFilteredPickerItems Hook and Refactor Command Menu Components
abdulrahmancodes Feb 5, 2026
439ac3f
Add options to useCommandMenuHotKeys for form tag handling
abdulrahmancodes Feb 5, 2026
df86efe
Enhance Command Menu Components with Application ID Integration
abdulrahmancodes Feb 5, 2026
20dbfcf
Refactor CommandMenuPageInfo to Improve Navigation Item Handling
abdulrahmancodes Feb 5, 2026
0f9882b
Refactor Navigation Menu Item Handling to Use Direct IDs
abdulrahmancodes Feb 5, 2026
ff1f0aa
Refactor Navigation Menu Item Handling to Use New Utility Functions
abdulrahmancodes Feb 6, 2026
02dd826
Refactor Command Menu Components for Improved Item Handling
abdulrahmancodes Feb 6, 2026
3d16040
Refactor Command Menu Components for Enhanced Readability and Logic
abdulrahmancodes Feb 6, 2026
73c529e
Refactor CommandMenuLinkInfo for Improved Clarity and Logic
abdulrahmancodes Feb 6, 2026
5462dc5
Add CommandMenuFolderLinkInfo Component and Remove CommandMenuLinkInfo
abdulrahmancodes Feb 6, 2026
b7f9112
Refactor CommandMenuFolderLinkInfo to Use Styled Navigation Menu Item…
abdulrahmancodes Feb 6, 2026
9f44d0a
Remove CommandMenuSharedStyles and Integrate Styles Directly into Com…
abdulrahmancodes Feb 6, 2026
a7a5532
Remove CommandMenuEditDefaultView and Integrate Its Logic into Comman…
abdulrahmancodes Feb 6, 2026
27dd5f2
Remove CommandMenuEditFolderItemView and Update CommandMenuNavigation…
abdulrahmancodes Feb 6, 2026
04e8a67
Refactor CommandMenuEditFolderPickerSubView for Improved Folder Handling
abdulrahmancodes Feb 6, 2026
8672bbc
Refactor CommandMenuEdit Components for Improved Clarity
abdulrahmancodes Feb 6, 2026
8912fb6
Update CommandMenuEditOwnerSection to Simplify Disabled Prop Usage
abdulrahmancodes Feb 6, 2026
04c2995
Refactor CommandMenuEditLinkItemView to Enhance URL Handling
abdulrahmancodes Feb 6, 2026
8a2b6f8
Enhance CommandMenuNavigationMenuItemEditPage with Utility Functions …
abdulrahmancodes Feb 6, 2026
923bb1e
Refactor CommandMenuNewSidebarItemRecordSubView for Improved Permissi…
abdulrahmancodes Feb 6, 2026
a97eafc
Refactor CommandMenuNewSidebarItemViewObjectPickerSubView to Utilize …
abdulrahmancodes Feb 6, 2026
09bf32d
Refactor CommandMenuNewSidebarItemViewPickerSubView to Use Custom Hoo…
abdulrahmancodes Feb 6, 2026
1882fdf
Refactor CommandMenuNewSidebarItemViewSystemSubView to Use Custom Hoo…
abdulrahmancodes Feb 6, 2026
dd0b8de
Refactor CommandMenuObjectMenuItem for Improved Click Handling and Cl…
abdulrahmancodes Feb 6, 2026
1bf80a3
Refactor CommandMenu Components to Enhance Rendering and Simplify Logic
abdulrahmancodes Feb 6, 2026
61c1e85
Refactor AddToNavigationDragHandle for Improved Readability and Consi…
abdulrahmancodes Feb 6, 2026
abf32ad
Refactor AddToNavigationDragPreview for Improved Clarity and Consistency
abdulrahmancodes Feb 6, 2026
8858696
Refactor Navigation Drawer Components for Improved Structure and Clarity
abdulrahmancodes Feb 6, 2026
6dd068a
Refactor NavigationItemDropTarget for Improved Structure and Clarity
abdulrahmancodes Feb 6, 2026
4c4d47b
Refactor NavigationMenuEditModeBar for Improved Clarity and Structure
abdulrahmancodes Feb 6, 2026
1a047fe
Refactor CommandMenuNavigationMenuItemEditPage for Improved Clarity a…
abdulrahmancodes Feb 6, 2026
485e880
Refactor CommandMenuNewSidebarItemPage for Improved Clarity and Struc…
abdulrahmancodes Feb 6, 2026
7268332
Refactor NavigationItemDropTarget and NavigationSidebarNativeDropZone…
abdulrahmancodes Feb 6, 2026
430f16e
Enhance NavigationMenuEditModeBar for Improved Theming and Clarity
abdulrahmancodes Feb 6, 2026
5c12b0f
Refactor CommandMenuNewSidebarItemPage for Enhanced Rendering Logic
abdulrahmancodes Feb 6, 2026
e0b1f8b
Refactor NavigationSidebarNativeDropZone for Improved Clarity and Str…
abdulrahmancodes Feb 6, 2026
02e1710
Refactor NavigationSidebarNativeDropZone for Enhanced Readability
abdulrahmancodes Feb 6, 2026
521d28d
Refactor WorkspaceNavigationMenuItemsFolder for Improved Clarity and …
abdulrahmancodes Feb 6, 2026
c76d7ba
Refactor useAddToNavigationMenuDraft for Improved Code Clarity
abdulrahmancodes Feb 6, 2026
76ceaa3
Refactor Navigation Menu Hooks to Utilize New Filtering Utility
abdulrahmancodes Feb 6, 2026
fa18caa
Refactor CommandMenuEditFolderPickerSubView for Improved Logic and Re…
abdulrahmancodes Feb 6, 2026
6ec8b57
Refactor CommandMenuNavigationMenuItemEditPage for Improved Readability
abdulrahmancodes Feb 6, 2026
ed42de3
Refactor CommandMenuNavigationMenuItemEditPage and Related Hooks for …
abdulrahmancodes Feb 6, 2026
5241c5a
Refactor CommandMenu Components for Enhanced Data Management and Read…
abdulrahmancodes Feb 6, 2026
9456ac3
Refactor Command Menu Components for Improved Structure and Reusability
abdulrahmancodes Feb 6, 2026
7f9128a
Refactor Navigation Menu Item Hooks and Components for Enhanced State…
abdulrahmancodes Feb 8, 2026
b5d9181
Refactor CommandMenuNavigationMenuItemEditPage for Improved Action Ha…
abdulrahmancodes Feb 8, 2026
f82bcb4
Refactor Command Menu Components to Enhance State Management and Clarity
abdulrahmancodes Feb 8, 2026
fe19af4
Refactor CommandMenuEditFolderPickerSubView for Enhanced Folder Selec…
abdulrahmancodes Feb 8, 2026
c9c7fc1
Refactor CommandMenuEditViewPickerSubView for Enhanced View Selection…
abdulrahmancodes Feb 8, 2026
409e789
Refactor CommandMenuNavigationMenuItemEditPage for Improved Rendering…
abdulrahmancodes Feb 8, 2026
9af54c5
Refactor CommandMenuNewSidebarItem Components for Enhanced Structure …
abdulrahmancodes Feb 8, 2026
0956c72
Refactor Command Menu Components for Improved Data Handling and Clarity
abdulrahmancodes Feb 8, 2026
ea52343
Refactor CommandMenuNavigationMenuItemEditPage for Enhanced Rendering…
abdulrahmancodes Feb 8, 2026
dce2e0a
Refactor Command Menu Item Components to Standardize Icon Handling
abdulrahmancodes Feb 8, 2026
eddf0e1
Refactor Command Menu Item Hooks and Components for Improved Draft Ma…
abdulrahmancodes Feb 8, 2026
c12875e
Refactor Navigation Menu Item Drag and Drop Logic for Improved Clarity
abdulrahmancodes Feb 8, 2026
cb21655
Refactor Navigation Menu Edit Mode Logic for Improved State Management
abdulrahmancodes Feb 8, 2026
f16b724
Enhance Icon Component Handling in AddToNavigationIconSlot
abdulrahmancodes Feb 8, 2026
f1f0f74
Refactor StyledIcon Component for Improved CSS Handling
abdulrahmancodes Feb 8, 2026
ef57d5c
Enhance Navigation Menu Item Type Handling and Sorting Logic
abdulrahmancodes Feb 8, 2026
195bdac
Refactor Navigation Menu Item Logic for Improved Type Handling
abdulrahmancodes Feb 8, 2026
ab42628
Refactor Navigation Menu Item Components for Enhanced Type Consistency
abdulrahmancodes Feb 9, 2026
160f7ca
Refactor Workspace Navigation Menu Item Filtering for Enhanced Type S…
abdulrahmancodes Feb 9, 2026
4faee65
Remove Unused Import in useSelectedNavigationMenuItemEditData Hook
abdulrahmancodes Feb 9, 2026
55d55a6
Update Icon Sizes and Container Dimensions for Consistency
abdulrahmancodes Feb 9, 2026
44602fc
Enhance Navigation Drawer Section Title Component with Always Visible…
abdulrahmancodes Feb 9, 2026
aaed421
Implement Navbar Drag Provider and Refactor Navigation Components for…
abdulrahmancodes Feb 9, 2026
a3bfa3b
Refactor Workspace Navigation Menu Items Folder Component for Improve…
abdulrahmancodes Feb 9, 2026
84c8043
Refactor NavbarDragProvider to Improve Parameter Naming
abdulrahmancodes Feb 9, 2026
19472a9
Add WorkspaceNavigationMenuItemFolderDragClone Component for Drag-and…
abdulrahmancodes Feb 9, 2026
2b465f5
Refactor Workspace Navigation Menu Items Folder for Enhanced Structur…
abdulrahmancodes Feb 9, 2026
8159a0c
Update Command Menu Icons for Improved Clarity
abdulrahmancodes Feb 9, 2026
fae016b
Refactor AddToNavigationIconSlot Component for Improved Icon Handling
abdulrahmancodes Feb 9, 2026
439d81c
Enhance Command Menu Item with Contextual Drag Description
abdulrahmancodes Feb 9, 2026
d829206
Refactor AddToNavigationDragHandle Component for Enhanced Customization
abdulrahmancodes Feb 9, 2026
5caa8df
Refactor Command Menu Components for Enhanced Icon Handling and Theming
abdulrahmancodes Feb 9, 2026
92ba245
Refactor AddToNavigationDragHandle and IconWithBackground for Improve…
abdulrahmancodes Feb 9, 2026
e2da06c
Refactor NavigationSidebarNativeDropZone for Improved Drag-and-Drop H…
abdulrahmancodes Feb 9, 2026
8f7b189
Enhance Drag Preview Functionality with Recoil Integration
abdulrahmancodes Feb 9, 2026
6f78f9a
Implement Navigation Sections and Enhance Drag-and-Drop Functionality
abdulrahmancodes Feb 9, 2026
f9df7b8
Enhance Command Menu Sidebar Item with Displayable Views and System O…
abdulrahmancodes Feb 9, 2026
af1fcee
Enhance Command Menu New Sidebar Item with Submenu Support
abdulrahmancodes Feb 9, 2026
26e67db
Update CommandMenuSubViewWithSearch styling for improved visual consi…
abdulrahmancodes Feb 9, 2026
5b55f91
Enhance Navigation Item Drop Target and Workspace Menu with Add Item …
abdulrahmancodes Feb 9, 2026
a113468
Refactor Navigation Menu Components to Enhance Navigation Logic
abdulrahmancodes Feb 9, 2026
09bf955
Refactor Command Menu Components to Streamline Object Editing and Rem…
abdulrahmancodes Feb 9, 2026
326f32e
Refactor WorkspaceNavigationMenuItemsFolder for Enhanced Styling and …
abdulrahmancodes Feb 9, 2026
2246970
Refactor WorkspaceNavigationMenuItemsFolder for Improved Padding Logic
abdulrahmancodes Feb 9, 2026
a95f152
Refactor Command Menu New Sidebar Item Components for Improved Logic …
abdulrahmancodes Feb 9, 2026
b048b7a
Add Add Before and Add After Functionality to Command Menu Components
abdulrahmancodes Feb 9, 2026
919766c
Add CommandMenuObjectViewRecordInfo Component for Enhanced View and R…
abdulrahmancodes Feb 9, 2026
4b0bd71
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 10, 2026
6b27902
feat: add 'link' property to entity properties configuration
abdulrahmancodes Feb 10, 2026
b7798ef
refactor: simplify item type checks in CommandMenu components
abdulrahmancodes Feb 10, 2026
eaec7de
refactor: remove getNavigationMenuItemType utility and streamline ite…
abdulrahmancodes Feb 10, 2026
d2bf4a7
refactor: standardize navigation menu item type handling across compo…
abdulrahmancodes Feb 10, 2026
b8a2600
refactor: enhance folder selection logic in CommandMenu components
abdulrahmancodes Feb 10, 2026
d24264a
Potential fix for pull request finding 'Useless conditional'
abdulrahmancodes Feb 10, 2026
fa9dba8
refactor: improve item type handling and component logic in CommandMenu
abdulrahmancodes Feb 10, 2026
a3e242b
fix: add key prop to CommandMenuEditLinkItemView for improved rendering
abdulrahmancodes Feb 10, 2026
4d12375
refactor: update contextual description logic in CommandMenuItemWithA…
abdulrahmancodes Feb 10, 2026
67707da
refactor: optimize sorting of object metadata items in CommandMenu co…
abdulrahmancodes Feb 10, 2026
ab392e7
fix: include targetRecordId in navigation menu item comparison logic
abdulrahmancodes Feb 10, 2026
1738fa0
fix: enhance search records handling in CommandMenuNewSidebarItemReco…
abdulrahmancodes Feb 10, 2026
7c92aef
fix: handle non-function icon types in AddToNavigationIconSlot component
abdulrahmancodes Feb 10, 2026
4f55adb
fix: update folder content drop disabled logic in CurrentWorkspaceMem…
abdulrahmancodes Feb 10, 2026
655ec25
fix: include folderUniversalIdentifier in navigation menu item metadata
abdulrahmancodes Feb 10, 2026
b61377c
fix: refine icon type validation in AddToNavigationIconSlot component
abdulrahmancodes Feb 10, 2026
e5acbcf
fix: add link property to navigation menu item metadata
abdulrahmancodes Feb 10, 2026
7bca98f
test: add unit tests for navigation menu item utilities
abdulrahmancodes Feb 10, 2026
ea8c910
fix: update navigation menu item error messages to include external l…
abdulrahmancodes Feb 10, 2026
58bc4c4
test: add unit tests for workspace navigation menu item utilities
abdulrahmancodes Feb 10, 2026
90de7f8
test: add unit tests for recordIdentifierToObjectRecordIdentifier uti…
abdulrahmancodes Feb 10, 2026
fcb5d7e
fix: simplify folder item handling in useWorkspaceSectionItems hook
abdulrahmancodes Feb 10, 2026
5b16cde
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 10, 2026
aefe6f6
refactor: improve navigation menu item movement logic
abdulrahmancodes Feb 10, 2026
7889fc6
refactor: update navigation menu item matching logic
abdulrahmancodes Feb 10, 2026
584f13f
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 10, 2026
01bb421
feat: implement drag-and-drop functionality for navigation menu items
abdulrahmancodes Feb 10, 2026
e6d9771
feat: integrate Recoil state management for navigation drag-and-drop
abdulrahmancodes Feb 10, 2026
2c81170
refactor: streamline state management in navigation components
abdulrahmancodes Feb 10, 2026
c0bcbc1
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 10, 2026
03971aa
test: add unit tests for navigation menu item utilities
abdulrahmancodes Feb 10, 2026
7b2a5ff
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 11, 2026
bc93710
refactor: replace AddToNavigationIconSlot with AddToNavigationDragHan…
abdulrahmancodes Feb 11, 2026
1420eba
refactor: enhance CommandMenuItemWithAddToNavigationDrag for improved…
abdulrahmancodes Feb 11, 2026
b9b8062
test: add unit tests for calculateNewPosition utility
abdulrahmancodes Feb 11, 2026
be1cae4
test: update navigation menu item utility tests for clarity and coverage
abdulrahmancodes Feb 11, 2026
4d8046b
test: update coverage thresholds in jest configuration
abdulrahmancodes Feb 11, 2026
51b6eff
test: adjust coverage thresholds in Jest configuration
abdulrahmancodes Feb 11, 2026
fe96cc6
refactor: simplify drop handling logic in useHandleAddToNavigationDro…
abdulrahmancodes Feb 11, 2026
e3228fa
test: lower coverage thresholds in Jest configuration
abdulrahmancodes Feb 11, 2026
3797812
test: lower functions coverage threshold in Jest configuration
abdulrahmancodes Feb 11, 2026
698074e
refactor: remove unused feature flag from seedFeatureFlags utility
abdulrahmancodes Feb 11, 2026
1a7b1ab
refactor: improve code readability in tests and components
abdulrahmancodes Feb 11, 2026
7391b7b
test: remove obsolete test files for navigation menu item utilities
abdulrahmancodes Feb 11, 2026
8a769fe
Merge branch 'main' into feat/navbar-customization
abdulrahmancodes Feb 11, 2026
d8bb8e5
Enhance GraphQL schema with new input types and enums
abdulrahmancodes Feb 11, 2026
56676a7
test: fix
Devessier Feb 11, 2026
3e81789
chore: regenerate graphql
Devessier Feb 11, 2026
2d92857
Merge remote-tracking branch 'origin/main' into feat/navbar-customiza…
Devessier Feb 11, 2026
62abd18
test: update e2e test according to new navigation system
Devessier Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions packages/twenty-front/src/generated-metadata/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ export type CreateLogicFunctionInput = {

export type CreateNavigationMenuItemInput = {
folderId?: InputMaybe<Scalars['UUID']>;
link?: InputMaybe<Scalars['String']>;
name?: InputMaybe<Scalars['String']>;
position?: InputMaybe<Scalars['Int']>;
targetObjectMetadataId?: InputMaybe<Scalars['UUID']>;
Expand Down Expand Up @@ -1480,6 +1481,7 @@ export enum FeatureFlagKey {
IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED',
IS_JUNCTION_RELATIONS_ENABLED = 'IS_JUNCTION_RELATIONS_ENABLED',
IS_MARKETPLACE_ENABLED = 'IS_MARKETPLACE_ENABLED',
IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED = 'IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED',
IS_NAVIGATION_MENU_ITEM_ENABLED = 'IS_NAVIGATION_MENU_ITEM_ENABLED',
IS_NOTE_TARGET_MIGRATED = 'IS_NOTE_TARGET_MIGRATED',
IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED',
Expand Down Expand Up @@ -3200,6 +3202,7 @@ export type NavigationMenuItem = {
createdAt: Scalars['DateTime'];
folderId?: Maybe<Scalars['UUID']>;
id: Scalars['UUID'];
link?: Maybe<Scalars['String']>;
name?: Maybe<Scalars['String']>;
position: Scalars['Float'];
targetObjectMetadataId?: Maybe<Scalars['UUID']>;
Expand Down Expand Up @@ -4710,6 +4713,7 @@ export type UpdateLogicFunctionSourceInput = {

export type UpdateNavigationMenuItemInput = {
folderId?: InputMaybe<Scalars['UUID']>;
link?: InputMaybe<Scalars['String']>;
name?: InputMaybe<Scalars['String']>;
position?: InputMaybe<Scalars['Int']>;
};
Expand Down Expand Up @@ -6005,42 +6009,42 @@ export type GetLogicFunctionSourceCodeQueryVariables = Exact<{

export type GetLogicFunctionSourceCodeQuery = { __typename?: 'Query', getLogicFunctionSourceCode?: any | null };

export type NavigationMenuItemFieldsFragment = { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string };
export type NavigationMenuItemFieldsFragment = { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, link?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string };

export type NavigationMenuItemQueryFieldsFragment = { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string, targetRecordIdentifier?: { __typename?: 'RecordIdentifier', id: string, labelIdentifier: string, imageIdentifier?: string | null } | null };
export type NavigationMenuItemQueryFieldsFragment = { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, link?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string, targetRecordIdentifier?: { __typename?: 'RecordIdentifier', id: string, labelIdentifier: string, imageIdentifier?: string | null } | null };

export type CreateNavigationMenuItemMutationVariables = Exact<{
input: CreateNavigationMenuItemInput;
}>;


export type CreateNavigationMenuItemMutation = { __typename?: 'Mutation', createNavigationMenuItem: { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string } };
export type CreateNavigationMenuItemMutation = { __typename?: 'Mutation', createNavigationMenuItem: { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, link?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string } };

export type DeleteNavigationMenuItemMutationVariables = Exact<{
id: Scalars['UUID'];
}>;


export type DeleteNavigationMenuItemMutation = { __typename?: 'Mutation', deleteNavigationMenuItem: { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string } };
export type DeleteNavigationMenuItemMutation = { __typename?: 'Mutation', deleteNavigationMenuItem: { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, link?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string } };

export type UpdateNavigationMenuItemMutationVariables = Exact<{
input: UpdateOneNavigationMenuItemInput;
}>;


export type UpdateNavigationMenuItemMutation = { __typename?: 'Mutation', updateNavigationMenuItem: { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string } };
export type UpdateNavigationMenuItemMutation = { __typename?: 'Mutation', updateNavigationMenuItem: { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, link?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string } };

export type FindManyNavigationMenuItemsQueryVariables = Exact<{ [key: string]: never; }>;


export type FindManyNavigationMenuItemsQuery = { __typename?: 'Query', navigationMenuItems: Array<{ __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string, targetRecordIdentifier?: { __typename?: 'RecordIdentifier', id: string, labelIdentifier: string, imageIdentifier?: string | null } | null }> };
export type FindManyNavigationMenuItemsQuery = { __typename?: 'Query', navigationMenuItems: Array<{ __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, link?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string, targetRecordIdentifier?: { __typename?: 'RecordIdentifier', id: string, labelIdentifier: string, imageIdentifier?: string | null } | null }> };

export type FindOneNavigationMenuItemQueryVariables = Exact<{
id: Scalars['UUID'];
}>;


export type FindOneNavigationMenuItemQuery = { __typename?: 'Query', navigationMenuItem?: { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string, targetRecordIdentifier?: { __typename?: 'RecordIdentifier', id: string, labelIdentifier: string, imageIdentifier?: string | null } | null } | null };
export type FindOneNavigationMenuItemQuery = { __typename?: 'Query', navigationMenuItem?: { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, link?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string, targetRecordIdentifier?: { __typename?: 'RecordIdentifier', id: string, labelIdentifier: string, imageIdentifier?: string | null } | null } | null };

export type ObjectMetadataFieldsFragment = { __typename?: 'Object', id: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> };

Expand Down Expand Up @@ -7347,6 +7351,7 @@ export const NavigationMenuItemFieldsFragmentDoc = gql`
viewId
folderId
name
link
position
applicationId
createdAt
Expand Down
2 changes: 2 additions & 0 deletions packages/twenty-front/src/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,7 @@ export enum FeatureFlagKey {
IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED',
IS_JUNCTION_RELATIONS_ENABLED = 'IS_JUNCTION_RELATIONS_ENABLED',
IS_MARKETPLACE_ENABLED = 'IS_MARKETPLACE_ENABLED',
IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED = 'IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED',
IS_NAVIGATION_MENU_ITEM_ENABLED = 'IS_NAVIGATION_MENU_ITEM_ENABLED',
IS_NOTE_TARGET_MIGRATED = 'IS_NOTE_TARGET_MIGRATED',
IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED',
Expand Down Expand Up @@ -3105,6 +3106,7 @@ export type NavigationMenuItem = {
createdAt: Scalars['DateTime'];
folderId?: Maybe<Scalars['UUID']>;
id: Scalars['UUID'];
link?: Maybe<Scalars['String']>;
name?: Maybe<Scalars['String']>;
position: Scalars['Float'];
targetObjectMetadataId?: Maybe<Scalars['UUID']>;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
import { useTheme } from '@emotion/react';
import { useLingui } from '@lingui/react/macro';
import { useRecoilValue } from 'recoil';
import { IconFolder, IconLink } from 'twenty-ui/display';

import { CommandMenuPageInfoLayout } from '@/command-menu/components/CommandMenuPageInfoLayout';
import { commandMenuPageInfoState } from '@/command-menu/states/commandMenuPageInfoState';
import { commandMenuShouldFocusTitleInputComponentState } from '@/command-menu/states/commandMenuShouldFocusTitleInputComponentState';
import { StyledNavigationMenuItemIconContainer } from '@/navigation-menu-item/components/NavigationMenuItemIconContainer';
import { useUpdateFolderNameInDraft } from '@/navigation-menu-item/hooks/useUpdateFolderNameInDraft';
import { useUpdateLinkInDraft } from '@/navigation-menu-item/hooks/useUpdateLinkInDraft';
import { useWorkspaceSectionItems } from '@/navigation-menu-item/hooks/useWorkspaceSectionItems';
import { selectedNavigationMenuItemInEditModeState } from '@/navigation-menu-item/states/selectedNavigationMenuItemInEditModeState';
import { getNavigationMenuItemIconColors } from '@/navigation-menu-item/utils/getNavigationMenuItemIconColors';
import { TitleInput } from '@/ui/input/components/TitleInput';
import { useRecoilComponentState } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentState';

const ICON_CONFIG = {
folder: { Icon: IconFolder, colorKey: 'folder' },
link: { Icon: IconLink, colorKey: 'link' },
} as const;

export const CommandMenuFolderLinkInfo = ({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CommandMenuFolderLinkInfo component handles two different cases: folders and links.

Then, in the body of the component, we do different things based on the type.

Sometimes, it makes things clearer to duplicate code. Here, I would do one CommandMenuFolderInfo and one CommandMenuLinkInfo components. Most of the code would look the same, but duplication is fine when you reuse common bricks.

type,
}: {
type: 'folder' | 'link';
}) => {
const theme = useTheme();
const { t } = useLingui();
const commandMenuPageInfo = useRecoilValue(commandMenuPageInfoState);
const [shouldFocusTitleInput, setShouldFocusTitleInput] =
useRecoilComponentState(
commandMenuShouldFocusTitleInputComponentState,
commandMenuPageInfo.instanceId,
);
const selectedNavigationMenuItemInEditMode = useRecoilValue(
selectedNavigationMenuItemInEditModeState,
);
const items = useWorkspaceSectionItems();
const { updateFolderNameInDraft } = useUpdateFolderNameInDraft();
const { updateLinkInDraft } = useUpdateLinkInDraft();

const defaultLabel = type === 'folder' ? t`New folder` : t`Link label`;
const placeholder = type === 'folder' ? t`Folder name` : t`Link label`;

const selectedItem = selectedNavigationMenuItemInEditMode
? items.find(
(item) =>
item.itemType === type &&
item.id === selectedNavigationMenuItemInEditMode,
)
: undefined;

if (!selectedItem) return null;

const itemId = selectedItem.id;
const itemName = selectedItem.name ?? defaultLabel;

const handleChange = (text: string) => {
if (type === 'folder') {
updateFolderNameInDraft(itemId, text);
} else {
updateLinkInDraft(itemId, { name: text });
}
};

const handleSave = () => {
const trimmed = itemName.trim();
const finalName = trimmed.length > 0 ? trimmed : defaultLabel;

if (finalName !== itemName) {
if (type === 'folder') {
updateFolderNameInDraft(itemId, finalName);
} else {
updateLinkInDraft(itemId, { name: finalName });
}
}
};

const { Icon, colorKey } = ICON_CONFIG[type];

return (
<CommandMenuPageInfoLayout
icon={
<StyledNavigationMenuItemIconContainer
$backgroundColor={getNavigationMenuItemIconColors(theme)[colorKey]}
>
<Icon
size={theme.spacing(3.5)}
color={theme.grayScale.gray1}
stroke={theme.icon.stroke.md}
/>
</StyledNavigationMenuItemIconContainer>
}
title={
<TitleInput
instanceId={
type === 'folder' ? `folder-name-${itemId}` : `link-label-${itemId}`
}
sizeVariant="sm"
value={itemName}
onChange={handleChange}
placeholder={placeholder}
onEnter={handleSave}
onEscape={handleSave}
onClickOutside={handleSave}
onTab={handleSave}
onShiftTab={handleSave}
shouldFocus={shouldFocusTitleInput}
onFocus={() => setShouldFocusTitleInput(false)}
/>
}
label={type === 'link' ? t`link` : undefined}
/>
);
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { isNonEmptyString } from '@sniptt/guards';
import { type ReactNode } from 'react';
import { IconArrowUpRight, type IconComponent } from 'twenty-ui/display';
import { MenuItem } from 'twenty-ui/navigation';

import { useCommandMenuOnItemClick } from '@/command-menu/hooks/useCommandMenuOnItemClick';
import { isSelectedItemIdComponentFamilySelector } from '@/ui/layout/selectable-list/states/selectors/isSelectedItemIdComponentFamilySelector';
import { useRecoilComponentFamilyValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentFamilyValue';
import { type ReactNode } from 'react';
import { IconArrowUpRight, type IconComponent } from 'twenty-ui/display';
import { MenuItem } from 'twenty-ui/navigation';

export type CommandMenuItemProps = {
label: string;
Expand All @@ -15,6 +15,7 @@ export type CommandMenuItemProps = {
onClick?: () => void;
Icon?: IconComponent;
hotKeys?: string[];
LeftComponent?: ReactNode;
RightComponent?: ReactNode;
contextualTextPosition?: 'left' | 'right';
hasSubMenu?: boolean;
Expand All @@ -31,6 +32,7 @@ export const CommandMenuItem = ({
onClick,
Icon,
hotKeys,
LeftComponent,
RightComponent,
hasSubMenu = false,
isSubMenuOpened = false,
Expand All @@ -49,8 +51,9 @@ export const CommandMenuItem = ({

return (
<MenuItem
withIconContainer={true}
LeftIcon={Icon}
withIconContainer={!LeftComponent}
LeftIcon={LeftComponent ? undefined : Icon}
LeftComponent={LeftComponent}
text={label}
contextualText={description}
contextualTextPosition={contextualTextPosition}
Expand Down
Loading