[PR #7958] [MERGED] feat: turn guest into member #8235

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/7958
Author: @LucasXu0
Created: 5/21/2025
Status: Merged
Merged: 5/22/2025
Merged by: @LucasXu0

Base: mainHead: turn_into_member


📝 Commits (6)

  • 52d4be5 feat: turn guest into member
  • ff46b8f feat: handle share results
  • 48b93dd fix: clear email textfield after inviting
  • 4dd331d test: add turn into member test
  • a883a22 fix: double toasts show when sharing with guest
  • ce15468 Merge branch 'main' into turn_into_member

📊 Changes

11 files changed (+258 additions, -84 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/features/share_tab/data/models/shared_user.dart (+2 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository.dart (+4 -4)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository.dart (+2 -2)
📝 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 (+95 -37)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/share_tab.dart (+57 -5)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/people_with_access_section.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/share_with_user_widget.dart (+11 -6)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart (+5 -0)
📝 frontend/appflowy_flutter/lib/features/util/extensions.dart (+1 -1)
📝 frontend/appflowy_flutter/test/bloc_test/lib/features/share_tab/share_with_user_bloc_test.dart (+78 -26)

📄 Description

Feature Preview

The frontend code will not handle the permission control when turning a guest into a member. The backend will manage this restriction later to decide who has permission to use the 'turn into member' features.

  • turn guest into member
  • clear invitation textfield after inviting guests

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

Implement guest-to-member conversion in the share UI and BLoC, clear the invite input on success, hide the shared section when empty, and refactor state management and models to DRY up the share tab logic.

New Features:

  • Add TurnIntoMember event and BLoC handler to convert guests into members
  • Automatically clear the invite text field after a successful invitation
  • Hide the shared pages section when no pages are shared

Enhancements:

  • Convert ShareTab to a StatefulWidget to manage a shared TextEditingController
  • Introduce SharedUsers type alias and unifying import of share models
  • Extract _getLatestSharedUsersOrCurrentUsers helper to reduce BLoC duplication
  • Reset related state results (share, remove, update, turnIntoMember) before each operation

Tests:

  • Add bloc tests for the new turnIntoMember flow
  • Adjust existing share, remove, and update tests to expect consolidated state resets

🔄 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/7958 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 5/21/2025 **Status:** ✅ Merged **Merged:** 5/22/2025 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `turn_into_member` --- ### 📝 Commits (6) - [`52d4be5`](https://github.com/AppFlowy-IO/AppFlowy/commit/52d4be52e9a6bd04b3f12ece7954a264076fe15f) feat: turn guest into member - [`ff46b8f`](https://github.com/AppFlowy-IO/AppFlowy/commit/ff46b8fe5d0be0bb5d285837543736aa4df18ac9) feat: handle share results - [`48b93dd`](https://github.com/AppFlowy-IO/AppFlowy/commit/48b93ddf454ba097fb4d37550c589e630a5a05fd) fix: clear email textfield after inviting - [`4dd331d`](https://github.com/AppFlowy-IO/AppFlowy/commit/4dd331d7aab807a1d5088e2ac132401ef70d0a56) test: add turn into member test - [`a883a22`](https://github.com/AppFlowy-IO/AppFlowy/commit/a883a22dfc570078975bdc781576b1d30fd8135e) fix: double toasts show when sharing with guest - [`ce15468`](https://github.com/AppFlowy-IO/AppFlowy/commit/ce154680942708d963a6b530cdd673fea0578382) Merge branch 'main' into turn_into_member ### 📊 Changes **11 files changed** (+258 additions, -84 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/models/shared_user.dart` (+2 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository.dart` (+4 -4) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository.dart` (+2 -2) 📝 `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` (+95 -37) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/share_tab.dart` (+57 -5) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/people_with_access_section.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/share_with_user_widget.dart` (+11 -6) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart` (+5 -0) 📝 `frontend/appflowy_flutter/lib/features/util/extensions.dart` (+1 -1) 📝 `frontend/appflowy_flutter/test/bloc_test/lib/features/share_tab/share_with_user_bloc_test.dart` (+78 -26) </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 The frontend code will not handle the permission control when turning a guest into a member. The backend will manage this restriction later to decide who has permission to use the 'turn into member' features. - [x] turn guest into member - [x] clear invitation textfield after inviting guests <!--- 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 Implement guest-to-member conversion in the share UI and BLoC, clear the invite input on success, hide the shared section when empty, and refactor state management and models to DRY up the share tab logic. New Features: - Add TurnIntoMember event and BLoC handler to convert guests into members - Automatically clear the invite text field after a successful invitation - Hide the shared pages section when no pages are shared Enhancements: - Convert ShareTab to a StatefulWidget to manage a shared TextEditingController - Introduce SharedUsers type alias and unifying import of share models - Extract _getLatestSharedUsersOrCurrentUsers helper to reduce BLoC duplication - Reset related state results (share, remove, update, turnIntoMember) before each operation Tests: - Add bloc tests for the new turnIntoMember flow - Adjust existing share, remove, and update tests to expect consolidated state resets --- <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#8235
No description provided.