[PR #8035] [CLOSED] feat: optimize share logic #8282

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/8035
Author: @LucasXu0
Created: 6/6/2025
Status: Closed

Base: mainHead: merge_upstream_v6


📝 Commits (10+)

  • ca044c4 chore: turn on shared section feature flag
  • df68598 feat: update polling duration
  • 28a06fa feat: add parent_ids in get shared user api
  • 08ca5ce chore: update client-api
  • 0bd9d7f fix: reduce get share users api call
  • c9448b5 chore: update client api
  • eef38ef fix: access level
  • b999cb6 fix: revoke user permission issue
  • bdab7bb fix: flutter analyze
  • bd164fe feat: add shared feature in pro plan

📊 Changes

26 files changed (+313 additions, -157 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/features/page_access_level/data/repositories/rust_page_access_level_repository_impl.dart (+0 -1)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository_impl.dart (+5 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository_impl.dart (+19 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/share_with_user_repository.dart (+3 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/logic/share_tab_bloc.dart (+3 -1)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/share_tab.dart (+19 -9)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/people_with_access_section.dart (+3 -1)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/share_with_user_widget.dart (+3 -0)
📝 frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_bloc.dart (+1 -8)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/m_shared_section.dart (+10 -10)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart (+21 -19)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_page_actions_button.dart (+52 -0)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_empty.dart (+4 -2)
📝 frontend/appflowy_flutter/lib/plugins/shared/share/_shared.dart (+3 -0)
📝 frontend/appflowy_flutter/lib/shared/feature_flags.dart (+2 -0)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_menu.dart (+1 -0)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_item.dart (+22 -6)
📝 frontend/appflowy_flutter/packages/appflowy_backend/lib/dispatch/dispatch.dart (+8 -1)
📝 frontend/resources/translations/en-US.json (+6 -2)
📝 frontend/rust-lib/Cargo.lock (+1 -1)

...and 6 more files

📄 Description

Feature Preview


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

Optimize share logic by enhancing RPCs with ancestor context, refining share UI, and automating sync for a smoother sharing experience

New Features:

  • Include ancestor view IDs in shared page detail requests to optimize share retrieval
  • Add a change icon action with an emoji/icon picker in shared page menus
  • Introduce a PageAccessLevelBloc to enforce UI behaviors based on share permissions and plan

Enhancements:

  • Control cloud fetch in get_shared_pages with an is_fetch_from_cloud flag
  • Automatically refresh shared page lists after share/unshare actions and add a mobile polling fallback
  • Enhance dispatch logging with success/failure emojis and localize shared section UI strings

Chores:

  • Remove legacy debug refresh buttons from shared sections
  • Bump cloud client-api dependency revisions in Cargo.toml

🔄 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/8035 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 6/6/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `merge_upstream_v6` --- ### 📝 Commits (10+) - [`ca044c4`](https://github.com/AppFlowy-IO/AppFlowy/commit/ca044c4bad929da002d583f8b56cb672e386ea5c) chore: turn on shared section feature flag - [`df68598`](https://github.com/AppFlowy-IO/AppFlowy/commit/df685982b9fb74af1959f39a214113d1507b1dd8) feat: update polling duration - [`28a06fa`](https://github.com/AppFlowy-IO/AppFlowy/commit/28a06facd30638448fd6204591655e1ca804ae00) feat: add parent_ids in get shared user api - [`08ca5ce`](https://github.com/AppFlowy-IO/AppFlowy/commit/08ca5cea9fbf3fad82a8126a54bd89ea06e8d035) chore: update client-api - [`0bd9d7f`](https://github.com/AppFlowy-IO/AppFlowy/commit/0bd9d7fb807d1ee5c35d16ef494016d3f389f497) fix: reduce get share users api call - [`c9448b5`](https://github.com/AppFlowy-IO/AppFlowy/commit/c9448b5aa811fb3f976c93221eb61e5ed48bdf31) chore: update client api - [`eef38ef`](https://github.com/AppFlowy-IO/AppFlowy/commit/eef38ef4d17e3a3bf24afb7e4ae9dee782ebad54) fix: access level - [`b999cb6`](https://github.com/AppFlowy-IO/AppFlowy/commit/b999cb6aad615fcfca016cef7edd7209f798cfe9) fix: revoke user permission issue - [`bdab7bb`](https://github.com/AppFlowy-IO/AppFlowy/commit/bdab7bbc2341fee2d22e7d81dbd808239c61f0f2) fix: flutter analyze - [`bd164fe`](https://github.com/AppFlowy-IO/AppFlowy/commit/bd164fe0d9505074b77a4469c4f0b9d2e784fd22) feat: add shared feature in pro plan ### 📊 Changes **26 files changed** (+313 additions, -157 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/features/page_access_level/data/repositories/rust_page_access_level_repository_impl.dart` (+0 -1) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository_impl.dart` (+5 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository_impl.dart` (+19 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/share_with_user_repository.dart` (+3 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/logic/share_tab_bloc.dart` (+3 -1) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/share_tab.dart` (+19 -9) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/people_with_access_section.dart` (+3 -1) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/share_with_user_widget.dart` (+3 -0) 📝 `frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_bloc.dart` (+1 -8) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/m_shared_section.dart` (+10 -10) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart` (+21 -19) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_page_actions_button.dart` (+52 -0) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_empty.dart` (+4 -2) 📝 `frontend/appflowy_flutter/lib/plugins/shared/share/_shared.dart` (+3 -0) 📝 `frontend/appflowy_flutter/lib/shared/feature_flags.dart` (+2 -0) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_menu.dart` (+1 -0) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_item.dart` (+22 -6) 📝 `frontend/appflowy_flutter/packages/appflowy_backend/lib/dispatch/dispatch.dart` (+8 -1) 📝 `frontend/resources/translations/en-US.json` (+6 -2) 📝 `frontend/rust-lib/Cargo.lock` (+1 -1) _...and 6 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 <!--- 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 - [ ] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/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 Optimize share logic by enhancing RPCs with ancestor context, refining share UI, and automating sync for a smoother sharing experience New Features: - Include ancestor view IDs in shared page detail requests to optimize share retrieval - Add a change icon action with an emoji/icon picker in shared page menus - Introduce a PageAccessLevelBloc to enforce UI behaviors based on share permissions and plan Enhancements: - Control cloud fetch in get_shared_pages with an is_fetch_from_cloud flag - Automatically refresh shared page lists after share/unshare actions and add a mobile polling fallback - Enhance dispatch logging with success/failure emojis and localize shared section UI strings Chores: - Remove legacy debug refresh buttons from shared sections - Bump cloud client-api dependency revisions in Cargo.toml --- <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:27 +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#8282
No description provided.