[PR #7948] [MERGED] feat: shared folder refactor #8229

Closed
opened 2026-03-23 23:23:12 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7948
Author: @LucasXu0
Created: 5/19/2025
Status: Merged
Merged: 5/20/2025
Merged by: @LucasXu0

Base: mainHead: share_folder_v2


📝 Commits (10+)

  • 3ac14ff feat: get the shared folder
  • 82080e6 feat: add shared_view sql
  • 8203f3f feat: persist the shared view data
  • f13b48b feat: support notification
  • b18fd56 fix: flutter compile
  • 7ab4a2e feat: add logic, data and presentations
  • af4d552 feat: integrate client-api endpoints
  • a6787e0 feat: replace upsert with replace_all for workspace shared views management
  • 5718c6c refactor: streamline sharedPages retrieval with extension method
  • 7ae29fe feat: enhance SharedSidebarBloc with folder notification support and update shared pages management

📊 Changes

47 files changed (+1231 additions, -112 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository.dart (+3 -3)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository.dart (+4 -81)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/share_with_user_repository.dart (+2 -2)
📝 frontend/appflowy_flutter/lib/features/share_tab/logic/share_with_user_bloc.dart (+2 -2)
frontend/appflowy_flutter/lib/features/shared_section/data/local_share_pages_repository.dart (+33 -0)
frontend/appflowy_flutter/lib/features/shared_section/data/rust_share_pagers_repository.dart (+28 -0)
frontend/appflowy_flutter/lib/features/shared_section/data/share_pages_repository.dart (+12 -0)
frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_bloc.dart (+186 -0)
frontend/appflowy_flutter/lib/features/shared_section/models/shared_page.dart (+14 -0)
frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart (+61 -0)
frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/refresh_button.dart (+25 -0)
frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_pages_list.dart (+44 -0)
frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_error.dart (+25 -0)
frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_header.dart (+23 -0)
frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_loading.dart (+16 -0)
frontend/appflowy_flutter/lib/features/shared_section/util/extensions.dart (+85 -0)
📝 frontend/appflowy_flutter/lib/plugins/shared/share/share_button.dart (+2 -3)
📝 frontend/appflowy_flutter/lib/plugins/shared/share/share_menu.dart (+12 -8)
📝 frontend/appflowy_flutter/lib/shared/feature_flags.dart (+6 -0)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/space/sidebar_space.dart (+15 -0)

...and 27 more files

📄 Description

Feature Preview

  • refactor shared folder
  • add shareSection feature flag
  • integrate shared page api endpoint
    • build the shared viewpbs
    • sync the data
    • polling data

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

Summary by Sourcery

Add comprehensive support for fetching shared views across a workspace, including nested child views, by introducing new protobuf types, extending cloud and local services, wiring up the event handler, and enabling the share tab in the Flutter UI, along with a version bump to 1.0.0.

New Features:

  • Add view_pb_with_all_child_views utility to build a recursive ViewPB tree with all descendants.
  • Define SharedViewPB and RepeatedSharedViewResponsePB protobufs to represent shared views and their access levels.
  • Implement get_shared_views in FolderManager to retrieve shared views from the cloud, assemble nested view structures, and return them.
  • Extend the FolderCloudService trait, server, and core implementations to support the get_shared_views RPC.
  • Integrate GetSharedViews event and its handler into the plugin event map.
  • Enable the ShareTab in the Flutter ShareMenu to display shared folder content.

Enhancements:

  • Bump frontend package versions (Makefile.toml and pubspec.yaml) to 1.0.0.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/7948 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 5/19/2025 **Status:** ✅ Merged **Merged:** 5/20/2025 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `share_folder_v2` --- ### 📝 Commits (10+) - [`3ac14ff`](https://github.com/AppFlowy-IO/AppFlowy/commit/3ac14ff5c88359f5e28c0033a37e34a0d13c67e3) feat: get the shared folder - [`82080e6`](https://github.com/AppFlowy-IO/AppFlowy/commit/82080e67b2ffc03db4f563f8099dcd70f95b63cd) feat: add shared_view sql - [`8203f3f`](https://github.com/AppFlowy-IO/AppFlowy/commit/8203f3fb9ee6ab467f1c862b0f84fd28850f8c22) feat: persist the shared view data - [`f13b48b`](https://github.com/AppFlowy-IO/AppFlowy/commit/f13b48b5f28381f9084cf4799b9cad0d1d8fc922) feat: support notification - [`b18fd56`](https://github.com/AppFlowy-IO/AppFlowy/commit/b18fd5672a755636556333c57a882c2a9531b93b) fix: flutter compile - [`7ab4a2e`](https://github.com/AppFlowy-IO/AppFlowy/commit/7ab4a2ef16f5c74a1f37819f0c5a88d720b14978) feat: add logic, data and presentations - [`af4d552`](https://github.com/AppFlowy-IO/AppFlowy/commit/af4d5529affb95b12055df49e9b9d6ee1998e734) feat: integrate client-api endpoints - [`a6787e0`](https://github.com/AppFlowy-IO/AppFlowy/commit/a6787e0166953958bcb03ff28c9abf7cc22af7ce) feat: replace upsert with replace_all for workspace shared views management - [`5718c6c`](https://github.com/AppFlowy-IO/AppFlowy/commit/5718c6c6898b5c49f7a4b106b2e9adb6f4c046e1) refactor: streamline sharedPages retrieval with extension method - [`7ae29fe`](https://github.com/AppFlowy-IO/AppFlowy/commit/7ae29fe4f4b23487099a07f6156d96510d33c11c) feat: enhance SharedSidebarBloc with folder notification support and update shared pages management ### 📊 Changes **47 files changed** (+1231 additions, -112 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository.dart` (+3 -3) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository.dart` (+4 -81) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/share_with_user_repository.dart` (+2 -2) 📝 `frontend/appflowy_flutter/lib/features/share_tab/logic/share_with_user_bloc.dart` (+2 -2) ➕ `frontend/appflowy_flutter/lib/features/shared_section/data/local_share_pages_repository.dart` (+33 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/data/rust_share_pagers_repository.dart` (+28 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/data/share_pages_repository.dart` (+12 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_bloc.dart` (+186 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/models/shared_page.dart` (+14 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart` (+61 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/refresh_button.dart` (+25 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_pages_list.dart` (+44 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_error.dart` (+25 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_header.dart` (+23 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_loading.dart` (+16 -0) ➕ `frontend/appflowy_flutter/lib/features/shared_section/util/extensions.dart` (+85 -0) 📝 `frontend/appflowy_flutter/lib/plugins/shared/share/share_button.dart` (+2 -3) 📝 `frontend/appflowy_flutter/lib/plugins/shared/share/share_menu.dart` (+12 -8) 📝 `frontend/appflowy_flutter/lib/shared/feature_flags.dart` (+6 -0) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/space/sidebar_space.dart` (+15 -0) _...and 27 more files_ </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview - [x] refactor shared folder - [x] add shareSection feature flag - [x] integrate shared page api endpoint - [x] build the shared viewpbs - [x] sync the data - [x] polling data <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. ## Summary by Sourcery Add comprehensive support for fetching shared views across a workspace, including nested child views, by introducing new protobuf types, extending cloud and local services, wiring up the event handler, and enabling the share tab in the Flutter UI, along with a version bump to 1.0.0. New Features: - Add view_pb_with_all_child_views utility to build a recursive ViewPB tree with all descendants. - Define SharedViewPB and RepeatedSharedViewResponsePB protobufs to represent shared views and their access levels. - Implement get_shared_views in FolderManager to retrieve shared views from the cloud, assemble nested view structures, and return them. - Extend the FolderCloudService trait, server, and core implementations to support the get_shared_views RPC. - Integrate GetSharedViews event and its handler into the plugin event map. - Enable the ShareTab in the Flutter ShareMenu to display shared folder content. Enhancements: - Bump frontend package versions (Makefile.toml and pubspec.yaml) to 1.0.0. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:23:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#8229
No description provided.