diff --git a/frontend/appflowy_flutter/assets/translations/en.json b/frontend/appflowy_flutter/assets/translations/en.json index 9542927c1c..cb1d2ee285 100644 --- a/frontend/appflowy_flutter/assets/translations/en.json +++ b/frontend/appflowy_flutter/assets/translations/en.json @@ -90,7 +90,8 @@ "name": "Debug Info", "success": "Copied debug info to clipboard!", "fail": "Unable to copy debug info to clipboard" - } + }, + "feedback": "Feedback" }, "menuAppHeader": { "addPageTooltip": "Quickly add a page inside", 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.dart index 06dce358da..4cacd508c9 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 @@ -3,6 +3,7 @@ import 'package:appflowy/workspace/presentation/home/toast.dart'; import 'package:appflowy/workspace/presentation/widgets/pop_up_action.dart'; import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/size.dart'; import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/text.dart'; @@ -78,6 +79,11 @@ class BubbleActionList extends StatelessWidget { "https://appflowy.gitbook.io/docs/essential-documentation/markdown", ); break; + case BubbleAction.github: + _launchURL( + 'https://github.com/AppFlowy-IO/AppFlowy/issues/new/choose', + ); + break; } } @@ -169,14 +175,14 @@ class FlowyVersionDescription extends CustomActionCell { } } -enum BubbleAction { whatsNews, help, debug, shortcuts, markdown } +enum BubbleAction { whatsNews, help, debug, shortcuts, markdown, github } class BubbleActionWrapper extends ActionCell { final BubbleAction inner; BubbleActionWrapper(this.inner); @override - Widget? leftIcon(Color iconColor) => FlowyText.regular(inner.emoji); + Widget? leftIcon(Color iconColor) => inner.emoji; @override String get name => inner.name; @@ -195,21 +201,31 @@ extension QuestionBubbleExtension on BubbleAction { return LocaleKeys.questionBubble_shortcuts.tr(); case BubbleAction.markdown: return LocaleKeys.questionBubble_markdown.tr(); + case BubbleAction.github: + return LocaleKeys.questionBubble_feedback.tr(); } } - String get emoji { + Widget get emoji { switch (this) { case BubbleAction.whatsNews: - return '🆕'; + return const FlowyText.regular('🆕'); case BubbleAction.help: - return '👥'; + return const FlowyText.regular('👥'); case BubbleAction.debug: - return '🐛'; + return const FlowyText.regular('🐛'); case BubbleAction.shortcuts: - return '📋'; + return const FlowyText.regular('📋'); case BubbleAction.markdown: - return '✨'; + return const FlowyText.regular('✨'); + case BubbleAction.github: + return Padding( + padding: const EdgeInsets.all(3.0), + child: svgWidget( + 'login/github-mark', + size: const Size.square(12), + ), + ); } } }