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: simple tests on mobile (#7102)

Lucasb2ca5c77f697
diff --git a/frontend/appflowy_flutter/integration_test/mobile/document/simple_table_test.dart b/frontend/appflowy_flutter/integration_test/mobile/document/simple_table_test.dart
index fcd5494218..d6ffc5d57f 100644
--- a/frontend/appflowy_flutter/integration_test/mobile/document/simple_table_test.dart
+++ b/frontend/appflowy_flutter/integration_test/mobile/document/simple_table_test.dart
@@ -4,6 +4,7 @@ import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/document/presentation/editor_plugins/simple_table/simple_table.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
@@ -371,13 +372,22 @@ void main() {
// click the column menu button
await tester.clickColumnMenuButton(0);
+ final clearContents = find.findTextInFlowyText(
+ LocaleKeys.document_plugins_simpleTable_moreActions_clearContents
+ .tr(),
+ );
+
// clear content
- await tester.tapButton(
- find.findTextInFlowyText(
- LocaleKeys.document_plugins_simpleTable_moreActions_clearContents
- .tr(),
- ),
+ final scrollable = find.descendant(
+ of: find.byType(SimpleTableBottomSheet),
+ matching: find.byType(Scrollable),
+ );
+ await tester.scrollUntilVisible(
+ clearContents,
+ 100,
+ scrollable: scrollable,
);
+ await tester.tapButton(clearContents);
await tester.cancelTableActionMenu();
// check the first cell is empty
@@ -427,7 +437,7 @@ void main() {
// open the plus menu and select the heading block
{
await tester.openPlusMenuAndClickButton(
- LocaleKeys.editor_toggleHeading1ShortForm.tr(),
+ LocaleKeys.editor_heading1.tr(),
);
// check the heading block is inserted
diff --git a/frontend/appflowy_flutter/ios/Podfile.lock b/frontend/appflowy_flutter/ios/Podfile.lock
index ac6f338698..69bb7b20cf 100644
--- a/frontend/appflowy_flutter/ios/Podfile.lock
+++ b/frontend/appflowy_flutter/ios/Podfile.lock
@@ -175,37 +175,37 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
SPEC CHECKSUMS:
- app_links: e70ca16b4b0f88253b3b3660200d4a10b4ea9795
- appflowy_backend: 144c20d8bfb298c4e10fa3fa6701a9f41bf98b88
- connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
- device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
+ app_links: c5161ac5ab5383ad046884568b4b91cb52df5d91
+ appflowy_backend: 78f6a053f756e6bc29bcc5a2106cbe77b756e97a
+ connectivity_plus: 481668c94744c30c53b8895afb39159d1e619bdf
+ device_info_plus: 71ffc6ab7634ade6267c7a93088ed7e4f74e5896
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
- file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
- flowy_infra_ui: 0455e1fa8c51885aa1437848e361e99419f34ebc
+ file_picker: 9b3292d7c8bc68c8a7bf8eb78f730e49c8efc517
+ flowy_infra_ui: 931b73a18b54a392ab6152eebe29a63a30751f53
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
- fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
- image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
- integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4
- irondash_engine_context: 3458bf979b90d616ffb8ae03a150bafe2e860cc9
- keyboard_height_plugin: 43fa8bba20fd5c4fdeed5076466b8b9d43cc6b86
- open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
- package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
- path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
- permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
+ fluttertoast: 76fea30fcf04176325f6864c87306927bd7d2038
+ image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
+ integration_test: d5929033778cc4991a187e4e1a85396fa4f59b3a
+ irondash_engine_context: 8e58ca8e0212ee9d1c7dc6a42121849986c88486
+ keyboard_height_plugin: ef70a8181b29f27670e9e2450814ca6b6dc05b05
+ open_filex: 432f3cd11432da3e39f47fcc0df2b1603854eff1
+ package_info_plus: 580e9a5f1b6ca5594e7c9ed5f92d1dfb2a66b5e1
+ path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
+ permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: b9a731e1d6307f44ca703b3976d18c24ca561e84
Sentry: 1fe34e9c2cbba1e347623610d26db121dcb569f1
- sentry_flutter: a39c2a2d67d5e5b9cb0b94a4985c76dd5b3fc737
- share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
- shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
- sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
- super_native_extensions: 4916b3c627a9c7fffdc48a23a9eca0b1ac228fa7
+ sentry_flutter: e24b397f9a61fa5bbefd8279c3b2242ca86faa90
+ share_plus: 011d6fb4f9d2576b83179a3a5c5e323202cdabcf
+ shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
+ sqflite: c35dad70033b8862124f8337cc994a809fcd9fa3
+ super_native_extensions: b763c02dc3a8fd078389f410bf15149179020cb4
SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
- url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
- webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1
+ url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
+ webview_flutter_wkwebview: 45a041c7831641076618876de3ba75c712860c6b
PODFILE CHECKSUM: d0d9b4ff572d8695c38eb3f9b490f55cdfc57eca
-COCOAPODS: 1.15.2
+COCOAPODS: 1.16.2
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart
index 1d10c1f161..aa4756cb42 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart
@@ -670,7 +670,12 @@ DatabaseViewBlockComponentBuilder _buildDatabaseViewBlockComponentBuilder(
) {
return DatabaseViewBlockComponentBuilder(
configuration: configuration.copyWith(
- padding: (_) => const EdgeInsets.symmetric(vertical: 10),
+ padding: (node) {
+ if (UniversalPlatform.isMobile) {
+ return configuration.padding(node);
+ }
+ return const EdgeInsets.symmetric(vertical: 10);
+ },
),
);
}
@@ -873,6 +878,12 @@ SubPageBlockComponentBuilder _buildSubPageBlockComponentBuilder(
return SubPageBlockComponentBuilder(
configuration: configuration.copyWith(
textStyle: (node) => styleCustomizer.subPageBlockTextStyleBuilder(),
+ padding: (node) {
+ if (UniversalPlatform.isMobile) {
+ return const EdgeInsets.symmetric(horizontal: 18);
+ }
+ return configuration.padding(node);
+ },
),
);
}
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/math_equation/math_equation_block_component.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/math_equation/math_equation_block_component.dart
index 286eac3d75..e9d6b3297e 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/math_equation/math_equation_block_component.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/math_equation/math_equation_block_component.dart
@@ -153,11 +153,6 @@ class MathEquationBlockComponentWidgetState
),
);
- child = Padding(
- padding: padding,
- child: child,
- );
-
if (widget.showActions && widget.actionBuilder != null) {
child = BlockComponentActionWrapper(
node: node,
@@ -174,6 +169,11 @@ class MathEquationBlockComponentWidgetState
);
}
+ child = Padding(
+ padding: padding,
+ child: child,
+ );
+
if (UniversalPlatform.isDesktopOrWeb) {
child = Stack(
children: [
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/sub_page/sub_page_block_component.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/sub_page/sub_page_block_component.dart
index 4b8550570a..c2b975ec05 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/sub_page/sub_page_block_component.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/sub_page/sub_page_block_component.dart
@@ -299,6 +299,13 @@ class SubPageBlockComponentState extends State<SubPageBlockComponent>
);
}
+ if (UniversalPlatform.isMobile) {
+ child = Padding(
+ padding: padding,
+ child: child,
+ );
+ }
+
return child;
},
);
diff --git a/frontend/appflowy_flutter/macos/Podfile.lock b/frontend/appflowy_flutter/macos/Podfile.lock
index d5ac7975b9..2d9b24cdaa 100644
--- a/frontend/appflowy_flutter/macos/Podfile.lock
+++ b/frontend/appflowy_flutter/macos/Podfile.lock
@@ -130,31 +130,31 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/window_manager/macos
SPEC CHECKSUMS:
- app_links: 10e0a0ab602ffaf34d142cd4862f29d34b303b2a
- appflowy_backend: 865496343de667fc8c600e04b9fd05234e130cf9
- bitsdojo_window_macos: 44e3b8fe3dd463820e0321f6256c5b1c16bb6a00
- connectivity_plus: 18d3c32514c886e046de60e9c13895109866c747
- desktop_drop: 69eeff437544aa619c8db7f4481b3a65f7696898
- device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720
- file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2
- flowy_infra_ui: 03301a39ad118771adbf051a664265c61c507f38
+ app_links: 9028728e32c83a0831d9db8cf91c526d16cc5468
+ appflowy_backend: 464aeb3e5c6966a41641a2111e5ead72ce2695f7
+ bitsdojo_window_macos: 7959fb0ca65a3ccda30095c181ecb856fae48ea9
+ connectivity_plus: e74b9f74717d2d99d45751750e266e55912baeb5
+ desktop_drop: e0b672a7d84c0a6cbc378595e82cdb15f2970a43
+ device_info_plus: a56e6e74dbbd2bb92f2da12c64ddd4f67a749041
+ file_selector_macos: 585232b688707857504f9cb5f985a7c97fe4dd30
+ flowy_infra_ui: 8760ff42a789de40bf5007a5f176b454722a341e
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
HotKey: e96d8a2ddbf4591131e2bb3f54e69554d90cdca6
- hotkey_manager: c32bf0bfe8f934b7bc17ab4ad5c4c142960b023c
- irondash_engine_context: da62996ee25616d2f01bbeb85dc115d813359478
- local_notifier: e9506bc66fc70311e8bc7291fb70f743c081e4ff
- package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c
- path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
+ hotkey_manager: b443f35f4d772162937aa73fd8995e579f8ac4e2
+ irondash_engine_context: 893c7d96d20ce361d7e996f39d360c4c2f9869ba
+ local_notifier: ebf072651e35ae5e47280ad52e2707375cb2ae4e
+ package_info_plus: a8a591e70e87ce97ce5d21b2594f69cea9e0312f
+ path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
ReachabilitySwift: 7f151ff156cea1481a8411701195ac6a984f4979
- screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
+ screen_retriever: 4f97c103641aab8ce183fa5af3b87029df167936
Sentry: 1fe34e9c2cbba1e347623610d26db121dcb569f1
- sentry_flutter: a39c2a2d67d5e5b9cb0b94a4985c76dd5b3fc737
- share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf
- shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
- sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
- super_native_extensions: 85efee3a7495b46b04befcfc86ed12069264ebf3
- url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399
- window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8
+ sentry_flutter: e24b397f9a61fa5bbefd8279c3b2242ca86faa90
+ share_plus: 11c7b7fa7020465584eca3ff6392c5bc1e399d6e
+ shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
+ sqflite: c35dad70033b8862124f8337cc994a809fcd9fa3
+ super_native_extensions: c2795d6d9aedf4a79fae25cb6160b71b50549189
+ url_launcher_macos: de10e46d8d8b9e3a7b8a133e8de92b104379f05e
+ window_manager: 1d01fa7ac65a6e6f83b965471b1a7fdd3f06166c
PODFILE CHECKSUM: 0532f3f001ca3110b8be345d6491fff690e95823