[PR #7353] [MERGED] feat: lock page #7844

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7353
Author: @LucasXu0
Created: 2/10/2025
Status: Merged
Merged: 2/12/2025
Merged by: @LucasXu0

Base: mainHead: lock_page


📝 Commits (10+)

  • 5bd7174 feat: lock page
  • 6f054b7 feat: add pageLockStatus bloc
  • b20d5c8 feat: add lock status and unlock status in title bar
  • 5507912 feat: add loading lock status
  • 5f788b4 feat: disable moveTo, delete, rename, updateIcon operations if the page is locked
  • 3b085ac fix: lock toast issue
  • 85937c3 feat: support locked database
  • 4815806 feat: support locked grid
  • 4333d37 feat: support locked title
  • 0dc8bef feat: support locked board

📊 Changes

31 files changed (+816 additions, -159 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/database/board/presentation/board_page.dart (+22 -7)
📝 frontend/appflowy_flutter/lib/plugins/database/calendar/presentation/calendar_page.dart (+49 -21)
📝 frontend/appflowy_flutter/lib/plugins/database/grid/presentation/grid_page.dart (+40 -6)
📝 frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/row/row.dart (+15 -7)
📝 frontend/appflowy_flutter/lib/plugins/database/tab_bar/tab_bar_view.dart (+24 -4)
📝 frontend/appflowy_flutter/lib/plugins/document/document_page.dart (+50 -23)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart (+4 -1)
📝 frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart (+5 -0)
frontend/appflowy_flutter/lib/workspace/application/view/view_lock_status_bloc.dart (+123 -0)
📝 frontend/appflowy_flutter/lib/workspace/application/view/view_service.dart (+10 -0)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_action_type.dart (+13 -0)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_item.dart (+10 -1)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_more_action_button.dart (+34 -19)
📝 frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/account/account_deletion.dart (+1 -2)
📝 frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/more_view_actions.dart (+46 -20)
frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/widgets/lock_page_action.dart (+119 -0)
📝 frontend/appflowy_flutter/lib/workspace/presentation/widgets/view_title_bar.dart (+118 -8)
📝 frontend/appflowy_flutter/pubspec.lock (+2 -2)
📝 frontend/appflowy_flutter/pubspec.yaml (+2 -2)
frontend/resources/flowy_icons/16x/lock_page.svg (+4 -0)

...and 11 more files

📄 Description

Feature Preview

If the members or the owner lock the page, then it cannot be edited anymore.

  • add the lock page api
  • add the unlock page api
  • add lock button in share menu
  • add lock button in title bar
  • add relock button in title bar
  • document (non-editable)
    • cover
    • icon
    • content
  • database (non-editable)
    • filter
    • sort
    • content
    • calendar
    • grid
    • kanban/board
  • more actions
    • disable rename
    • disable "change icon"
    • disable "move to"
    • disable delete
  • the tests will be included in the feature request for mobile implementation.
Screenshot 2025-02-10 at 17 49 14

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.

🔄 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/7353 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 2/10/2025 **Status:** ✅ Merged **Merged:** 2/12/2025 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `lock_page` --- ### 📝 Commits (10+) - [`5bd7174`](https://github.com/AppFlowy-IO/AppFlowy/commit/5bd7174a351d1ba1cd1e4157434ae78b07f85442) feat: lock page - [`6f054b7`](https://github.com/AppFlowy-IO/AppFlowy/commit/6f054b72c68790e62925e33d0b0e23dc535fd8f0) feat: add pageLockStatus bloc - [`b20d5c8`](https://github.com/AppFlowy-IO/AppFlowy/commit/b20d5c8eac27726c60883dc2c934b45f16f6dafc) feat: add lock status and unlock status in title bar - [`5507912`](https://github.com/AppFlowy-IO/AppFlowy/commit/550791226648b9e2c1a7495357888638f4699074) feat: add loading lock status - [`5f788b4`](https://github.com/AppFlowy-IO/AppFlowy/commit/5f788b4b1b51b27bacd1eeb6413f12d6a776258e) feat: disable moveTo, delete, rename, updateIcon operations if the page is locked - [`3b085ac`](https://github.com/AppFlowy-IO/AppFlowy/commit/3b085ac68744b2331f0c25df6d9965cedd4385f1) fix: lock toast issue - [`85937c3`](https://github.com/AppFlowy-IO/AppFlowy/commit/85937c33c5b67e188b2b2896799eddc71d358903) feat: support locked database - [`4815806`](https://github.com/AppFlowy-IO/AppFlowy/commit/481580636acf9b710d734f5e4ea62d68c5c4bcd6) feat: support locked grid - [`4333d37`](https://github.com/AppFlowy-IO/AppFlowy/commit/4333d3781010b5c99803df82a56493370b948e2d) feat: support locked title - [`0dc8bef`](https://github.com/AppFlowy-IO/AppFlowy/commit/0dc8bef4c02d4d3d26b58d5c9b5ab84f309f4364) feat: support locked board ### 📊 Changes **31 files changed** (+816 additions, -159 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/database/board/presentation/board_page.dart` (+22 -7) 📝 `frontend/appflowy_flutter/lib/plugins/database/calendar/presentation/calendar_page.dart` (+49 -21) 📝 `frontend/appflowy_flutter/lib/plugins/database/grid/presentation/grid_page.dart` (+40 -6) 📝 `frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/row/row.dart` (+15 -7) 📝 `frontend/appflowy_flutter/lib/plugins/database/tab_bar/tab_bar_view.dart` (+24 -4) 📝 `frontend/appflowy_flutter/lib/plugins/document/document_page.dart` (+50 -23) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart` (+4 -1) 📝 `frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart` (+5 -0) ➕ `frontend/appflowy_flutter/lib/workspace/application/view/view_lock_status_bloc.dart` (+123 -0) 📝 `frontend/appflowy_flutter/lib/workspace/application/view/view_service.dart` (+10 -0) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_action_type.dart` (+13 -0) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_item.dart` (+10 -1) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_more_action_button.dart` (+34 -19) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/account/account_deletion.dart` (+1 -2) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/more_view_actions.dart` (+46 -20) ➕ `frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/widgets/lock_page_action.dart` (+119 -0) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/widgets/view_title_bar.dart` (+118 -8) 📝 `frontend/appflowy_flutter/pubspec.lock` (+2 -2) 📝 `frontend/appflowy_flutter/pubspec.yaml` (+2 -2) ➕ `frontend/resources/flowy_icons/16x/lock_page.svg` (+4 -0) _...and 11 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 If the members or the owner lock the page, then it cannot be edited anymore. - [x] add the lock page api - [x] add the unlock page api - [x] add lock button in share menu - [x] add lock button in title bar - [x] add relock button in title bar - [x] document (non-editable) - [x] cover - [x] icon - [x] content - [x] database (non-editable) - [x] filter - [x] sort - [x] content - [x] calendar - [x] grid - [x] kanban/board - [x] more actions - [x] disable rename - [x] disable "change icon" - [x] disable "move to" - [x] disable delete - [x] the tests will be included in the feature request for mobile implementation. <img width="1259" alt="Screenshot 2025-02-10 at 17 49 14" src="https://github.com/user-attachments/assets/9f51723d-9fd2-40de-8267-cc332a270457" /> <!--- 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. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:21:26 +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#7844
No description provided.