[PR #8016] [CLOSED] feat: revamp at menu #8273

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/8016
Author: @asjqkkkk
Created: 6/3/2025
Status: Closed

Base: mainHead: feat/desktop/mention


📝 Commits (10+)

  • e65bda7 fix: @ menu position error
  • 80cbc15 feat: add titleTrailing in AFMenuSection
  • 56d4c45 feat: add mention menu
  • 683be82 Merge branch 'main' into feat/desktop/mention
  • ee0e15f Merge branch 'main' into feat/desktop/mention
  • b463ba3 feat: add mention menu
  • 86bf0c7 Merge branch 'main' into feat/desktop/mention
  • 5fc2dc6 fix: complete the logic of selecting item by arrow key
  • f244acf fix: add filter for mention menu
  • 7c46ad7 chore: format codes

📊 Changes

103 files changed (+6026 additions, -394 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/desktop/document/document_inline_page_reference_test.dart (+10 -2)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_page_test.dart (+1 -0)
📝 frontend/appflowy_flutter/integration_test/shared/document_test_operations.dart (+3 -6)
📝 frontend/appflowy_flutter/lib/core/config/kv.dart (+15 -0)
📝 frontend/appflowy_flutter/lib/core/config/kv_keys.dart (+5 -0)
frontend/appflowy_flutter/lib/features/mension_person/data/cache/person_list_cache.dart (+24 -0)
frontend/appflowy_flutter/lib/features/mension_person/data/models/invite.dart (+48 -0)
frontend/appflowy_flutter/lib/features/mension_person/data/models/mention_menu_item.dart (+43 -0)
frontend/appflowy_flutter/lib/features/mension_person/data/models/models.dart (+3 -0)
frontend/appflowy_flutter/lib/features/mension_person/data/models/person.dart (+49 -0)
frontend/appflowy_flutter/lib/features/mension_person/data/repositories/mention_repository.dart (+23 -0)
frontend/appflowy_flutter/lib/features/mension_person/data/repositories/mock_mention_repository.dart (+142 -0)
frontend/appflowy_flutter/lib/features/mension_person/logic/mention_bloc.dart (+143 -0)
frontend/appflowy_flutter/lib/features/mension_person/logic/mention_event.dart (+73 -0)
frontend/appflowy_flutter/lib/features/mension_person/logic/mention_state.dart (+75 -0)
frontend/appflowy_flutter/lib/features/mension_person/logic/person_bloc.dart (+58 -0)
frontend/appflowy_flutter/lib/features/mension_person/logic/person_event.dart (+19 -0)
frontend/appflowy_flutter/lib/features/mension_person/logic/person_state.dart (+56 -0)
frontend/appflowy_flutter/lib/features/mension_person/presentation/mention_menu.dart (+126 -0)
frontend/appflowy_flutter/lib/features/mension_person/presentation/mention_menu_service.dart (+208 -0)

...and 80 more files

📄 Description

  • at menu
    • person list
    • page list
    • date and reminder
    • backend support
      • get person list
      • at a person with notification
      • get single person info with document id
  • "mention a person" node in editor
  • invite a person as ... menu
    • backend support
      • invite a person as ...
  • person profile card
  • more option menu in "person profile card "
    • backend support
  • integrate test code

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

Revamp the inline “@” mention menu to support person, page, date, and reminder mentions with a unified new menu service and modular callbacks. Extract insertion logic into EditorState extension methods and streamline the inline menu’s positioning and rendering. Introduce a dedicated MentionMenuService with Bloc-driven lists for people, pages, and date/reminder items, including a persistent “send notification” toggle and mock data providers for person mentions. Enhance AFMenu, AFMenuSection, and item widgets to allow customizable builders, trailing widgets, and background color hooks.

New Features:

  • Add person mention support with live avatar, name, and optional notification toggle
  • Implement a dedicated MentionMenuService replacing InlineActionsMenu on desktop with Bloc-managed sections for people, pages, and date/reminder items
  • Persist and toggle “send notification” setting for person mentions in key–value storage

Enhancements:

  • Refactor page, link, date, and reminder insertion into EditorState extension methods
  • Improve inline menu positioning by extracting offset calculation and alignment logic
  • Extend AFMenu, AFMenuSection, AFMenuItem, and AFTextMenuItem to accept custom builders, titleTrailing widgets, and background color hooks
  • Add visibility_detector for scrolling and item visibility tracking

Chores:

  • Add visibility_detector dependency
  • Extend KeyValueStorage to support bool values for persisting settings

🔄 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/8016 **Author:** [@asjqkkkk](https://github.com/asjqkkkk) **Created:** 6/3/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/desktop/mention` --- ### 📝 Commits (10+) - [`e65bda7`](https://github.com/AppFlowy-IO/AppFlowy/commit/e65bda72cbfe638c027d466c8387c7852222fbd2) fix: @ menu position error - [`80cbc15`](https://github.com/AppFlowy-IO/AppFlowy/commit/80cbc159bf18a0a4fadb2ef383e9185acb7eecd1) feat: add titleTrailing in AFMenuSection - [`56d4c45`](https://github.com/AppFlowy-IO/AppFlowy/commit/56d4c45d67957b98dca180cb704d647c8fdadd29) feat: add mention menu - [`683be82`](https://github.com/AppFlowy-IO/AppFlowy/commit/683be82210f12b990b9308a825699dd4868ddb5f) Merge branch 'main' into feat/desktop/mention - [`ee0e15f`](https://github.com/AppFlowy-IO/AppFlowy/commit/ee0e15f394a430fdbb4d9463d4b100707bd22d8b) Merge branch 'main' into feat/desktop/mention - [`b463ba3`](https://github.com/AppFlowy-IO/AppFlowy/commit/b463ba36944300b798c3104a192cebf44d0787a9) feat: add mention menu - [`86bf0c7`](https://github.com/AppFlowy-IO/AppFlowy/commit/86bf0c7b0ab00c4815537fa363c9c6de26787227) Merge branch 'main' into feat/desktop/mention - [`5fc2dc6`](https://github.com/AppFlowy-IO/AppFlowy/commit/5fc2dc6ceebf879d3a54258be711a3892c61e332) fix: complete the logic of selecting item by arrow key - [`f244acf`](https://github.com/AppFlowy-IO/AppFlowy/commit/f244acf44e7e40b6b0eb390bfb0bb4ed334cd374) fix: add filter for mention menu - [`7c46ad7`](https://github.com/AppFlowy-IO/AppFlowy/commit/7c46ad71d481c657ec53e26445f812da6c67f95f) chore: format codes ### 📊 Changes **103 files changed** (+6026 additions, -394 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_inline_page_reference_test.dart` (+10 -2) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_page_test.dart` (+1 -0) 📝 `frontend/appflowy_flutter/integration_test/shared/document_test_operations.dart` (+3 -6) 📝 `frontend/appflowy_flutter/lib/core/config/kv.dart` (+15 -0) 📝 `frontend/appflowy_flutter/lib/core/config/kv_keys.dart` (+5 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/data/cache/person_list_cache.dart` (+24 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/data/models/invite.dart` (+48 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/data/models/mention_menu_item.dart` (+43 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/data/models/models.dart` (+3 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/data/models/person.dart` (+49 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/data/repositories/mention_repository.dart` (+23 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/data/repositories/mock_mention_repository.dart` (+142 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/logic/mention_bloc.dart` (+143 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/logic/mention_event.dart` (+73 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/logic/mention_state.dart` (+75 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/logic/person_bloc.dart` (+58 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/logic/person_event.dart` (+19 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/logic/person_state.dart` (+56 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/presentation/mention_menu.dart` (+126 -0) ➕ `frontend/appflowy_flutter/lib/features/mension_person/presentation/mention_menu_service.dart` (+208 -0) _...and 80 more files_ </details> ### 📄 Description - [x] at menu - [x] person list - [x] page list - [x] date and reminder - [ ] backend support - [ ] get person list - [ ] at a person with notification - [ ] get single person info with document id - [x] "mention a person" node in editor - [x] invite a person as ... menu - [ ] backend support - [ ] invite a person as ... - [x] person profile card - [x] more option menu in "person profile card " - [ ] backend support - [ ] integrate test code ### 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 Revamp the inline “@” mention menu to support person, page, date, and reminder mentions with a unified new menu service and modular callbacks. Extract insertion logic into EditorState extension methods and streamline the inline menu’s positioning and rendering. Introduce a dedicated MentionMenuService with Bloc-driven lists for people, pages, and date/reminder items, including a persistent “send notification” toggle and mock data providers for person mentions. Enhance AFMenu, AFMenuSection, and item widgets to allow customizable builders, trailing widgets, and background color hooks. New Features: - Add person mention support with live avatar, name, and optional notification toggle - Implement a dedicated MentionMenuService replacing InlineActionsMenu on desktop with Bloc-managed sections for people, pages, and date/reminder items - Persist and toggle “send notification” setting for person mentions in key–value storage Enhancements: - Refactor page, link, date, and reminder insertion into EditorState extension methods - Improve inline menu positioning by extracting offset calculation and alignment logic - Extend AFMenu, AFMenuSection, AFMenuItem, and AFTextMenuItem to accept custom builders, titleTrailing widgets, and background color hooks - Add visibility_detector for scrolling and item visibility tracking Chores: - Add visibility_detector dependency - Extend KeyValueStorage to support bool values for persisting settings --- <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:25 +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#8273
No description provided.