Board improvements (#3694)

* New board improvements

* Improve board

* Fix
This commit is contained in:
Charles Bochet
2024-01-30 15:24:03 +01:00
committed by GitHub
parent 511627ccb8
commit f68de1a299
29 changed files with 205 additions and 54 deletions

View File

@ -94,7 +94,7 @@ export const DoubleTextInput = ({
);
useScopedHotkeys(
Key.Escape,
[Key.Escape],
() => {
onEscape({
firstValue: firstInternalValue,

View File

@ -2,6 +2,7 @@ import { useState } from 'react';
import { HotkeysEvent } from 'react-hotkeys-hook/dist/types';
import TextareaAutosize from 'react-textarea-autosize';
import styled from '@emotion/styled';
import { Key } from 'ts-key-enum';
import { IconArrowRight } from '@/ui/display/icon/index';
import { Button } from '@/ui/input/button/components/Button';
@ -151,7 +152,7 @@ export const AutosizeTextInput = ({
);
useScopedHotkeys(
'esc',
Key.Escape,
(event: KeyboardEvent) => {
if (!isFocused) {
return;

View File

@ -94,7 +94,7 @@ export const Dropdown = ({
});
useScopedHotkeys(
Key.Escape,
[Key.Escape],
() => {
closeDropdown();
},

View File

@ -66,7 +66,10 @@ export const RightDrawer = () => {
useScopedHotkeys(
[Key.Escape],
() => closeRightDrawer(),
() => {
closeRightDrawer();
},
RightDrawerHotkeyScope.RightDrawer,
[setIsRightDrawerOpen],
);

View File

@ -4,4 +4,5 @@ export enum AppHotkeyScope {
CommandMenu = 'command-menu',
CommandMenuOpen = 'command-menu-open',
KeyboardShortcutMenu = 'keyboard-shortcut-menu',
KeyboardShortcutMenuOpen = 'keyboard-shortcut-menu-open',
}