diff --git a/frontend/appflowy_flutter/integration_test/desktop/cloud/workspace/workspace_icon_test.dart b/frontend/appflowy_flutter/integration_test/desktop/cloud/workspace/workspace_icon_test.dart new file mode 100644 index 0000000000..71d7c8c2eb --- /dev/null +++ b/frontend/appflowy_flutter/integration_test/desktop/cloud/workspace/workspace_icon_test.dart @@ -0,0 +1,68 @@ +// ignore_for_file: unused_import + +import 'dart:io'; + +import 'package:appflowy/env/cloud_env.dart'; +import 'package:appflowy/generated/locale_keys.g.dart'; +import 'package:appflowy/plugins/document/presentation/editor_plugins/openai/widgets/loading.dart'; +import 'package:appflowy/shared/feature_flags.dart'; +import 'package:appflowy/startup/startup.dart'; +import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart'; +import 'package:appflowy/user/application/auth/auth_service.dart'; +import 'package:appflowy/workspace/application/settings/prelude.dart'; +import 'package:appflowy/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_actions.dart'; +import 'package:appflowy/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_icon.dart'; +import 'package:appflowy/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_menu.dart'; +import 'package:appflowy/workspace/presentation/home/menu/sidebar/workspace/sidebar_workspace.dart'; +import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart'; +import 'package:appflowy/workspace/presentation/widgets/user_avatar.dart'; +import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flowy_infra/uuid.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:path/path.dart' as p; +import 'package:universal_platform/universal_platform.dart'; + +import '../../../shared/constants.dart'; +import '../../../shared/database_test_op.dart'; +import '../../../shared/dir.dart'; +import '../../../shared/emoji.dart'; +import '../../../shared/mock/mock_file_picker.dart'; +import '../../../shared/util.dart'; +import '../../../shared/workspace.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('workspace icon:', () { + testWidgets('remove icon from workspace', (tester) async { + await tester.initializeAppFlowy( + cloudType: AuthenticatorType.appflowyCloudSelfHost, + ); + await tester.tapGoogleLoginInButton(); + await tester.expectToSeeHomePageWithGetStartedPage(); + + await tester.openWorkspaceMenu(); + + // click the workspace icon + await tester.tapButton( + find.descendant( + of: find.byType(WorkspaceMenuItem), + matching: find.byType(WorkspaceIcon), + ), + ); + // click the remove icon button + await tester.tapButton( + find.text(LocaleKeys.button_remove.tr()), + ); + + // nothing should happen + expect( + find.text(LocaleKeys.workspace_updateIconSuccess.tr()), + findsNothing, + ); + }); + }); +} diff --git a/frontend/appflowy_flutter/integration_test/desktop/cloud/workspace/workspace_test_runner.dart b/frontend/appflowy_flutter/integration_test/desktop/cloud/workspace/workspace_test_runner.dart index 871802b6ca..8ed85e467d 100644 --- a/frontend/appflowy_flutter/integration_test/desktop/cloud/workspace/workspace_test_runner.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/cloud/workspace/workspace_test_runner.dart @@ -3,6 +3,7 @@ import 'package:integration_test/integration_test.dart'; import 'change_name_and_icon_test.dart' as change_name_and_icon_test; import 'collaborative_workspace_test.dart' as collaborative_workspace_test; import 'share_menu_test.dart' as share_menu_test; +import 'workspace_icon_test.dart' as workspace_icon_test; import 'workspace_settings_test.dart' as workspace_settings_test; void main() { @@ -12,4 +13,5 @@ void main() { share_menu_test.main(); collaborative_workspace_test.main(); change_name_and_icon_test.main(); + workspace_icon_test.main(); } diff --git a/frontend/appflowy_flutter/integration_test/desktop/document/document_title_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_title_test.dart index 69c9652ba8..9b4b5e9ef7 100644 --- a/frontend/appflowy_flutter/integration_test/desktop/document/document_title_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_title_test.dart @@ -1,3 +1,4 @@ +import 'package:appflowy/plugins/document/presentation/editor_plugins/plugins.dart'; import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -221,6 +222,85 @@ void main() { expect(newTitle, findsOneWidget); }); + testWidgets('execute undo and redo in title', (tester) async { + await tester.initializeAppFlowy(); + await tester.tapAnonymousSignInButton(); + + await tester.createNewPageWithNameUnderParent(); + + final title = tester.editor.findDocumentTitle(''); + await tester.enterText(title, _testDocumentName); + // press a random key to make the undo stack not empty + await tester.simulateKeyEvent(LogicalKeyboardKey.keyA); + await tester.pumpAndSettle(); + + // undo + await tester.simulateKeyEvent( + LogicalKeyboardKey.keyZ, + isControlPressed: !UniversalPlatform.isMacOS, + isMetaPressed: UniversalPlatform.isMacOS, + ); + // wait for the undo to be applied + await tester.pumpAndSettle(Durations.long1); + + // expect the title is empty + expect( + tester + .widget( + tester.editor.findDocumentTitle(''), + ) + .controller + ?.text, + '', + ); + + // redo + await tester.simulateKeyEvent( + LogicalKeyboardKey.keyZ, + isControlPressed: !UniversalPlatform.isMacOS, + isMetaPressed: UniversalPlatform.isMacOS, + isShiftPressed: true, + ); + + await tester.pumpAndSettle(Durations.short1); + + if (UniversalPlatform.isMacOS) { + expect( + tester + .widget( + tester.editor.findDocumentTitle(_testDocumentName), + ) + .controller + ?.text, + _testDocumentName, + ); + } + }); + + testWidgets('escape key should exit the editing mode', (tester) async { + await tester.initializeAppFlowy(); + await tester.tapAnonymousSignInButton(); + + await tester.createNewPageWithNameUnderParent(); + + final title = tester.editor.findDocumentTitle(''); + await tester.enterText(title, _testDocumentName); + await tester.pumpAndSettle(); + + await tester.simulateKeyEvent(LogicalKeyboardKey.escape); + await tester.pumpAndSettle(); + + expect( + tester + .widget( + tester.editor.findDocumentTitle(_testDocumentName), + ) + .focusNode + ?.hasFocus, + isFalse, + ); + }); + testWidgets('press arrow down key in title, check if the cursor flashes', (tester) async { await tester.initializeAppFlowy(); @@ -248,5 +328,24 @@ void main() { ), ); }); + + testWidgets( + 'hover on the cover title, check if the add icon & add cover button are shown', + (tester) async { + await tester.initializeAppFlowy(); + await tester.tapAnonymousSignInButton(); + + await tester.createNewPageWithNameUnderParent(); + + final title = tester.editor.findDocumentTitle(''); + await tester.hoverOnWidget( + title, + onHover: () async { + expect(find.byType(DocumentCoverWidget), findsOneWidget); + }, + ); + + await tester.pumpAndSettle(); + }); }); } diff --git a/frontend/appflowy_flutter/integration_test/desktop/document/document_with_cover_image_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_cover_image_test.dart index 641be67769..c365c1bad5 100644 --- a/frontend/appflowy_flutter/integration_test/desktop/document/document_with_cover_image_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_cover_image_test.dart @@ -1,9 +1,8 @@ -import 'package:flutter/material.dart'; - import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/document/presentation/editor_plugins/header/document_cover_widget.dart'; import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_emoji_mart/flutter_emoji_mart.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; @@ -14,7 +13,7 @@ import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - group('cover image', () { + group('cover image:', () { testWidgets('document cover tests', (tester) async { await tester.initializeAppFlowy(); await tester.tapAnonymousSignInButton(); diff --git a/frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart index 63d3e32096..7d500b600f 100644 --- a/frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart @@ -6,7 +6,6 @@ import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/document/presentation/editor_plugins/image/custom_image_block_component/custom_image_block_component.dart'; import 'package:appflowy/plugins/document/presentation/editor_plugins/image/image_placeholder.dart'; import 'package:appflowy/plugins/document/presentation/editor_plugins/image/resizeable_image.dart'; -import 'package:appflowy/plugins/document/presentation/editor_plugins/image/unsplash_image_widget.dart'; import 'package:appflowy/plugins/document/presentation/editor_plugins/image/upload_image_menu/upload_image_menu.dart'; import 'package:appflowy/plugins/document/presentation/editor_plugins/image/upload_image_menu/widgets/embed_image_url_widget.dart'; import 'package:appflowy/startup/startup.dart'; @@ -160,10 +159,7 @@ void main() { findsOneWidget, ); expect(find.byType(UploadImageMenu), findsOneWidget); - - await tester.tapButtonWithName('Unsplash'); - await tester.pumpUntilFound(find.byType(UnsplashImageWidget)); - expect(find.byType(UnsplashImageWidget), findsOneWidget); + expect(find.text('Unsplash'), findsOneWidget); }); }); diff --git a/frontend/appflowy_flutter/integration_test/shared/document_test_operations.dart b/frontend/appflowy_flutter/integration_test/shared/document_test_operations.dart index 6522837765..0ae2bd9c21 100644 --- a/frontend/appflowy_flutter/integration_test/shared/document_test_operations.dart +++ b/frontend/appflowy_flutter/integration_test/shared/document_test_operations.dart @@ -329,7 +329,7 @@ class EditorOperations { await tester.pumpAndSettle(Durations.short1); } - Finder findDocumentTitle(String title) { + Finder findDocumentTitle(String? title) { return find.descendant( of: find.byType(CoverTitle), matching: find.byWidgetPredicate( @@ -342,6 +342,10 @@ class EditorOperations { return true; } + if (title == null) { + return true; + } + if (title.isEmpty) { return widget.controller?.text.isEmpty ?? false; } diff --git a/frontend/appflowy_flutter/lib/mobile/application/page_style/document_page_style_bloc.dart b/frontend/appflowy_flutter/lib/mobile/application/page_style/document_page_style_bloc.dart index 4dde5cc102..7031f51168 100644 --- a/frontend/appflowy_flutter/lib/mobile/application/page_style/document_page_style_bloc.dart +++ b/frontend/appflowy_flutter/lib/mobile/application/page_style/document_page_style_bloc.dart @@ -441,4 +441,15 @@ class PageStyleCover { bool get isCustomImage => type == PageStyleCoverImageType.customImage; bool get isUnsplashImage => type == PageStyleCoverImageType.unsplashImage; bool get isLocalImage => type == PageStyleCoverImageType.localImage; + + @override + bool operator ==(Object other) { + if (other is! PageStyleCover) { + return false; + } + return type == other.type && value == other.value; + } + + @override + int get hashCode => Object.hash(type, value); } diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_title.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_title.dart index 9fee16cebd..bbb58b532c 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_title.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_title.dart @@ -66,6 +66,14 @@ class _InnerCoverTitleState extends State<_InnerCoverTitle> { Log.info('cover title got focus, clear the editor selection'); editorState.selection = null; } + + if (isTitleFocused) { + Log.info('cover title got focus, disable keyboard service'); + editorState.service.keyboardService?.disable(); + } else { + Log.info('cover title lost focus, enable keyboard service'); + editorState.service.keyboardService?.enable(); + } }); editorState.selectionNotifier.addListener(() { @@ -98,6 +106,8 @@ class _InnerCoverTitleState extends State<_InnerCoverTitle> { .copyWith(fontSize: 38.0, fontWeight: FontWeight.w700); final width = context.read().state.width; return BlocConsumer( + listenWhen: (previous, current) => + previous.view.name != current.view.name, listener: _onListen, builder: (context, state) { final appearance = context.read().state; @@ -188,11 +198,18 @@ class _InnerCoverTitleState extends State<_InnerCoverTitle> { return _moveCursorToNextLine(event.logicalKey); } else if (event.logicalKey == LogicalKeyboardKey.arrowRight) { return _moveCursorToNextLine(event.logicalKey); + } else if (event.logicalKey == LogicalKeyboardKey.escape) { + return _exitEditing(); } return KeyEventResult.ignored; } + KeyEventResult _exitEditing() { + titleFocusNode.unfocus(); + return KeyEventResult.handled; + } + Future _createNewLine() async { titleFocusNode.unfocus(); @@ -223,7 +240,7 @@ class _InnerCoverTitleState extends State<_InnerCoverTitle> { final text = titleTextController.text; // if the cursor is not at the end of the text, ignore the event - if (lineCount != 1 && + if ((key == LogicalKeyboardKey.arrowRight || lineCount != 1) && (!selection.isCollapsed || text.length != selection.extentOffset)) { return KeyEventResult.ignored; } diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/document_cover_widget.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/document_cover_widget.dart index 84e6fb3800..b51429da1a 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/document_cover_widget.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/document_cover_widget.dart @@ -64,6 +64,9 @@ enum CoverType { } } +// This key is used to intercept the selection event in the document cover widget. +const _interceptorKey = 'document_cover_widget_interceptor'; + class DocumentCoverWidget extends StatefulWidget { const DocumentCoverWidget({ super.key, @@ -93,6 +96,7 @@ class _DocumentCoverWidgetState extends State { bool get hasCover => coverType != CoverType.none || (cover != null && cover?.type != PageStyleCoverImageType.none); + RenderBox? get _renderBox => context.findRenderObject() as RenderBox?; String viewIcon = ''; PageStyleCover? cover; @@ -102,6 +106,13 @@ class _DocumentCoverWidgetState extends State { final titleTextController = TextEditingController(); final titleFocusNode = FocusNode(); + final isCoverTitleHovered = ValueNotifier(false); + + late final gestureInterceptor = SelectionGestureInterceptor( + key: _interceptorKey, + canTap: (details) => !_isTapInBounds(details.globalPosition), + canPanStart: (details) => !_isDragInBounds(details.globalPosition), + ); @override void initState() { @@ -112,6 +123,8 @@ class _DocumentCoverWidgetState extends State { view = widget.view; titleTextController.text = view.name; widget.node.addListener(_reload); + widget.editorState.service.selectionService + .registerGestureInterceptor(gestureInterceptor); viewListener = ViewListener(viewId: widget.view.id) ..start( @@ -134,6 +147,9 @@ class _DocumentCoverWidgetState extends State { widget.node.removeListener(_reload); titleTextController.dispose(); titleFocusNode.dispose(); + isCoverTitleHovered.dispose(); + widget.editorState.service.selectionService + .unregisterGestureInterceptor(_interceptorKey); super.dispose(); } @@ -156,6 +172,7 @@ class _DocumentCoverWidgetState extends State { hasCover: hasCover, hasIcon: hasIcon, offset: offset, + isCoverTitleHovered: isCoverTitleHovered, ), ), if (hasCover) @@ -177,8 +194,12 @@ class _DocumentCoverWidgetState extends State { ), Padding( padding: const EdgeInsets.only(bottom: 12.0), - child: CoverTitle( - view: widget.view, + child: MouseRegion( + onEnter: (event) => isCoverTitleHovered.value = true, + onExit: (event) => isCoverTitleHovered.value = false, + child: CoverTitle( + view: widget.view, + ), ), ), ], @@ -288,6 +309,24 @@ class _DocumentCoverWidgetState extends State { overwrite: true, ); } + + bool _isTapInBounds(Offset offset) { + if (_renderBox == null) { + return false; + } + + final localPosition = _renderBox!.globalToLocal(offset); + return _renderBox!.paintBounds.contains(localPosition); + } + + bool _isDragInBounds(Offset offset) { + if (_renderBox == null) { + return false; + } + + final localPosition = _renderBox!.globalToLocal(offset); + return _renderBox!.paintBounds.contains(localPosition); + } } @visibleForTesting @@ -300,6 +339,7 @@ class DocumentHeaderToolbar extends StatefulWidget { required this.hasIcon, required this.onIconOrCoverChanged, required this.offset, + required this.isCoverTitleHovered, }); final Node node; @@ -309,6 +349,7 @@ class DocumentHeaderToolbar extends StatefulWidget { final void Function({(CoverType, String?)? cover, String? icon}) onIconOrCoverChanged; final double offset; + final ValueNotifier isCoverTitleHovered; @override State createState() => _DocumentHeaderToolbarState(); @@ -328,12 +369,17 @@ class _DocumentHeaderToolbarState extends State { padding: EdgeInsets.symmetric(horizontal: widget.offset), child: SizedBox( height: 28, - child: Visibility( - visible: !isHidden || isPopoverOpen, - child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: buildRowChildren(), - ), + child: ValueListenableBuilder( + valueListenable: widget.isCoverTitleHovered, + builder: (context, isHovered, child) { + return Visibility( + visible: !isHidden || isPopoverOpen || isHovered, + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: buildRowChildren(), + ), + ); + }, ), ), ); diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/command_shortcuts.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/command_shortcuts.dart index 9d3c7b21bc..094f14dedc 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/command_shortcuts.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/command_shortcuts.dart @@ -7,12 +7,15 @@ import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'exit_edit_mode_command.dart'; + final List defaultCommandShortcutEvents = [ ...commandShortcutEvents.map((e) => e.copyWith()), ]; // Command shortcuts are order-sensitive. Verify order when modifying. List commandShortcutEvents = [ + customExitEditingCommand, backspaceToTitle, arrowUpToTitle, @@ -40,6 +43,7 @@ List commandShortcutEvents = [ toggleTodoListCommand, undoCommand, redoCommand, + exitEditingCommand, ].contains(shortcut), ), diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/exit_edit_mode_command.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/exit_edit_mode_command.dart new file mode 100644 index 0000000000..4eaa131390 --- /dev/null +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/exit_edit_mode_command.dart @@ -0,0 +1,24 @@ +import 'package:appflowy_editor/appflowy_editor.dart'; +import 'package:flutter/material.dart'; + +/// End key event. +/// +/// - support +/// - desktop +/// - web +/// +final CommandShortcutEvent customExitEditingCommand = CommandShortcutEvent( + key: 'exit the editing mode', + getDescription: () => AppFlowyEditorL10n.current.cmdExitEditing, + command: 'escape', + handler: _exitEditingCommandHandler, +); + +CommandShortcutEventHandler _exitEditingCommandHandler = (editorState) { + if (editorState.selection == null) { + return KeyEventResult.ignored; + } + editorState.selection = null; + editorState.service.keyboardService?.closeKeyboard(); + return KeyEventResult.handled; +}; diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/undo_redo/custom_undo_redo_commands.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/undo_redo/custom_undo_redo_commands.dart index b8a12b0431..9ea6477969 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/undo_redo/custom_undo_redo_commands.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/undo_redo/custom_undo_redo_commands.dart @@ -1,7 +1,6 @@ -import 'package:flutter/widgets.dart'; - import 'package:appflowy/plugins/document/presentation/editor_notification.dart'; import 'package:appflowy_editor/appflowy_editor.dart'; +import 'package:flutter/widgets.dart'; /// Undo /// @@ -15,6 +14,10 @@ final CommandShortcutEvent customUndoCommand = CommandShortcutEvent( command: 'ctrl+z', macOSCommand: 'cmd+z', handler: (editorState) { + // if the selection is null, it means the keyboard service is disabled + if (editorState.selection == null) { + return KeyEventResult.ignored; + } EditorNotification.undo().post(); return KeyEventResult.handled; }, @@ -32,6 +35,9 @@ final CommandShortcutEvent customRedoCommand = CommandShortcutEvent( command: 'ctrl+y,ctrl+shift+z', macOSCommand: 'cmd+shift+z', handler: (editorState) { + if (editorState.selection == null) { + return KeyEventResult.ignored; + } EditorNotification.redo().post(); return KeyEventResult.handled; }, diff --git a/frontend/appflowy_flutter/lib/workspace/application/user/user_workspace_bloc.dart b/frontend/appflowy_flutter/lib/workspace/application/user/user_workspace_bloc.dart index 16fed97f7c..b48e87b8d1 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/user/user_workspace_bloc.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/user/user_workspace_bloc.dart @@ -289,6 +289,14 @@ class UserWorkspaceBloc extends Bloc { ); }, updateWorkspaceIcon: (workspaceId, icon) async { + final workspace = state.workspaces.firstWhere( + (e) => e.workspaceId == workspaceId, + ); + if (icon == workspace.icon) { + Log.info('ignore same icon update'); + return; + } + final result = await _userService.updateWorkspaceIcon( workspaceId, icon, diff --git a/frontend/appflowy_flutter/pubspec.lock b/frontend/appflowy_flutter/pubspec.lock index 8e27e7709b..744d039b5e 100644 --- a/frontend/appflowy_flutter/pubspec.lock +++ b/frontend/appflowy_flutter/pubspec.lock @@ -1535,10 +1535,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: "direct dev" description: @@ -1933,10 +1933,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" string_validator: dependency: "direct main" description: @@ -2238,10 +2238,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" watcher: dependency: transitive description: diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock index 6a7b460079..4996c52b4e 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.lock +++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock @@ -172,7 +172,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "app-error" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "anyhow", "bincode", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "appflowy-ai-client" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "anyhow", "bytes", @@ -848,7 +848,7 @@ dependencies = [ [[package]] name = "client-api" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "again", "anyhow", @@ -901,7 +901,7 @@ dependencies = [ [[package]] name = "client-api-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "collab-entity", "collab-rt-entity", @@ -914,7 +914,7 @@ dependencies = [ [[package]] name = "client-websocket" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "futures-channel", "futures-util", @@ -988,7 +988,7 @@ dependencies = [ [[package]] name = "collab" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=38449cb51673fa0c1c6565d769cf417d2cb8db5a#38449cb51673fa0c1c6565d769cf417d2cb8db5a" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "arc-swap", @@ -1013,7 +1013,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=38449cb51673fa0c1c6565d769cf417d2cb8db5a#38449cb51673fa0c1c6565d769cf417d2cb8db5a" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "async-trait", @@ -1052,7 +1052,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=38449cb51673fa0c1c6565d769cf417d2cb8db5a#38449cb51673fa0c1c6565d769cf417d2cb8db5a" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "arc-swap", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=38449cb51673fa0c1c6565d769cf417d2cb8db5a#38449cb51673fa0c1c6565d769cf417d2cb8db5a" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "bytes", @@ -1093,7 +1093,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=38449cb51673fa0c1c6565d769cf417d2cb8db5a#38449cb51673fa0c1c6565d769cf417d2cb8db5a" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "arc-swap", @@ -1115,7 +1115,7 @@ dependencies = [ [[package]] name = "collab-importer" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=38449cb51673fa0c1c6565d769cf417d2cb8db5a#38449cb51673fa0c1c6565d769cf417d2cb8db5a" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "async-recursion", @@ -1170,7 +1170,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=38449cb51673fa0c1c6565d769cf417d2cb8db5a#38449cb51673fa0c1c6565d769cf417d2cb8db5a" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "async-stream", @@ -1208,7 +1208,7 @@ dependencies = [ [[package]] name = "collab-rt-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "anyhow", "bincode", @@ -1233,7 +1233,7 @@ dependencies = [ [[package]] name = "collab-rt-protocol" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "anyhow", "async-trait", @@ -1250,7 +1250,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=38449cb51673fa0c1c6565d769cf417d2cb8db5a#38449cb51673fa0c1c6565d769cf417d2cb8db5a" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "collab", @@ -1624,7 +1624,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "database-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "anyhow", "app-error", @@ -2190,6 +2190,7 @@ dependencies = [ "client-api", "collab", "collab-entity", + "collab-folder", "collab-integrate", "collab-plugins", "dashmap 6.0.1", @@ -2692,6 +2693,7 @@ dependencies = [ "lib-infra", "once_cell", "protobuf", + "rayon", "semver", "serde", "serde_json", @@ -3192,7 +3194,7 @@ dependencies = [ [[package]] name = "gotrue" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "anyhow", "futures-util", @@ -3209,7 +3211,7 @@ dependencies = [ [[package]] name = "gotrue-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "anyhow", "app-error", @@ -3641,7 +3643,7 @@ dependencies = [ [[package]] name = "infra" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "anyhow", "bytes", @@ -6279,7 +6281,7 @@ dependencies = [ [[package]] name = "shared-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=98d9f823b2e08dedf093815364cf73e8b8903e77#98d9f823b2e08dedf093815364cf73e8b8903e77" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9c0dffacef6b58070002d988fffd92d09e5516a8#9c0dffacef6b58070002d988fffd92d09e5516a8" dependencies = [ "anyhow", "app-error", diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml index 5891c2d2c1..69b1d92ed2 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.toml +++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml @@ -120,26 +120,14 @@ custom-protocol = ["tauri/custom-protocol"] # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -<<<<<<< Updated upstream -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -= = = = = = = -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } ->>>>>>> Stashed changes - +collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } # Working directory: frontend # To update the commit ID, run: diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lock index 5f2c2a2ace..775c2c9673 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.lock +++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock @@ -986,7 +986,7 @@ dependencies = [ [[package]] name = "collab" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "arc-swap", @@ -1011,7 +1011,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "async-trait", @@ -1050,7 +1050,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "arc-swap", @@ -1071,7 +1071,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "bytes", @@ -1091,7 +1091,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "arc-swap", @@ -1113,7 +1113,7 @@ dependencies = [ [[package]] name = "collab-importer" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "async-recursion", @@ -1168,7 +1168,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "async-stream", @@ -1248,7 +1248,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.toml index 4eec8059f9..25e47a4948 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.toml +++ b/frontend/appflowy_web_app/src-tauri/Cargo.toml @@ -118,14 +118,14 @@ custom-protocol = ["tauri/custom-protocol"] # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } +collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } # Working directory: frontend diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock index 5977c9e9f6..19455d5b62 100644 --- a/frontend/rust-lib/Cargo.lock +++ b/frontend/rust-lib/Cargo.lock @@ -849,7 +849,7 @@ dependencies = [ [[package]] name = "collab" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "arc-swap", @@ -874,7 +874,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "async-trait", @@ -913,7 +913,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "arc-swap", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "bytes", @@ -954,7 +954,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "arc-swap", @@ -976,7 +976,7 @@ dependencies = [ [[package]] name = "collab-importer" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "async-recursion", @@ -1031,7 +1031,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "async-stream", @@ -1111,7 +1111,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=d73579b0269b33856690c4b4d68bf22b4eb17a99#d73579b0269b33856690c4b4d68bf22b4eb17a99" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b56d051#b56d0512acf2d3a3857c8e1d425e04ed38763516" dependencies = [ "anyhow", "collab", diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml index 80a2227615..e1d6d3bbbc 100644 --- a/frontend/rust-lib/Cargo.toml +++ b/frontend/rust-lib/Cargo.toml @@ -142,14 +142,14 @@ rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "1710120 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "d73579b0269b33856690c4b4d68bf22b4eb17a99" } +collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } +collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b56d051" } # Working directory: frontend # To update the commit ID, run: diff --git a/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs b/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs index e2b7b523f1..a1781517a0 100644 --- a/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs +++ b/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs @@ -19,7 +19,7 @@ use collab_database::rows::{database_row_document_id_from_row_id, mut_row_with_c use collab_database::workspace_database::WorkspaceDatabaseBody; use collab_document::document_data::default_document_collab_data; use collab_entity::CollabType; -use collab_folder::hierarchy_builder::{NestedViews, ParentChildViews, ViewBuilder}; +use collab_folder::hierarchy_builder::{NestedChildViewBuilder, NestedViews, ParentChildViews}; use collab_folder::{Folder, UserId, View, ViewIdentifier, ViewLayout}; use collab_integrate::{CollabKVAction, CollabKVDB, PersistenceError}; use collab_plugins::local_storage::kv::KVTransactionDB; @@ -467,7 +467,7 @@ where document_object_ids.insert(import_container_view_id.to_string()); - let import_container_views = ViewBuilder::new( + let import_container_views = NestedChildViewBuilder::new( current_session.user_id, current_session.user_workspace.id.clone(), )