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: v0.3.8.2 known issues (#4025)

Lucas.Xu3595de5e1293
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/callout/callout_block_component.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/callout/callout_block_component.dart
index b8e48c8c30..02c1b40b77 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/callout/callout_block_component.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/callout/callout_block_component.dart
@@ -37,7 +37,7 @@ Node calloutNode({
final attributes = {
CalloutBlockKeys.delta: (delta ?? Delta()).toJson(),
CalloutBlockKeys.icon: emoji,
- CalloutBlockKeys.backgroundColor: defaultColor?.toHex() ?? '#f2f2f2',
+ CalloutBlockKeys.backgroundColor: defaultColor?.toHex(),
};
return Node(
type: CalloutBlockKeys.type,
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart
index bbc17f472d..5e6a15417b 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart
@@ -118,6 +118,7 @@ class ImagePlaceholderState extends State<ImagePlaceholder> {
showFlowyMobileBottomSheet(
context,
title: LocaleKeys.editor_image.tr(),
+ isScrollControlled: true,
builder: (context) {
return ConstrainedBox(
constraints: const BoxConstraints(
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/upload_image_menu.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/upload_image_menu.dart
index 4523994af5..becbe80a81 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/upload_image_menu.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/upload_image_menu.dart
@@ -106,25 +106,31 @@ class _UploadImageMenuState extends State<UploadImageMenu> {
indicatorSize: TabBarIndicatorSize.label,
isScrollable: true,
overlayColor: MaterialStatePropertyAll(
- Theme.of(context).colorScheme.secondary,
+ PlatformExtension.isDesktop
+ ? Theme.of(context).colorScheme.secondary
+ : Colors.transparent,
),
padding: EdgeInsets.zero,
- tabs: values
- .map(
- (e) => FlowyHover(
- style: const HoverStyle(borderRadius: BorderRadius.zero),
- child: Padding(
- padding: EdgeInsets.only(
- left: 12.0,
- right: 12.0,
- bottom: 8.0,
- top: PlatformExtension.isMobile ? 0 : 8.0,
- ),
- child: FlowyText(e.description),
- ),
+ tabs: values.map(
+ (e) {
+ final child = Padding(
+ padding: EdgeInsets.only(
+ left: 12.0,
+ right: 12.0,
+ bottom: 8.0,
+ top: PlatformExtension.isMobile ? 0 : 8.0,
),
- )
- .toList(),
+ child: FlowyText(e.description),
+ );
+ if (PlatformExtension.isDesktop) {
+ return FlowyHover(
+ style: const HoverStyle(borderRadius: BorderRadius.zero),
+ child: child,
+ );
+ }
+ return child;
+ },
+ ).toList(),
),
const Divider(
height: 2,
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_item/mobile_add_block_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_item/mobile_add_block_toolbar_item.dart
index eed1a06794..b1e26ad3a9 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_item/mobile_add_block_toolbar_item.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_item/mobile_add_block_toolbar_item.dart
@@ -166,7 +166,6 @@ final _addBlockMenuItems = [
// callout
BlockMenuItem(
blockType: CalloutBlockKeys.type,
- // FIXME: update icon
icon: const Icon(Icons.note_rounded),
label: LocaleKeys.document_plugins_callout.tr(),
isSelected: _unSelectable,
@@ -261,6 +260,7 @@ extension on EditorState {
);
}
await apply(transaction);
+ service.keyboardService?.enableKeyBoard(selection);
}
Future<void> insertMathEquation(
@@ -323,5 +323,6 @@ extension on EditorState {
Position(path: insertedPath.next),
);
await apply(transaction);
+ service.keyboardService?.enableKeyBoard(selection);
}
}
diff --git a/frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart b/frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart
index 19f79f0078..a606e4eb79 100644
--- a/frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart
+++ b/frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart
@@ -41,8 +41,9 @@ extension FlowyPluginExtension on FlowyPlugin {
extension ViewExtension on ViewPB {
Widget renderThumbnail({Color? iconColor}) {
- const Widget widget = FlowySvg(FlowySvgs.document_s);
- return widget;
+ return const FlowySvg(
+ FlowySvgs.document_s,
+ );
}
Widget defaultIcon() {
diff --git a/frontend/appflowy_flutter/pubspec.lock b/frontend/appflowy_flutter/pubspec.lock
index 28fd4ec79e..fe7291b5fa 100644
--- a/frontend/appflowy_flutter/pubspec.lock
+++ b/frontend/appflowy_flutter/pubspec.lock
@@ -54,8 +54,8 @@ packages:
dependency: "direct main"
description:
path: "."
- ref: "31acaff"
- resolved-ref: "31acaff4f0bcd36a2946c9351dc1b5b5601b3994"
+ ref: a05f31b
+ resolved-ref: a05f31b600655192909c6d3e87c628fe2f0807c4
url: "https://github.com/AppFlowy-IO/appflowy-editor.git"
source: git
version: "2.0.0"
diff --git a/frontend/appflowy_flutter/pubspec.yaml b/frontend/appflowy_flutter/pubspec.yaml
index f9fc7ce563..39368f31d4 100644
--- a/frontend/appflowy_flutter/pubspec.yaml
+++ b/frontend/appflowy_flutter/pubspec.yaml
@@ -47,7 +47,7 @@ dependencies:
appflowy_editor:
git:
url: https://github.com/AppFlowy-IO/appflowy-editor.git
- ref: "31acaff"
+ ref: "a05f31b"
appflowy_popover:
path: packages/appflowy_popover