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
fix: some slash menu issues (#7501)
Morn44945b2912fc
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu.dart b/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu.dartindex b65c9f9347..07eceac51a 100644--- a/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu.dart+++ b/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu.dart@@ -186,8 +186,9 @@ class MobileSelectionMenu extends SelectionMenuService {final bottomRight = rect.bottomRight;final topRight = rect.topRight;var offset = bottomRight + menuOffset;+ final limitX = editorWidth - menuWidth + editorOffset.dx;_offset = Offset(- offset.dx,+ min(offset.dx, limitX),offset.dy,);@@ -196,10 +197,9 @@ class MobileSelectionMenu extends SelectionMenuService {offset = topRight - menuOffset;_alignment = Alignment.bottomLeft;- final limitX = editorWidth - menuWidth;_offset = Offset(- min(offset.dx, limitX),- MediaQuery.of(context).size.height - offset.dy,+ offset.dx,+ editorOffset.dy + editorHeight - offset.dy,);}@@ -210,7 +210,6 @@ class MobileSelectionMenu extends SelectionMenuService {: Alignment.bottomRight;final x = editorWidth - _offset.dx + editorOffset.dx;- final limitX = editorWidth - menuWidth + editorOffset.dx;_offset = Offset(min(x, limitX),_offset.dy,diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_item_widget.dart b/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_item_widget.dartindex ae5b0b11ac..bdee8f1857 100644--- a/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_item_widget.dart+++ b/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_item_widget.dart@@ -36,9 +36,7 @@ class MobileSelectionMenuItemWidget extends StatelessWidget {),style: ButtonStyle(alignment: Alignment.centerLeft,- overlayColor: WidgetStateProperty.all(- style.selectionMenuItemSelectedColor,- ),+ overlayColor: WidgetStateProperty.all(Colors.transparent),backgroundColor: isSelected? WidgetStateProperty.all(style.selectionMenuItemSelectedColor,diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_widget.dart b/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_widget.dartindex ed080e6186..e259d49d52 100644--- a/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_widget.dart+++ b/frontend/appflowy_flutter/lib/mobile/presentation/selection_menu/mobile_selection_menu_widget.dart@@ -1,6 +1,8 @@import 'dart:math';+import 'package:appflowy/generated/locale_keys.g.dart';import 'package:appflowy_editor/appflowy_editor.dart';+import 'package:easy_localization/easy_localization.dart';import 'package:flutter/material.dart';import 'mobile_selection_menu_item.dart';@@ -314,15 +316,32 @@ class _MobileSelectionMenuWidgetState extends State<MobileSelectionMenuWidget> {}Widget _buildNoResultsWidget(BuildContext context) {- return const Padding(- padding: EdgeInsets.all(8.0),+ return DecoratedBox(+ decoration: BoxDecoration(+ color: Theme.of(context).cardColor,+ boxShadow: [+ BoxShadow(+ blurRadius: 5,+ spreadRadius: 1,+ color: Colors.black.withValues(alpha: 0.1),+ ),+ ],+ borderRadius: BorderRadius.circular(12.0),+ ),child: SizedBox(- width: 140,- child: Material(- child: Text(- "No results",- style: TextStyle(fontSize: 18.0, color: Colors.grey),- textAlign: TextAlign.center,+ width: 240,+ height: 48,+ child: Padding(+ padding: const EdgeInsets.all(6.0),+ child: Material(+ color: Colors.transparent,+ child: Center(+ child: Text(+ LocaleKeys.inlineActions_noResults.tr(),+ style: TextStyle(fontSize: 18.0, color: Color(0x801F2225)),+ textAlign: TextAlign.center,+ ),+ ),),),),diff --git a/frontend/appflowy_flutter/pubspec.lock b/frontend/appflowy_flutter/pubspec.lockindex 704ada89e6..7537db010a 100644--- a/frontend/appflowy_flutter/pubspec.lock+++ b/frontend/appflowy_flutter/pubspec.lock@@ -90,8 +90,8 @@ packages:dependency: "direct main"description:path: "."- ref: "5841b4c"- resolved-ref: "5841b4c1bab170da66c52c60977690f2817b8fc4"+ ref: "8db5bdf"+ resolved-ref: "8db5bdff8f2f6258800660123452ddbde1c14059"url: "https://github.com/AppFlowy-IO/appflowy-editor.git"source: gitversion: "5.1.0"diff --git a/frontend/appflowy_flutter/pubspec.yaml b/frontend/appflowy_flutter/pubspec.yamlindex 4d185d1fca..c537953906 100644--- a/frontend/appflowy_flutter/pubspec.yaml+++ b/frontend/appflowy_flutter/pubspec.yaml@@ -180,7 +180,7 @@ dependency_overrides:appflowy_editor:git:url: https://github.com/AppFlowy-IO/appflowy-editor.git- ref: "5841b4c"+ ref: "8db5bdf"appflowy_editor_plugins:git: