From c35b03f48006bc7de812dd6595a0b84808a121fb Mon Sep 17 00:00:00 2001 From: Naumov Alexey Date: Thu, 3 Feb 2022 18:53:51 +0300 Subject: [PATCH 1/2] feat(plugin-info): CB-1450 navigation tree shortcut --- .../src/Shortcuts/SHORTCUTS_DATA.ts | 15 +++++++++---- .../src/Shortcuts/ShortcutsDialog.tsx | 22 +++++++++++++------ webapp/packages/plugin-help/src/locales/en.ts | 2 ++ webapp/packages/plugin-help/src/locales/it.ts | 2 ++ webapp/packages/plugin-help/src/locales/ru.ts | 2 ++ webapp/packages/plugin-help/src/locales/zh.ts | 2 ++ 6 files changed, 34 insertions(+), 11 deletions(-) diff --git a/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts b/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts index cd66ec14ca..de5d5d8ec1 100644 --- a/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts +++ b/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts @@ -13,6 +13,10 @@ export const DATA_VIEWER_SHORTCUTS: IShortcut[] = [ label: 'data_viewer_shortcut_start_inline_editing', code: ['Enter', 'Backspace'], }, + { + label: 'data_viewer_shortcut_revert_inline_editor_changes', + code: ['Escape'], + }, { label: 'data_viewer_shortcut_add_new_row', code: ['Alt + Insert'], @@ -25,10 +29,6 @@ export const DATA_VIEWER_SHORTCUTS: IShortcut[] = [ label: 'data_viewer_shortcut_delete_row', code: ['Delete'], }, - { - label: 'data_viewer_shortcut_revert_inline_editor_changes', - code: ['Escape'], - }, { label: 'data_viewer_shortcut_past_value', code: ['Ctrl + V'], @@ -60,4 +60,11 @@ export const SQL_EDITOR_SHORTCUTS: IShortcut[] = [ label: 'sql_editor_shortcut_open_editor_in_new_tab', code: ['Alt + T'], }, +]; + +export const NAVIGATION_TREE_SHORTCUTS: IShortcut[] = [ + { + label: 'navigation_tree_enable_filter', + code: ['Ctrl + F'], + }, ]; \ No newline at end of file diff --git a/webapp/packages/plugin-help/src/Shortcuts/ShortcutsDialog.tsx b/webapp/packages/plugin-help/src/Shortcuts/ShortcutsDialog.tsx index 314ee7291b..9f522c48d2 100644 --- a/webapp/packages/plugin-help/src/Shortcuts/ShortcutsDialog.tsx +++ b/webapp/packages/plugin-help/src/Shortcuts/ShortcutsDialog.tsx @@ -14,19 +14,16 @@ import { useTranslate } from '@cloudbeaver/core-localization'; import { useStyles } from '@cloudbeaver/core-theming'; import { Shortcut } from './Shortcut'; -import { DATA_VIEWER_SHORTCUTS, SQL_EDITOR_SHORTCUTS } from './SHORTCUTS_DATA'; +import { DATA_VIEWER_SHORTCUTS, NAVIGATION_TREE_SHORTCUTS, SQL_EDITOR_SHORTCUTS } from './SHORTCUTS_DATA'; const style = css` - CommonDialogWrapper { - max-width: 1100px; - } Button { margin-left: auto; } Container { composes: theme-typography--body2 from global; - gap: 16px; + gap: 32px; } Group { gap: 16px; @@ -34,6 +31,9 @@ const style = css` GroupTitle, Group { padding: 0 !important; } + GroupTitle { + font-weight: bold; + } `; export const ShortcutsDialog: DialogComponent = function ShortcutsDialog({ @@ -54,7 +54,7 @@ export const ShortcutsDialog: DialogComponent = function ShortcutsDialog({ onReject={rejectDialog} > - + Data Viewer @@ -62,7 +62,7 @@ export const ShortcutsDialog: DialogComponent = function ShortcutsDialog({ {DATA_VIEWER_SHORTCUTS.map(shortcut => )} - + SQL Editor @@ -70,6 +70,14 @@ export const ShortcutsDialog: DialogComponent = function ShortcutsDialog({ {SQL_EDITOR_SHORTCUTS.map(shortcut => )} + + + + Navigation Tree + + + {NAVIGATION_TREE_SHORTCUTS.map(shortcut => )} + ); diff --git a/webapp/packages/plugin-help/src/locales/en.ts b/webapp/packages/plugin-help/src/locales/en.ts index 69695c68e9..7bf10aa3b3 100644 --- a/webapp/packages/plugin-help/src/locales/en.ts +++ b/webapp/packages/plugin-help/src/locales/en.ts @@ -14,4 +14,6 @@ export default [ ['sql_editor_shortcut_execute_script', 'Execute script'], ['sql_editor_shortcut_show_execution_plan', 'Show Execution plan'], ['sql_editor_shortcut_open_editor_in_new_tab', 'Open SQL Editor in the separate browser Tab'], + + ['navigation_tree_shortcut_enable_filter', 'Enable filtering'], ]; diff --git a/webapp/packages/plugin-help/src/locales/it.ts b/webapp/packages/plugin-help/src/locales/it.ts index 69695c68e9..7bf10aa3b3 100644 --- a/webapp/packages/plugin-help/src/locales/it.ts +++ b/webapp/packages/plugin-help/src/locales/it.ts @@ -14,4 +14,6 @@ export default [ ['sql_editor_shortcut_execute_script', 'Execute script'], ['sql_editor_shortcut_show_execution_plan', 'Show Execution plan'], ['sql_editor_shortcut_open_editor_in_new_tab', 'Open SQL Editor in the separate browser Tab'], + + ['navigation_tree_shortcut_enable_filter', 'Enable filtering'], ]; diff --git a/webapp/packages/plugin-help/src/locales/ru.ts b/webapp/packages/plugin-help/src/locales/ru.ts index c93b206974..103a963d09 100644 --- a/webapp/packages/plugin-help/src/locales/ru.ts +++ b/webapp/packages/plugin-help/src/locales/ru.ts @@ -14,4 +14,6 @@ export default [ ['sql_editor_shortcut_execute_script', 'Выполнить скрипт'], ['sql_editor_shortcut_show_execution_plan', 'Показать план выполнения'], ['sql_editor_shortcut_open_editor_in_new_tab', 'Открыть SQL редактор в новой бразуерной вкладке'], + + ['navigation_tree_shortcut_enable_filter', 'Включить фильтрацию'], ]; diff --git a/webapp/packages/plugin-help/src/locales/zh.ts b/webapp/packages/plugin-help/src/locales/zh.ts index 69695c68e9..7bf10aa3b3 100644 --- a/webapp/packages/plugin-help/src/locales/zh.ts +++ b/webapp/packages/plugin-help/src/locales/zh.ts @@ -14,4 +14,6 @@ export default [ ['sql_editor_shortcut_execute_script', 'Execute script'], ['sql_editor_shortcut_show_execution_plan', 'Show Execution plan'], ['sql_editor_shortcut_open_editor_in_new_tab', 'Open SQL Editor in the separate browser Tab'], + + ['navigation_tree_shortcut_enable_filter', 'Enable filtering'], ]; From cf6b7eef0597ed0c1f71a40b5bf04ef164837cd0 Mon Sep 17 00:00:00 2001 From: Naumov Alexey Date: Thu, 3 Feb 2022 18:55:18 +0300 Subject: [PATCH 2/2] fix(plugin-info): CB-1450 spelling --- webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts b/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts index de5d5d8ec1..382011a29e 100644 --- a/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts +++ b/webapp/packages/plugin-help/src/Shortcuts/SHORTCUTS_DATA.ts @@ -64,7 +64,7 @@ export const SQL_EDITOR_SHORTCUTS: IShortcut[] = [ export const NAVIGATION_TREE_SHORTCUTS: IShortcut[] = [ { - label: 'navigation_tree_enable_filter', + label: 'navigation_tree_shortcut_enable_filter', code: ['Ctrl + F'], }, ]; \ No newline at end of file