This PR fixes many small bugs around the recent hotkey scope refactor.

- Removed unused ActionBar files
- Created components CommandMenuOpenContainer and
KeyboardShortcutMenuOpenContent to avoid mounting listeners when not
needed
- Added DEFAULT_CELL_SCOPE where missing in some field inputs
- Called setHotkeyScopeAndMemorizePreviousScope instead of
setHotkeyScope in new useOpenFieldInputEditMode hook
- Broke down RecordTableBodyUnselectEffect into multiple simpler effect
components that are mounted only when needed to avoid listening for
keyboard and clickoutside event
- Re-implemented recently deleted table cell soft focus component logic
into RecordTableCellDisplayMode
- Created component selector isAtLeastOneTableRowSelectedSelector
- Drill down hotkey scope when opening a dropdown
- Improved debug logs
This commit is contained in:
Lucas Bordeau
2025-04-09 18:34:31 +02:00
committed by GitHub
parent 9f4e8c046f
commit 2b77f598b2
25 changed files with 362 additions and 194 deletions

View File

@ -140,7 +140,7 @@ export const Dropdown = ({
dropdownHotkeyScope,
);
toggleDropdown();
toggleDropdown(dropdownHotkeyScope);
onClickOutside?.();
},
[dropdownId, dropdownHotkeyScope, onClickOutside, toggleDropdown],

View File

@ -83,11 +83,11 @@ export const useDropdown = (dropdownId?: string) => {
],
);
const toggleDropdown = () => {
const toggleDropdown = (dropdownHotkeyScopeFromProps?: HotkeyScope) => {
if (isDropdownOpen) {
closeDropdown();
} else {
openDropdown();
openDropdown(dropdownHotkeyScopeFromProps);
}
};