From 47984676212af39303b5b303451e01aa82c000ad Mon Sep 17 00:00:00 2001 From: Sara Tavares <29093946+stavares843@users.noreply.github.com> Date: Mon, 20 Mar 2023 13:29:17 +0000 Subject: [PATCH] chore(typos): fix typos (#1961) Co-authored-by: Nathan.fooo <86001920+appflowy@users.noreply.github.com> --- .../integration_test/switch_folder_test.dart | 4 ++-- .../integration_test/util/settings.dart | 20 +++++++++---------- .../application/field/field_controller.dart | 6 +++--- .../setting/setting_controller.dart | 4 ++-- .../widgets/filter/choicechip/checkbox.dart | 4 ++-- .../select_option/select_option.dart | 4 ++-- .../widgets/filter/choicechip/text.dart | 4 ++-- .../lib/plugins/document/document_page.dart | 8 ++++---- .../lib/plugins/document/editor_styles.dart | 4 ++-- .../more/cubit/document_appearance_cubit.dart | 6 +++--- .../plugins/base/link_to_page_widget.dart | 6 +++--- .../plugins/cover/cover_node_widget.dart | 2 +- .../plugins/openai/widgets/loading.dart | 2 +- .../appflowy_flutter/lib/startup/startup.dart | 2 +- .../workspace/application/app/app_bloc.dart | 2 +- .../home/menu/app/section/section.dart | 4 ++-- .../documentation/customizing.md | 2 +- .../example/lib/home_page.dart | 8 ++++---- .../example/lib/plugin/editor_theme.dart | 2 +- .../appflowy_editor/lib/src/editor_state.dart | 4 ++-- .../selection_menu_service.dart | 2 +- .../lib/src/render/style/plugin_styles.dart | 4 ++-- .../src/render/toolbar/toolbar_widget.dart | 6 +++--- .../lib/src/service/editor_service.dart | 2 +- .../markdown_syntax_to_styled_text.dart | 6 +++--- .../built_in_shortcut_events.dart | 4 ++-- .../lib/src/service/toolbar_service.dart | 2 +- .../test/command/command_extension_test.dart | 2 +- .../test/extensions/node_extension_test.dart | 2 +- .../test/infra/test_editor.dart | 2 +- .../render/rich_text/checkbox_text_test.dart | 2 +- .../exit_editing_mode_handler_test.dart | 2 +- .../lib/src/emoji_picker/emoji_menu_item.dart | 6 +++--- .../type_option/type_option_controller.ts | 10 +++++----- .../flowy-document/src/editor/READ_ME.json | 2 +- .../io.appflowy.AppFlowy.metainfo.xml | 2 +- frontend/scripts/makefile/desktop.toml | 4 ++-- .../lib-ot/src/text_delta/attributes.rs | 2 +- 38 files changed, 80 insertions(+), 80 deletions(-) diff --git a/frontend/appflowy_flutter/integration_test/switch_folder_test.dart b/frontend/appflowy_flutter/integration_test/switch_folder_test.dart index ad372e32a8..6dcd41b081 100644 --- a/frontend/appflowy_flutter/integration_test/switch_folder_test.dart +++ b/frontend/appflowy_flutter/integration_test/switch_folder_test.dart @@ -86,7 +86,7 @@ void main() { await tester.tapGoButton(); await tester.expectToSeeWelcomePage(); - // swith to user B + // switch to user B { await tester.openSettings(); await tester.openSettingsPage(SettingsPage.user); @@ -120,7 +120,7 @@ void main() { expect(find.textContaining(userA), findsOneWidget); } - // swith to the userB again + // switch to the userB again { await tester.openSettings(); await tester.openSettingsPage(SettingsPage.files); diff --git a/frontend/appflowy_flutter/integration_test/util/settings.dart b/frontend/appflowy_flutter/integration_test/util/settings.dart index 76da12966c..4b01c2d791 100644 --- a/frontend/appflowy_flutter/integration_test/util/settings.dart +++ b/frontend/appflowy_flutter/integration_test/util/settings.dart @@ -39,7 +39,7 @@ extension AppFlowySettings on WidgetTester { return; } - /// Open the page taht insides the settings page + /// Open the page that insides the settings page Future openSettingsPage(SettingsPage page) async { final button = find.text(page.name, findRichText: true); expect(button, findsOneWidget); @@ -49,25 +49,25 @@ extension AppFlowySettings on WidgetTester { /// Restore the AppFlowy data storage location Future restoreLocation() async { - final buton = + final button = find.byTooltip(LocaleKeys.settings_files_restoreLocation.tr()); - expect(buton, findsOneWidget); - await tapButton(buton); + expect(button, findsOneWidget); + await tapButton(button); return; } Future tapOpenFolderButton() async { - final buton = find.text(LocaleKeys.settings_files_open.tr()); - expect(buton, findsOneWidget); - await tapButton(buton); + final button = find.text(LocaleKeys.settings_files_open.tr()); + expect(button, findsOneWidget); + await tapButton(button); return; } Future tapCustomLocationButton() async { - final buton = + final button = find.byTooltip(LocaleKeys.settings_files_customizeLocation.tr()); - expect(buton, findsOneWidget); - await tapButton(buton); + expect(button, findsOneWidget); + await tapButton(button); return; } diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_controller.dart b/frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_controller.dart index 6904835b24..231582621e 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_controller.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_controller.dart @@ -162,7 +162,7 @@ class FieldController { //Listen on setting changes _listenOnSettingChanges(); - //Listen on the fitler changes + //Listen on the filter changes _listenOnFilterChanges(); //Listen on the sort changes @@ -177,7 +177,7 @@ class FieldController { } void _listenOnFilterChanges() { - //Listen on the fitler changes + //Listen on the filter changes deleteFilterFromChangeset( List filters, @@ -230,7 +230,7 @@ class FieldController { .removeWhere((key, value) => value.id == updatedFilter.filterId); } - // Insert the filter if there is a fitler and its field info is + // Insert the filter if there is a filter and its field info is // not null if (updatedFilter.hasFilter()) { final fieldInfo = _findFieldInfo( diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/application/setting/setting_controller.dart b/frontend/appflowy_flutter/lib/plugins/database_view/application/setting/setting_controller.dart index cb63463149..a2b687332c 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/application/setting/setting_controller.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/application/setting/setting_controller.dart @@ -27,7 +27,7 @@ class SettingController { ); }); - // Listen on the seting changes + // Listen on the setting changes _listener.start(onSettingUpdated: (result) { result.fold( (newSetting) => updateSetting(newSetting), @@ -36,7 +36,7 @@ class SettingController { }); } - void startListeing({ + void startListening({ required OnSettingUpdated onSettingUpdated, required OnError onError, }) { diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/checkbox.dart b/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/checkbox.dart index f9cd9d104d..1b0ae521ef 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/checkbox.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/checkbox.dart @@ -87,7 +87,7 @@ class _CheckboxFilterEditorState extends State { child: BlocBuilder( builder: (context, state) { final List children = [ - _buildFilterPannel(context, state), + _buildFilterPanel(context, state), ]; return Padding( @@ -99,7 +99,7 @@ class _CheckboxFilterEditorState extends State { ); } - Widget _buildFilterPannel( + Widget _buildFilterPanel( BuildContext context, CheckboxFilterEditorState state) { return SizedBox( height: 20, diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/select_option/select_option.dart b/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/select_option/select_option.dart index b05dfdaf63..3ffc07b6c9 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/select_option/select_option.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/select_option/select_option.dart @@ -96,7 +96,7 @@ class _SelectOptionFilterEditorState extends State { SelectOptionFilterEditorState>( builder: (context, state) { List slivers = [ - SliverToBoxAdapter(child: _buildFilterPannel(context, state)), + SliverToBoxAdapter(child: _buildFilterPanel(context, state)), ]; if (state.filter.condition != SelectOptionConditionPB.OptionIsEmpty && @@ -131,7 +131,7 @@ class _SelectOptionFilterEditorState extends State { ); } - Widget _buildFilterPannel( + Widget _buildFilterPanel( BuildContext context, SelectOptionFilterEditorState state) { return SizedBox( height: 20, diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/text.dart b/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/text.dart index 94ccd5164e..0eaebbc4cb 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/text.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/text.dart @@ -94,7 +94,7 @@ class _TextFilterEditorState extends State { child: BlocBuilder( builder: (context, state) { final List children = [ - _buildFilterPannel(context, state), + _buildFilterPanel(context, state), ]; if (state.filter.condition != TextFilterConditionPB.TextIsEmpty && @@ -112,7 +112,7 @@ class _TextFilterEditorState extends State { ); } - Widget _buildFilterPannel(BuildContext context, TextFilterEditorState state) { + Widget _buildFilterPanel(BuildContext context, TextFilterEditorState state) { return SizedBox( height: 20, child: Row( diff --git a/frontend/appflowy_flutter/lib/plugins/document/document_page.dart b/frontend/appflowy_flutter/lib/plugins/document/document_page.dart index 7f54bf4d27..73bcd377bc 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/document_page.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/document_page.dart @@ -128,11 +128,11 @@ class _AppFlowyEditorPageState extends State<_AppFlowyEditorPage> { @override Widget build(BuildContext context) { final theme = Theme.of(context); - final autoFocusParamters = _autoFocusParamters(); + final autoFocusParameters = _autoFocusParameters(); final editor = AppFlowyEditor( editorState: editorState, - autoFocus: autoFocusParamters.value1, - focusedSelection: autoFocusParamters.value2, + autoFocus: autoFocusParameters.value1, + focusedSelection: autoFocusParameters.value2, customBuilders: { // Divider kDividerType: DividerWidgetBuilder(), @@ -234,7 +234,7 @@ class _AppFlowyEditorPageState extends State<_AppFlowyEditorPage> { } } - dartz.Tuple2 _autoFocusParamters() { + dartz.Tuple2 _autoFocusParameters() { if (editorState.document.isEmpty) { return dartz.Tuple2(true, Selection.single(path: [0], startOffset: 0)); } diff --git a/frontend/appflowy_flutter/lib/plugins/document/editor_styles.dart b/frontend/appflowy_flutter/lib/plugins/document/editor_styles.dart index d4e467ab27..16a286e7e3 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/editor_styles.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/editor_styles.dart @@ -82,8 +82,8 @@ Iterable> customPluginTheme(BuildContext context) { }, ); final pluginTheme = Theme.of(context).brightness == Brightness.dark - ? darkPlguinStyleExtension - : lightPlguinStyleExtension; + ? darkPluginStyleExtension + : lightPluginStyleExtension; return pluginTheme.toList() ..removeWhere((element) => element is HeadingPluginStyle || element is NumberListPluginStyle) diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/more/cubit/document_appearance_cubit.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/more/cubit/document_appearance_cubit.dart index fcab0eacd0..80a52a9f3e 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/more/cubit/document_appearance_cubit.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/more/cubit/document_appearance_cubit.dart @@ -1,7 +1,7 @@ import 'package:bloc/bloc.dart'; import 'package:shared_preferences/shared_preferences.dart'; -const String _kDocumentAppearenceFontSize = 'kDocumentAppearenceFontSize'; +const String _kDocumentAppearanceFontSize = 'kDocumentAppearanceFontSize'; class DocumentAppearance { const DocumentAppearance({ @@ -24,7 +24,7 @@ class DocumentAppearanceCubit extends Cubit { void fetch() async { final prefs = await SharedPreferences.getInstance(); - final fontSize = prefs.getDouble(_kDocumentAppearenceFontSize) ?? 14.0; + final fontSize = prefs.getDouble(_kDocumentAppearanceFontSize) ?? 14.0; emit(state.copyWith( fontSize: fontSize, )); @@ -32,7 +32,7 @@ class DocumentAppearanceCubit extends Cubit { void syncFontSize(double fontSize) async { final prefs = await SharedPreferences.getInstance(); - prefs.setDouble(_kDocumentAppearenceFontSize, fontSize); + prefs.setDouble(_kDocumentAppearanceFontSize, fontSize); emit(state.copyWith( fontSize: fontSize, )); diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/base/link_to_page_widget.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/base/link_to_page_widget.dart index ebce76461e..73cfbeecb4 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/base/link_to_page_widget.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/base/link_to_page_widget.dart @@ -20,7 +20,7 @@ void showLinkToPageMenu( BuildContext context, ViewLayoutTypePB pageType, ) { - final aligment = menuService.alignment; + final alignment = menuService.alignment; final offset = menuService.offset; menuService.dismiss(); @@ -41,8 +41,8 @@ void showLinkToPageMenu( _linkToPageMenu?.remove(); _linkToPageMenu = OverlayEntry(builder: (context) { return Positioned( - top: aligment == Alignment.bottomLeft ? offset.dy : null, - bottom: aligment == Alignment.topLeft ? offset.dy : null, + top: alignment == Alignment.bottomLeft ? offset.dy : null, + bottom: alignment == Alignment.topLeft ? offset.dy : null, left: offset.dx, child: Material( color: Colors.transparent, diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/cover/cover_node_widget.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/cover/cover_node_widget.dart index 67b083a774..808962e019 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/cover/cover_node_widget.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/cover/cover_node_widget.dart @@ -463,7 +463,7 @@ class _CoverImageState extends State<_CoverImage> { coverImage = const SizedBox(); break; } -//OverflowBox needs to be wraped by a widget with constraints(or from its parent) first,otherwise it will occur an erorr +//OverflowBox needs to be wraped by a widget with constraints(or from its parent) first,otherwise it will occur an error return SizedBox( height: height, child: OverflowBox( diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/loading.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/loading.dart index e34fe1e8d6..a2c5ce97e4 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/loading.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/loading.dart @@ -17,7 +17,7 @@ class Loading { return const SimpleDialog( elevation: 0.0, backgroundColor: - Colors.transparent, // can change this to your prefered color + Colors.transparent, // can change this to your preferred color children: [ Center( child: CircularProgressIndicator(), diff --git a/frontend/appflowy_flutter/lib/startup/startup.dart b/frontend/appflowy_flutter/lib/startup/startup.dart index ebe027939d..de2d612250 100644 --- a/frontend/appflowy_flutter/lib/startup/startup.dart +++ b/frontend/appflowy_flutter/lib/startup/startup.dart @@ -27,7 +27,7 @@ import 'tasks/prelude.dart'; // └───▶│AppWidgetTask│────────▶│ApplicationWidget │─────▶│ SplashScreen │ // └─────────────┘ └──────────────────┘ └───────────────┘ // -// 3.build MeterialApp +// 3.build MaterialApp final getIt = GetIt.instance; abstract class EntryPoint { diff --git a/frontend/appflowy_flutter/lib/workspace/application/app/app_bloc.dart b/frontend/appflowy_flutter/lib/workspace/application/app/app_bloc.dart index 2515750718..df9d203974 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/app/app_bloc.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/app/app_bloc.dart @@ -141,7 +141,7 @@ class AppEvent with _$AppEvent { PluginBuilder pluginBuilder, { String? desc, - /// The initial data should be the JSON of the doucment + /// The initial data should be the JSON of the document /// For example: {"document":{"type":"editor","children":[]}} String? initialData, Map? ext, diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/app/section/section.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/app/section/section.dart index e91d046ded..b16d9b0e57 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/app/section/section.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/app/section/section.dart @@ -33,14 +33,14 @@ class ViewSection extends StatelessWidget { }, child: BlocBuilder( builder: (context, state) { - return _reorderableColum(context, state); + return _reorderableColumn(context, state); }, ), ), ); } - ReorderableColumn _reorderableColum( + ReorderableColumn _reorderableColumn( BuildContext context, ViewSectionState state) { final children = state.views.map((view) { return ViewSectionItem( diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/documentation/customizing.md b/frontend/appflowy_flutter/packages/appflowy_editor/documentation/customizing.md index 30926b3d50..89a6eecf9c 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/documentation/customizing.md +++ b/frontend/appflowy_flutter/packages/appflowy_editor/documentation/customizing.md @@ -365,7 +365,7 @@ ThemeData customizeEditorTheme(BuildContext context) { return Theme.of(context).copyWith(extensions: [ editorStyle, - ...darkPlguinStyleExtension, + ...darkPluginStyleExtension, quote, ]); } diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/example/lib/home_page.dart b/frontend/appflowy_flutter/packages/appflowy_editor/example/lib/home_page.dart index 89a1c393af..293d7a6445 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/example/lib/home_page.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/example/lib/home_page.dart @@ -48,7 +48,7 @@ class _HomePageState extends State { ThemeData _themeData = ThemeData.light().copyWith( extensions: [ ...lightEditorStyleExtension, - ...lightPlguinStyleExtension, + ...lightPluginStyleExtension, ], ); @@ -151,7 +151,7 @@ Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC // Theme Demo _buildSeparator(context, 'Theme Demo'), - _buildListTile(context, 'Bulit In Dark Mode', () { + _buildListTile(context, 'Built In Dark Mode', () { _jsonString = Future.value( jsonEncode(_editorState.document.toJson()).toString(), ); @@ -159,7 +159,7 @@ Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC _themeData = ThemeData.dark().copyWith( extensions: [ ...darkEditorStyleExtension, - ...darkPlguinStyleExtension, + ...darkPluginStyleExtension, ], ); }); @@ -372,7 +372,7 @@ Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC return Theme.of(context).copyWith(extensions: [ editorStyle, - ...darkPlguinStyleExtension, + ...darkPluginStyleExtension, quote, ]); } diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/example/lib/plugin/editor_theme.dart b/frontend/appflowy_flutter/packages/appflowy_editor/example/lib/plugin/editor_theme.dart index 65a8f868fa..be84ae38f9 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/example/lib/plugin/editor_theme.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/example/lib/plugin/editor_theme.dart @@ -34,7 +34,7 @@ ThemeData customizeEditorTheme(BuildContext context) { return Theme.of(context).copyWith(extensions: [ editorStyle, - ...darkPlguinStyleExtension, + ...darkPluginStyleExtension, quote, ]); } diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/editor_state.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/editor_state.dart index 44e4e3d5f5..4b214adad6 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/editor_state.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/editor_state.dart @@ -77,7 +77,7 @@ class EditorState { // TODO: only for testing. bool disableSealTimer = false; - bool disbaleRules = false; + bool disableRules = false; bool editable = true; @@ -209,7 +209,7 @@ class EditorState { void _applyRules(int ruleCount) { // Set a maximum count to prevent a dead loop. - if (ruleCount >= 5 || disbaleRules) { + if (ruleCount >= 5 || disableRules) { return; } diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart index b4f7bb5c67..2d5af7bae1 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart @@ -69,7 +69,7 @@ class SelectionMenu implements SelectionMenuService { editorState.renderBox?.localToGlobal(Offset.zero) ?? Offset.zero; final editorHeight = editorState.renderBox!.size.height; - // show below defualt + // show below default var showBelow = true; _alignment = Alignment.bottomLeft; final bottomRight = selectionRects.first.bottomRight; diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/style/plugin_styles.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/style/plugin_styles.dart index 44fabea573..19f70b2a92 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/style/plugin_styles.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/style/plugin_styles.dart @@ -2,14 +2,14 @@ import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor/src/infra/flowy_svg.dart'; import 'package:flutter/material.dart'; -Iterable> get lightPlguinStyleExtension => [ +Iterable> get lightPluginStyleExtension => [ HeadingPluginStyle.light, CheckboxPluginStyle.light, NumberListPluginStyle.light, QuotedTextPluginStyle.light, ]; -Iterable> get darkPlguinStyleExtension => [ +Iterable> get darkPluginStyleExtension => [ HeadingPluginStyle.dark, CheckboxPluginStyle.dark, NumberListPluginStyle.dark, diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_widget.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_widget.dart index 93be8b0240..fc9df7346f 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_widget.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_widget.dart @@ -16,14 +16,14 @@ class ToolbarWidget extends StatefulWidget { required this.layerLink, required this.offset, required this.items, - this.aligment = Alignment.topLeft, + this.alignment = Alignment.topLeft, }) : super(key: key); final EditorState editorState; final LayerLink layerLink; final Offset offset; final List items; - final Alignment aligment; + final Alignment alignment; @override State createState() => _ToolbarWidgetState(); @@ -41,7 +41,7 @@ class _ToolbarWidgetState extends State with ToolbarMixin { link: widget.layerLink, showWhenUnlinked: true, offset: widget.offset, - followerAnchor: widget.aligment, + followerAnchor: widget.alignment, child: _buildToolbar(context), ), ); diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/editor_service.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/editor_service.dart index 9fcfcfd108..86adfdecf1 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/editor_service.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/editor_service.dart @@ -39,7 +39,7 @@ class AppFlowyEditor extends StatefulWidget { this.themeData = themeData ?? ThemeData.light().copyWith(extensions: [ ...lightEditorStyleExtension, - ...lightPlguinStyleExtension, + ...lightPluginStyleExtension, ]); } diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/markdown_syntax_to_styled_text.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/markdown_syntax_to_styled_text.dart index b38d838fed..1f798f4114 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/markdown_syntax_to_styled_text.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/markdown_syntax_to_styled_text.dart @@ -310,7 +310,7 @@ ShortcutEventHandler underscoreToItalicHandler = (editorState, event) { return KeyEventResult.handled; }; -ShortcutEventHandler doubleAsteriskToBoldHanlder = (editorState, event) { +ShortcutEventHandler doubleAsteriskToBoldHandler = (editorState, event) { final selectionService = editorState.service.selectionService; final selection = selectionService.currentSelection.value; final textNodes = selectionService.currentSelectedNodes.whereType(); @@ -366,8 +366,8 @@ ShortcutEventHandler doubleAsteriskToBoldHanlder = (editorState, event) { return KeyEventResult.handled; }; -//Implement in the same way as doubleAsteriskToBoldHanlder -ShortcutEventHandler doubleUnderscoreToBoldHanlder = (editorState, event) { +//Implement in the same way as doubleAsteriskToBoldHandler +ShortcutEventHandler doubleUnderscoreToBoldHandler = (editorState, event) { final selectionService = editorState.service.selectionService; final selection = selectionService.currentSelection.value; final textNodes = selectionService.currentSelectedNodes.whereType(); diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/shortcut_event/built_in_shortcut_events.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/shortcut_event/built_in_shortcut_events.dart index d6338b6fe3..b4566acf92 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/shortcut_event/built_in_shortcut_events.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/shortcut_event/built_in_shortcut_events.dart @@ -310,12 +310,12 @@ List builtInShortcutEvents = [ ShortcutEvent( key: 'Double asterisk to bold', command: 'shift+digit 8', - handler: doubleAsteriskToBoldHanlder, + handler: doubleAsteriskToBoldHandler, ), ShortcutEvent( key: 'Double underscore to bold', command: 'shift+underscore', - handler: doubleUnderscoreToBoldHanlder, + handler: doubleUnderscoreToBoldHandler, ), // https://github.com/flutter/flutter/issues/104944 // Workaround: Using space editing on the web platform often results in errors, diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/toolbar_service.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/toolbar_service.dart index 9fd8ca3648..2d63ac8158 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/toolbar_service.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/toolbar_service.dart @@ -66,7 +66,7 @@ class _FlowyToolbarState extends State layerLink: layerLink, offset: offset, items: items, - aligment: alignment, + alignment: alignment, ), ); Overlay.of(context)?.insert(_toolbarOverlay!); diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/test/command/command_extension_test.dart b/frontend/appflowy_flutter/packages/appflowy_editor/test/command/command_extension_test.dart index 1c7325987b..3fde48495f 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/test/command/command_extension_test.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/test/command/command_extension_test.dart @@ -4,7 +4,7 @@ import '../infra/test_editor.dart'; void main() { group('command_extension.dart', () { - testWidgets('insert a new checkbox after an exsiting checkbox', + testWidgets('insert a new checkbox after an existing checkbox', (tester) async { final editor = tester.editor ..insertTextNode( diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/test/extensions/node_extension_test.dart b/frontend/appflowy_flutter/packages/appflowy_editor/test/extensions/node_extension_test.dart index 3c8b3b0cc0..9aa3db6bb2 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/test/extensions/node_extension_test.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/test/extensions/node_extension_test.dart @@ -45,7 +45,7 @@ void main() { expect(result, false); }); - testWidgets('insert a new checkbox after an exsiting checkbox', + testWidgets('insert a new checkbox after an existing checkbox', (tester) async { const text = 'Welcome to Appflowy 😁'; final editor = tester.editor diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/test/infra/test_editor.dart b/frontend/appflowy_flutter/packages/appflowy_editor/test/infra/test_editor.dart index 55672fba47..69019f889c 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/test/infra/test_editor.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/test/infra/test_editor.dart @@ -160,7 +160,7 @@ class EditorWidgetTester { ), ) ..disableSealTimer = true - ..disbaleRules = true; + ..disableRules = true; } bool runAction(int actionIndex, Node node) { diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/test/render/rich_text/checkbox_text_test.dart b/frontend/appflowy_flutter/packages/appflowy_editor/test/render/rich_text/checkbox_text_test.dart index eceb429894..576dabf7c4 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/test/render/rich_text/checkbox_text_test.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/test/render/rich_text/checkbox_text_test.dart @@ -71,7 +71,7 @@ void main() async { // https://github.com/AppFlowy-IO/AppFlowy/issues/1763 // // [Bug] Mouse unable to click a certain area #1763 - testWidgets('insert a new checkbox after an exsiting checkbox', + testWidgets('insert a new checkbox after an existing checkbox', (tester) async { // Before // diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/test/service/internal_key_event_handlers/exit_editing_mode_handler_test.dart b/frontend/appflowy_flutter/packages/appflowy_editor/test/service/internal_key_event_handlers/exit_editing_mode_handler_test.dart index 6ee51e4da6..119bc652ae 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/test/service/internal_key_event_handlers/exit_editing_mode_handler_test.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/test/service/internal_key_event_handlers/exit_editing_mode_handler_test.dart @@ -27,7 +27,7 @@ void main() async { Selection.single(path: [1], startOffset: 0, endOffset: text.length), ); - // mutliple selection + // multiple selection await _testSelection( editor, Selection( diff --git a/frontend/appflowy_flutter/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_menu_item.dart b/frontend/appflowy_flutter/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_menu_item.dart index 34720d16f4..5f7e604a3e 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_menu_item.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_menu_item.dart @@ -24,15 +24,15 @@ void _showEmojiSelectionMenu( SelectionMenuService menuService, BuildContext context, ) { - final aligment = menuService.alignment; + final alignment = menuService.alignment; final offset = menuService.offset; menuService.dismiss(); _emojiSelectionMenu?.remove(); _emojiSelectionMenu = OverlayEntry(builder: (context) { return Positioned( - top: aligment == Alignment.bottomLeft ? offset.dy : null, - bottom: aligment == Alignment.topLeft ? offset.dy : null, + top: alignment == Alignment.bottomLeft ? offset.dy : null, + bottom: alignment == Alignment.topLeft ? offset.dy : null, left: offset.dx, child: Material( child: EmojiSelectionMenu( diff --git a/frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/field/type_option/type_option_controller.ts b/frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/field/type_option/type_option_controller.ts index 1961cae413..c66f3b63ae 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/field/type_option/type_option_controller.ts +++ b/frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/field/type_option/type_option_controller.ts @@ -45,7 +45,7 @@ export class TypeOptionController { if (this.initialFieldInfo.some) { return this.initialFieldInfo.val; } else { - throw Error('Unexpect empty type option data. Should call initialize first'); + throw Error('Unexpected empty type option data. Should call initialize first'); } } return new FieldInfo(this.typeOptionData.val.field); @@ -69,7 +69,7 @@ export class TypeOptionController { void this.fieldBackendSvc?.updateField({ name: name }); this.fieldNotifier.notify(this.typeOptionData.val.field); } else { - throw Error('Unexpect empty type option data. Should call initialize first'); + throw Error('Unexpected empty type option data. Should call initialize first'); } }; @@ -82,20 +82,20 @@ export class TypeOptionController { } }); } else { - throw Error('Unexpect empty type option data. Should call initialize first'); + throw Error('Unexpected empty type option data. Should call initialize first'); } }; deleteField = async () => { if (this.fieldBackendSvc === undefined) { - Log.error('Unexpect empty field backend service'); + Log.error('Unexpected empty field backend service'); } return this.fieldBackendSvc?.deleteField(); }; duplicateField = async () => { if (this.fieldBackendSvc === undefined) { - Log.error('Unexpect empty field backend service'); + Log.error('Unexpected empty field backend service'); } return this.fieldBackendSvc?.duplicateField(); }; diff --git a/frontend/rust-lib/flowy-document/src/editor/READ_ME.json b/frontend/rust-lib/flowy-document/src/editor/READ_ME.json index b47f43ee16..ee118fd296 100644 --- a/frontend/rust-lib/flowy-document/src/editor/READ_ME.json +++ b/frontend/rust-lib/flowy-document/src/editor/READ_ME.json @@ -241,7 +241,7 @@ "insert": "bold text", "attributes": { "bold": true, - "defaultFormating": true + "defaultFormatting": true } } ] diff --git a/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.metainfo.xml b/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.metainfo.xml index 4178c3d2a5..c9a58b68fa 100644 --- a/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.metainfo.xml +++ b/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.metainfo.xml @@ -25,7 +25,7 @@ ## Extensively extensible For those with no coding experience, AppFlowy enables you to create apps that suit your needs. It's built on a community-driven toolbox, including templates, plugins, themes, and more.

- ## Truely native experience Faster, more stable with support for offline mode. It's also better integrated with different devices. Moreover, AppFlowy enables users to access features and possibilities not available on the web. + ## Truly native experience Faster, more stable with support for offline mode. It's also better integrated with different devices. Moreover, AppFlowy enables users to access features and possibilities not available on the web.

diff --git a/frontend/scripts/makefile/desktop.toml b/frontend/scripts/makefile/desktop.toml index 0d94d2d549..a7b964d261 100644 --- a/frontend/scripts/makefile/desktop.toml +++ b/frontend/scripts/makefile/desktop.toml @@ -201,7 +201,7 @@ run_task = { name = [ [tasks.compile_test_backend] mac_alias = "compile_test_backend_default" -windows_alias = "compile_test_backend_widnows" +windows_alias = "compile_test_backend_windows" linux_alias = "compile_test_backend_default" [tasks.compile_test_backend_default] @@ -217,7 +217,7 @@ script = [ ] script_runner = "@shell" -[tasks.compile_test_backend_widnows] +[tasks.compile_test_backend_windows] private = true script = [ """ diff --git a/shared-lib/lib-ot/src/text_delta/attributes.rs b/shared-lib/lib-ot/src/text_delta/attributes.rs index ceb20a8ad7..c12359a5f3 100644 --- a/shared-lib/lib-ot/src/text_delta/attributes.rs +++ b/shared-lib/lib-ot/src/text_delta/attributes.rs @@ -139,7 +139,7 @@ lazy_static! { BuildInTextAttributeKey::Background, BuildInTextAttributeKey::InlineCode, ]); - static ref INGORE_KEYS: HashSet = HashSet::from_iter(vec![ + static ref IGNORE_KEYS: HashSet = HashSet::from_iter(vec![ BuildInTextAttributeKey::Width, BuildInTextAttributeKey::Height, ]);