Skip to content

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.

fix: added missing hover tooltip to toolbar item (#3786)

Kritarth Sharma3c7e636b651a
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/align_toolbar_item/align_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/align_toolbar_item/align_toolbar_item.dart
index bd88f2fa8a..b2ac8d189b 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/align_toolbar_item/align_toolbar_item.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/align_toolbar_item/align_toolbar_item.dart
@@ -36,10 +36,13 @@ final alignToolbarItem = ToolbarItem(
final child = MouseRegion(
cursor: SystemMouseCursors.click,
- child: FlowySvg(
- data,
- size: const Size.square(20),
- color: isHighlight ? highlightColor : Colors.white,
+ child: FlowyTooltip(
+ message: LocaleKeys.document_plugins_optionAction_align.tr(),
+ child: FlowySvg(
+ data,
+ size: const Size.square(16),
+ color: isHighlight ? highlightColor : Colors.white,
+ ),
),
);
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/font/customize_font_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/font/customize_font_toolbar_item.dart
index ea041a6cdd..3c7fae3aa0 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/font/customize_font_toolbar_item.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/font/customize_font_toolbar_item.dart
@@ -1,8 +1,11 @@
import 'package:appflowy/generated/flowy_svgs.g.dart';
+import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart';
import 'package:appflowy_backend/log.dart';
import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
import 'package:appflowy_popover/appflowy_popover.dart';
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
import 'package:flutter/material.dart';
final customizeFontToolbarItem = ToolbarItem(
@@ -34,12 +37,15 @@ final customizeFontToolbarItem = ToolbarItem(
onResetFont: () async => await editorState.formatDelta(selection, {
AppFlowyRichTextKeys.fontFamily: null,
}),
- child: const Padding(
- padding: EdgeInsets.symmetric(horizontal: 4.0),
- child: FlowySvg(
- FlowySvgs.font_family_s,
- size: Size.square(16.0),
- color: Colors.white,
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 4.0),
+ child: FlowyTooltip(
+ message: LocaleKeys.document_plugins_fonts.tr(),
+ child: const FlowySvg(
+ FlowySvgs.font_family_s,
+ size: Size.square(16.0),
+ color: Colors.white,
+ ),
),
),
),
diff --git a/frontend/resources/translations/en.json b/frontend/resources/translations/en.json
index f504956308..41a9e9a713 100644
--- a/frontend/resources/translations/en.json
+++ b/frontend/resources/translations/en.json
@@ -616,6 +616,7 @@
"smartEditDisabled": "Connect OpenAI in Settings",
"discardResponse": "Do you want to discard the AI responses?",
"createInlineMathEquation": "Create equation",
+ "fonts": "Fonts",
"toggleList": "Toggle list",
"quoteList":"Quote list",
"numberedList":"Numbered list",