[PR #6353] [MERGED] feat: support cover title #7327

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6353
Author: @LucasXu0
Created: 9/19/2024
Status: Merged
Merged: 9/25/2024
Merged by: @LucasXu0

Base: mainHead: cover_title


📝 Commits (10+)

  • 02c5d5f feat: support cover title
  • bc0a72d Merge branch 'main' into cover_title
  • eb97127 feat: support arrow down and arrow right key on cover title
  • 28dd7ec feat: support arrow up and arrow left key on editor
  • 9a78467 test: add integration test
  • 75501af Merge branch 'main' into cover_title
  • b235663 chore: update frontend/appflowy_flutter/integration_test/desktop/document/document_title_test.dart
  • 6d1d2f3 feat: use shared document context to save title focus node
  • b269335 fix: the backspace key doesn't work after pressing Enter in the title
  • 0fbd9b8 feat: support pressing arrow left key to focus on title

📊 Changes

32 files changed (+862 additions, -189 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/desktop/database/database_row_cover_test.dart (+2 -3)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_codeblock_paste_test.dart (+4 -2)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_copy_and_paste_test.dart (+3 -1)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_create_and_delete_test.dart (+3 -6)
frontend/appflowy_flutter/integration_test/desktop/document/document_title_test.dart (+224 -0)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_with_cover_image_test.dart (+1 -1)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart (+2 -3)
📝 frontend/appflowy_flutter/integration_test/desktop/settings/shortcuts_settings_test.dart (+9 -6)
📝 frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_test.dart (+2 -6)
📝 frontend/appflowy_flutter/integration_test/desktop/uncategorized/zoom_in_out_test.dart (+1 -1)
📝 frontend/appflowy_flutter/integration_test/desktop_runner_3.dart (+2 -1)
📝 frontend/appflowy_flutter/integration_test/shared/common_operations.dart (+12 -4)
📝 frontend/appflowy_flutter/integration_test/shared/document_test_operations.dart (+25 -1)
📝 frontend/appflowy_flutter/integration_test/shared/expectation.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/application/document_bloc.dart (+3 -3)
📝 frontend/appflowy_flutter/lib/plugins/document/document_page.dart (+11 -5)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart (+3 -0)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/cover_title_command.dart (+132 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_editor_bloc.dart (+1 -1)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_title.dart (+235 -0)

...and 12 more files

📄 Description

Feature Preview

closes https://github.com/AppFlowy-IO/AppFlowy/issues/6341

  • Remove the default name for view
  • Display the default name if the title is empty.
  • Add cover title
  • Support arrow keys to navigate between title and content
    • arrow down and arrow right in title
    • arrow up and arrow left in doc
  • Press enter key in title to jump to the first line of content (split the title text if the cursor is not at the end)
  • Replace the cover title selection color
  • Sync the name between cover title and view name
  • Press backspace key at the first line to go to the end of the title
  • Select all (not supported yet)
  • Breaking change: The name of newly created pages is null or empty in this version if the user doesn't rename it. Users of the old version will see an empty name.
  • The backspace key doesn't work after pressing Enter in the title
  • Bring the paragraph to title when pressing backspace. (blocking by date/reminder/linked page)
  • Only change the name for document, not including database
preview

https://github.com/user-attachments/assets/ebbe64bc-f778-470e-8796-7204c072414f


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/6353 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 9/19/2024 **Status:** ✅ Merged **Merged:** 9/25/2024 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `cover_title` --- ### 📝 Commits (10+) - [`02c5d5f`](https://github.com/AppFlowy-IO/AppFlowy/commit/02c5d5f76a0c680339850815e610820e4b3cb561) feat: support cover title - [`bc0a72d`](https://github.com/AppFlowy-IO/AppFlowy/commit/bc0a72dd6ec5757aaf166f2b743ba6fb828dc3ff) Merge branch 'main' into cover_title - [`eb97127`](https://github.com/AppFlowy-IO/AppFlowy/commit/eb97127947c57ca682387505a75db63587067bcf) feat: support arrow down and arrow right key on cover title - [`28dd7ec`](https://github.com/AppFlowy-IO/AppFlowy/commit/28dd7ecc76f600cc7b3be509f76ab214f1b23abe) feat: support arrow up and arrow left key on editor - [`9a78467`](https://github.com/AppFlowy-IO/AppFlowy/commit/9a7846734f9061b307e6bbbde95071728e43a9f2) test: add integration test - [`75501af`](https://github.com/AppFlowy-IO/AppFlowy/commit/75501af4dafdffc8af755f4f2d02cd806ca15a63) Merge branch 'main' into cover_title - [`b235663`](https://github.com/AppFlowy-IO/AppFlowy/commit/b2356634cef7e5ebbcadc41b70b47b563d145823) chore: update frontend/appflowy_flutter/integration_test/desktop/document/document_title_test.dart - [`6d1d2f3`](https://github.com/AppFlowy-IO/AppFlowy/commit/6d1d2f3fa361cff043a521ffc0f3b9eff0e97f51) feat: use shared document context to save title focus node - [`b269335`](https://github.com/AppFlowy-IO/AppFlowy/commit/b26933533fd04100ff2ca31fa32da594063e2732) fix: the backspace key doesn't work after pressing Enter in the title - [`0fbd9b8`](https://github.com/AppFlowy-IO/AppFlowy/commit/0fbd9b875b658c47b4ab91480b38b4e1b114a5e4) feat: support pressing arrow left key to focus on title ### 📊 Changes **32 files changed** (+862 additions, -189 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/desktop/database/database_row_cover_test.dart` (+2 -3) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_codeblock_paste_test.dart` (+4 -2) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_copy_and_paste_test.dart` (+3 -1) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_create_and_delete_test.dart` (+3 -6) ➕ `frontend/appflowy_flutter/integration_test/desktop/document/document_title_test.dart` (+224 -0) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_with_cover_image_test.dart` (+1 -1) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart` (+2 -3) 📝 `frontend/appflowy_flutter/integration_test/desktop/settings/shortcuts_settings_test.dart` (+9 -6) 📝 `frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_test.dart` (+2 -6) 📝 `frontend/appflowy_flutter/integration_test/desktop/uncategorized/zoom_in_out_test.dart` (+1 -1) 📝 `frontend/appflowy_flutter/integration_test/desktop_runner_3.dart` (+2 -1) 📝 `frontend/appflowy_flutter/integration_test/shared/common_operations.dart` (+12 -4) 📝 `frontend/appflowy_flutter/integration_test/shared/document_test_operations.dart` (+25 -1) 📝 `frontend/appflowy_flutter/integration_test/shared/expectation.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/application/document_bloc.dart` (+3 -3) 📝 `frontend/appflowy_flutter/lib/plugins/document/document_page.dart` (+11 -5) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart` (+3 -0) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/cover_title_command.dart` (+132 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_editor_bloc.dart` (+1 -1) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_title.dart` (+235 -0) _...and 12 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 closes https://github.com/AppFlowy-IO/AppFlowy/issues/6341 - [x] Remove the default name for view - [x] Display the default name if the title is empty. - [x] Add cover title - [x] Support arrow keys to navigate between title and content - [x] arrow down and arrow right in title - [x] arrow up and arrow left in doc - [x] Press enter key in title to jump to the first line of content (split the title text if the cursor is not at the end) - [x] Replace the cover title selection color - [x] Sync the name between cover title and view name - [x] Press backspace key at the first line to go to the end of the title - [ ] ~~Select all~~ (not supported yet) - [x] Breaking change: The name of newly created pages is null or empty in this version if the user doesn't rename it. Users of the old version will see an empty name. - [x] The backspace key doesn't work after pressing Enter in the title - [ ] ~~Bring the paragraph to title when pressing backspace.~~ (blocking by date/reminder/linked page) - [x] Only change the name for document, not including database ##### preview https://github.com/user-attachments/assets/ebbe64bc-f778-470e-8796-7204c072414f <!--- 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. - [ ] 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:19:07 +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#7327
No description provided.