From fd13bb0258615e5a257aed11f3bc112af72a685f Mon Sep 17 00:00:00 2001 From: Lucas Bordeau Date: Thu, 10 Jul 2025 17:47:09 +0200 Subject: [PATCH] Fixes for production (#13164) This PR fixes two bugs : - Some important push item to focus stack calls were setting global hotkey conflicting keys to true (like open dropdown) - Icon picker matrix items were broken --- .../hooks/useRecordTitleCell.tsx | 4 +++ .../ui/input/components/IconPicker.tsx | 35 ++++++++++++------- .../layout/dropdown/hooks/useOpenDropdown.ts | 9 ++++- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-title-cell/hooks/useRecordTitleCell.tsx b/packages/twenty-front/src/modules/object-record/record-title-cell/hooks/useRecordTitleCell.tsx index 060e482a3..7490f053f 100644 --- a/packages/twenty-front/src/modules/object-record/record-title-cell/hooks/useRecordTitleCell.tsx +++ b/packages/twenty-front/src/modules/object-record/record-title-cell/hooks/useRecordTitleCell.tsx @@ -79,6 +79,10 @@ export const useRecordTitleCell = () => { prefix: containerType, }), }, + globalHotkeysConfig: { + enableGlobalHotkeysConflictingWithKeyboard: false, + enableGlobalHotkeysWithModifiers: false, + }, }); const recordTitleCellId = getRecordFieldInputInstanceId({ diff --git a/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx b/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx index de15f553a..0595ae379 100644 --- a/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx +++ b/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx @@ -60,6 +60,15 @@ const StyledLightIconButton = styled(LightIconButton)<{ : 'transparent'}; `; +const StyledMatrixItem = styled.div` + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + box-sizing: border-box; +`; + const convertIconKeyToLabel = (iconKey: string) => iconKey.replace(/[A-Z]/g, (letter) => ` ${letter}`).trim(); @@ -84,18 +93,20 @@ const IconPickerIcon = ({ ); return ( - - - + + + + + ); }; diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useOpenDropdown.ts b/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useOpenDropdown.ts index 9059471ef..61ac9968f 100644 --- a/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useOpenDropdown.ts +++ b/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useOpenDropdown.ts @@ -50,7 +50,14 @@ export const useOpenDropdown = () => { type: FocusComponentType.DROPDOWN, instanceId: dropdownComponentInstanceId, }, - globalHotkeysConfig: args?.globalHotkeysConfig ?? undefined, + globalHotkeysConfig: { + enableGlobalHotkeysConflictingWithKeyboard: + args?.globalHotkeysConfig + ?.enableGlobalHotkeysConflictingWithKeyboard ?? false, + enableGlobalHotkeysWithModifiers: + args?.globalHotkeysConfig?.enableGlobalHotkeysWithModifiers ?? + false, + }, }); }, [