Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
feat(shortcuts): Add Shortcuts to Help Menu (#1870)
Aman Negi2451d3188c77
diff --git a/frontend/appflowy_flutter/assets/translations/en.json b/frontend/appflowy_flutter/assets/translations/en.jsonindex 50f04014f7..07ffbfa223 100644--- a/frontend/appflowy_flutter/assets/translations/en.json+++ b/frontend/appflowy_flutter/assets/translations/en.json@@ -71,6 +71,7 @@},"dialogCreatePageNameHint": "Page name","questionBubble": {+ "shortcuts": "Shortcuts","whatsNew": "What's new?","help": "Help & Support","debug": {diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart b/frontend/appflowy_flutter/lib/workspace/presentation/widgets/float_bubble/question_bubble.dartindex 054af91c79..89b2976bc7 100644--- a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart+++ b/frontend/appflowy_flutter/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart@@ -64,6 +64,10 @@ class BubbleActionList extends StatelessWidget {case BubbleAction.debug:_DebugToast().show();break;+ case BubbleAction.shortcuts:+ _launchURL(+ "https://github.com/AppFlowy-IO/AppFlowy-Docs/blob/main/essential-documentation/shortcuts.md");+ break;}}@@ -160,7 +164,7 @@ class FlowyVersionDescription extends CustomActionCell {}}-enum BubbleAction { whatsNews, help, debug }+enum BubbleAction { whatsNews, help, debug, shortcuts }class BubbleActionWrapper extends ActionCell {final BubbleAction inner;@@ -182,6 +186,8 @@ extension QuestionBubbleExtension on BubbleAction {return LocaleKeys.questionBubble_help.tr();case BubbleAction.debug:return LocaleKeys.questionBubble_debug_name.tr();+ case BubbleAction.shortcuts:+ return LocaleKeys.questionBubble_shortcuts.tr();}}@@ -193,6 +199,8 @@ extension QuestionBubbleExtension on BubbleAction {return '👥';case BubbleAction.debug:return '🐛';+ case BubbleAction.shortcuts:+ return '⌨️';}}}diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/shortcut_event/built_in_shortcut_events.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/shortcut_event/built_in_shortcut_events.dartindex bb2dfe128b..6c1c7bc259 100644--- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/shortcut_event/built_in_shortcut_events.dart+++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/shortcut_event/built_in_shortcut_events.dart@@ -50,14 +50,14 @@ List<ShortcutEvent> builtInShortcutEvents = [handler: cursorDownSelect,),ShortcutEvent(- key: 'Cursor down select',+ key: 'Cursor left word select',command: 'shift+alt+arrow left',windowsCommand: 'shift+alt+arrow left',linuxCommand: 'shift+alt+arrow left',handler: cursorLeftWordSelect,),ShortcutEvent(- key: 'Cursor down select',+ key: 'Cursor right word select',command: 'shift+alt+arrow right',windowsCommand: 'shift+alt+arrow right',linuxCommand: 'shift+alt+arrow right',