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: launch review issues (#3413)

Lucas.Xu3426e5b53ef4
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 7ed136bc51..213c7aa103 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
@@ -87,7 +87,13 @@ class _AlignmentButtonsState extends State<_AlignmentButtons> {
color: Theme.of(context).colorScheme.onTertiary,
borderRadius: const BorderRadius.all(Radius.circular(4)),
),
- popupBuilder: (_) => _AlignButtons(onAlignChanged: widget.onAlignChanged),
+ popupBuilder: (_) {
+ keepEditorFocusNotifier.value += 1;
+ return _AlignButtons(onAlignChanged: widget.onAlignChanged);
+ },
+ onClose: () {
+ keepEditorFocusNotifier.value -= 1;
+ },
child: widget.child,
);
}
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/outline/outline_block_component.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/outline/outline_block_component.dart
index 63400288c4..108cb4de9b 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/outline/outline_block_component.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/outline/outline_block_component.dart
@@ -167,16 +167,21 @@ class OutlineItemWidget extends StatelessWidget {
style: HoverStyle(
hoverColor: Theme.of(context).hoverColor,
),
- child: GestureDetector(
- onTap: () => scrollToBlock(context),
- child: Container(
- padding: EdgeInsets.only(left: node.leftIndent),
- child: Text(
- node.outlineItemText,
- style: style,
+ builder: (context, onHover) {
+ return GestureDetector(
+ onTap: () => scrollToBlock(context),
+ child: Container(
+ padding: EdgeInsets.only(left: node.leftIndent),
+ child: Text(
+ node.outlineItemText,
+ style: style.copyWith(
+ color:
+ onHover ? Theme.of(context).colorScheme.onSecondary : null,
+ ),
+ ),
),
- ),
- ),
+ );
+ },
);
}
diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/create_file_setting.dart b/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/create_file_setting.dart
index 7f88827928..7a98e65b3d 100644
--- a/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/create_file_setting.dart
+++ b/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/create_file_setting.dart
@@ -1,5 +1,7 @@
+import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_appearance/theme_setting_entry_template.dart';
+import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -15,14 +17,18 @@ class CreateFileSettings extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ThemeSettingEntryTemplateWidget(
- label: 'Show rename dialog when creating a new file',
+ label:
+ LocaleKeys.settings_appearance_showNamingDialogWhenCreatingPage.tr(),
trailing: [
BlocProvider.value(
value: cubit,
child: BlocBuilder<CreateFileSettingsCubit, bool>(
builder: (context, state) {
+ _prevSetting = state;
return Switch(
value: state,
+ splashRadius: 0,
+ activeColor: Theme.of(context).colorScheme.primary,
onChanged: (value) {
cubit.toggle(value: value);
_prevSetting = value;
diff --git a/frontend/resources/translations/en.json b/frontend/resources/translations/en.json
index a74803a7d8..a52e28f669 100644
--- a/frontend/resources/translations/en.json
+++ b/frontend/resources/translations/en.json
@@ -289,7 +289,8 @@
},
"theme": "Theme",
"builtInsLabel": "Built-in Themes",
- "pluginsLabel": "Plugins"
+ "pluginsLabel": "Plugins",
+ "showNamingDialogWhenCreatingPage": "Show naming dialog when creating a page"
},
"files": {
"copy": "Copy",