[PR #7957] [MERGED] feat: optimize shared section logic #8236

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

📋 Pull Request Information

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

Base: mainHead: share_section


📝 Commits (10+)

  • 246b2f3 chore: bump AppFlowy version to 1.0.0 and add sharedSection feature flag
  • bbe1797 feat: conditionally display spaces in sidebar based on user role
  • 8ebbc4b refactor: update user avatar implementation and enhance shared section functionality
  • 53319fd fix: typo
  • 5e37553 refactor: enhance share tab functionality and error handling
  • 0f09cd4 chore: i18n
  • 2e0b802 feat: turn guest into member
  • ed2e2e7 fix: unit tests
  • da0b096 fix: unit tests
  • 97e5d0e chore: revert version changes

📊 Changes

45 files changed (+281 additions, -209 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/features/share_tab/data/models/share_access_level.dart (+7 -4)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/models/shared_user.dart (+16 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository.dart (+14 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository.dart (+29 -1)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/share_with_user_repository.dart (+8 -2)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/share_tab.dart (+34 -13)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/access_level_list_widget.dart (+4 -2)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/copy_link_widget.dart (+4 -2)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/people_with_access_section.dart (+5 -5)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/share_with_user_widget.dart (+4 -2)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/shared_group_widget.dart (+10 -5)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/shared_user_widget.dart (+11 -7)
📝 frontend/appflowy_flutter/lib/features/shared_section/data/rust_share_pagers_repository.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_bloc.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart (+1 -0)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/refresh_button.dart (+3 -1)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_pages_list.dart (+1 -0)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_header.dart (+3 -1)
📝 frontend/appflowy_flutter/lib/features/util/extensions.dart (+27 -1)
📝 frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/add_members_screen.dart (+1 -1)

...and 25 more files

📄 Description

Feature Preview

  • bump AppFlowy version to 1.0.0 and add sharedSection feature flag
  • conditionally display spaces in sidebar based on user role
  • update user avatar implementation and enhance shared sectio…
  • typo
  • enhance share tab functionality and error handling
  • i18n

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 and enhance shared section and sharing UI by introducing a feature flag, refining sidebar visibility, unifying avatar components, bolstering error handling, and adding internationalization.

New Features:

  • Introduce sharedSection feature flag with polling support
  • Conditionally display shared section and spaces in sidebar based on user role

Bug Fixes:

  • Correct typos in invitation import paths and sidebar upgrade button name
  • Fix variable naming and imports in date picker and shared-access-section tests

Enhancements:

  • Replace custom UserAvatar with unified AFAvatar component across UI
  • Improve share tab flow by using BlocConsumer, showing error toasts, and conditional sections
  • Add i18n localization for share and shared section text
  • Disable draggable behavior for shared pages in the shared pages list

Build:

  • Bump AppFlowy version to 1.0.0 in Makefile.toml and pubspec.yaml

Tests:

  • Update import path in people_with_access_section test

🔄 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/7957 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 5/20/2025 **Status:** ✅ Merged **Merged:** 5/21/2025 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `share_section` --- ### 📝 Commits (10+) - [`246b2f3`](https://github.com/AppFlowy-IO/AppFlowy/commit/246b2f3bf73c33593fffb2f1bbff62dcc35fa80a) chore: bump AppFlowy version to 1.0.0 and add sharedSection feature flag - [`bbe1797`](https://github.com/AppFlowy-IO/AppFlowy/commit/bbe1797c07c60da9187dd3ae7901e090b5e90aab) feat: conditionally display spaces in sidebar based on user role - [`8ebbc4b`](https://github.com/AppFlowy-IO/AppFlowy/commit/8ebbc4b11a532ff4102f8ca8918b4e4ddd11f997) refactor: update user avatar implementation and enhance shared section functionality - [`53319fd`](https://github.com/AppFlowy-IO/AppFlowy/commit/53319fd96b546ad6f76c5bddcfa6eb54943a1473) fix: typo - [`5e37553`](https://github.com/AppFlowy-IO/AppFlowy/commit/5e37553c926ebae3b3cd53420658f4837932e2f1) refactor: enhance share tab functionality and error handling - [`0f09cd4`](https://github.com/AppFlowy-IO/AppFlowy/commit/0f09cd46b769f030f3465a025057167cc78a1053) chore: i18n - [`2e0b802`](https://github.com/AppFlowy-IO/AppFlowy/commit/2e0b802e42b1033d26f38177039d2ed84aab907a) feat: turn guest into member - [`ed2e2e7`](https://github.com/AppFlowy-IO/AppFlowy/commit/ed2e2e7fed8e0e7e7fb3f01828913175f661b88a) fix: unit tests - [`da0b096`](https://github.com/AppFlowy-IO/AppFlowy/commit/da0b096a9a91d2886e84e4c4cc67bf9e1e9aa68e) fix: unit tests - [`97e5d0e`](https://github.com/AppFlowy-IO/AppFlowy/commit/97e5d0ee3f3c23b38ffd176e2e51fb01cda4d864) chore: revert version changes ### 📊 Changes **45 files changed** (+281 additions, -209 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/models/share_access_level.dart` (+7 -4) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/models/shared_user.dart` (+16 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository.dart` (+14 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository.dart` (+29 -1) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/share_with_user_repository.dart` (+8 -2) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/share_tab.dart` (+34 -13) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/access_level_list_widget.dart` (+4 -2) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/copy_link_widget.dart` (+4 -2) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/people_with_access_section.dart` (+5 -5) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/share_with_user_widget.dart` (+4 -2) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/shared_group_widget.dart` (+10 -5) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/shared_user_widget.dart` (+11 -7) 📝 `frontend/appflowy_flutter/lib/features/shared_section/data/rust_share_pagers_repository.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_bloc.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart` (+1 -0) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/refresh_button.dart` (+3 -1) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_pages_list.dart` (+1 -0) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/shared_section_header.dart` (+3 -1) 📝 `frontend/appflowy_flutter/lib/features/util/extensions.dart` (+27 -1) 📝 `frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/add_members_screen.dart` (+1 -1) _...and 25 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] bump AppFlowy version to 1.0.0 and add sharedSection feature flag - [x] conditionally display spaces in sidebar based on user role - [x] update user avatar implementation and enhance shared sectio… - [x] typo - [x] enhance share tab functionality and error handling - [x] i18n <!--- 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 Optimize and enhance shared section and sharing UI by introducing a feature flag, refining sidebar visibility, unifying avatar components, bolstering error handling, and adding internationalization. New Features: - Introduce sharedSection feature flag with polling support - Conditionally display shared section and spaces in sidebar based on user role Bug Fixes: - Correct typos in invitation import paths and sidebar upgrade button name - Fix variable naming and imports in date picker and shared-access-section tests Enhancements: - Replace custom UserAvatar with unified AFAvatar component across UI - Improve share tab flow by using BlocConsumer, showing error toasts, and conditional sections - Add i18n localization for share and shared section text - Disable draggable behavior for shared pages in the shared pages list Build: - Bump AppFlowy version to 1.0.0 in Makefile.toml and pubspec.yaml Tests: - Update import path in people_with_access_section test --- <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:14 +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#8236
No description provided.