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
This commit is contained in:
Lucas Bordeau
2025-07-10 17:47:09 +02:00
committed by GitHub
parent bed2c640c5
commit fd13bb0258
3 changed files with 35 additions and 13 deletions

View File

@ -79,6 +79,10 @@ export const useRecordTitleCell = () => {
prefix: containerType, prefix: containerType,
}), }),
}, },
globalHotkeysConfig: {
enableGlobalHotkeysConflictingWithKeyboard: false,
enableGlobalHotkeysWithModifiers: false,
},
}); });
const recordTitleCellId = getRecordFieldInputInstanceId({ const recordTitleCellId = getRecordFieldInputInstanceId({

View File

@ -60,6 +60,15 @@ const StyledLightIconButton = styled(LightIconButton)<{
: 'transparent'}; : '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) => const convertIconKeyToLabel = (iconKey: string) =>
iconKey.replace(/[A-Z]/g, (letter) => ` ${letter}`).trim(); iconKey.replace(/[A-Z]/g, (letter) => ` ${letter}`).trim();
@ -84,18 +93,20 @@ const IconPickerIcon = ({
); );
return ( return (
<SelectableListItem itemId={iconKey} onEnter={onClick}> <StyledMatrixItem>
<StyledLightIconButton <SelectableListItem itemId={iconKey} onEnter={onClick}>
key={iconKey} <StyledLightIconButton
aria-label={convertIconKeyToLabel(iconKey)} key={iconKey}
size="medium" aria-label={convertIconKeyToLabel(iconKey)}
title={iconKey} size="medium"
isSelected={iconKey === selectedIconKey || !!isSelectedItemId} title={iconKey}
isFocused={iconKey === focusedIconKey} isSelected={iconKey === selectedIconKey || !!isSelectedItemId}
Icon={Icon} isFocused={iconKey === focusedIconKey}
onClick={onClick} Icon={Icon}
/> onClick={onClick}
</SelectableListItem> />
</SelectableListItem>
</StyledMatrixItem>
); );
}; };

View File

@ -50,7 +50,14 @@ export const useOpenDropdown = () => {
type: FocusComponentType.DROPDOWN, type: FocusComponentType.DROPDOWN,
instanceId: dropdownComponentInstanceId, instanceId: dropdownComponentInstanceId,
}, },
globalHotkeysConfig: args?.globalHotkeysConfig ?? undefined, globalHotkeysConfig: {
enableGlobalHotkeysConflictingWithKeyboard:
args?.globalHotkeysConfig
?.enableGlobalHotkeysConflictingWithKeyboard ?? false,
enableGlobalHotkeysWithModifiers:
args?.globalHotkeysConfig?.enableGlobalHotkeysWithModifiers ??
false,
},
}); });
}, },
[ [