[PR #4319] [MERGED] feat: support aligning the text block using shortcuts #6194

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/4319
Author: @Jayaprakash-dev
Created: 1/6/2024
Status: Merged
Merged: 1/9/2024
Merged by: @LucasXu0

Base: mainHead: feat_text_align_shortcut


📝 Commits (6)

  • fb1f63a feat: support doc text alignment shortcut keys
  • 1b3a346 test: adds test for text alignment shortcut
  • 1ccc57f refactor: replaced inline string literals with constants
  • 74b7a6d refactor: Combine redundant code functions into a single, cohesive function
  • a1f5cbd style: Fix spelling in code for consistency
  • 325bbf9 refactor: Remove unnecessary IIFE async wrapper function

📊 Changes

4 files changed (+133 additions, -6 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/document/document_alignment_test.dart (+49 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart (+3 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/align_toolbar_item/align_toolbar_item.dart (+10 -6)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/align_toolbar_item/custom_text_align_command.dart (+71 -0)

📄 Description

This fix is related to the feature request issue:

[FR] have a shortcut for text alignment: #3351

Added a feature that addresses the requirements of the issue, allowing users to align text in the document using shortcut keys. The implemented keyboard shortcuts are:

  • Ctrl+Shift+L: Align left
  • Ctrl+Shift+E: Align center
  • Ctrl+Shift+R: Align right

Additionally, included tests to ensure the functionality works as expected.
Screenshot 2024-01-06 at 9 24 00 PM

https://github.com/AppFlowy-IO/AppFlowy/assets/68953739/2de99899-5e58-4f9d-915a-c30efe73ca53


🔄 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/4319 **Author:** [@Jayaprakash-dev](https://github.com/Jayaprakash-dev) **Created:** 1/6/2024 **Status:** ✅ Merged **Merged:** 1/9/2024 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `feat_text_align_shortcut` --- ### 📝 Commits (6) - [`fb1f63a`](https://github.com/AppFlowy-IO/AppFlowy/commit/fb1f63a0e6bdef1f0bf8d63e8996479cdb2feb56) feat: support doc text alignment shortcut keys - [`1b3a346`](https://github.com/AppFlowy-IO/AppFlowy/commit/1b3a346c21ae368e24c7ff585beaf39dff26f923) test: adds test for text alignment shortcut - [`1ccc57f`](https://github.com/AppFlowy-IO/AppFlowy/commit/1ccc57fec97c3d3f4021c53cfbd32b6b38ba6a36) refactor: replaced inline string literals with constants - [`74b7a6d`](https://github.com/AppFlowy-IO/AppFlowy/commit/74b7a6ddbec7cfa9374baf81930944089c2814f0) refactor: Combine redundant code functions into a single, cohesive function - [`a1f5cbd`](https://github.com/AppFlowy-IO/AppFlowy/commit/a1f5cbd39dbd179cd543fd4f94411c268258db9c) style: Fix spelling in code for consistency - [`325bbf9`](https://github.com/AppFlowy-IO/AppFlowy/commit/325bbf94fc680ad79a1ebe176a93d68c597d9879) refactor: Remove unnecessary IIFE async wrapper function ### 📊 Changes **4 files changed** (+133 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/document/document_alignment_test.dart` (+49 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart` (+3 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/align_toolbar_item/align_toolbar_item.dart` (+10 -6) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/align_toolbar_item/custom_text_align_command.dart` (+71 -0) </details> ### 📄 Description This fix is related to the feature request issue: > [FR] have a shortcut for text alignment: #3351 Added a feature that addresses the requirements of the issue, allowing users to align text in the document using shortcut keys. The implemented keyboard shortcuts are: - `Ctrl+Shift+L`: Align left - `Ctrl+Shift+E`: Align center - `Ctrl+Shift+R`: Align right Additionally, included tests to ensure the functionality works as expected. <img width="1257" alt="Screenshot 2024-01-06 at 9 24 00 PM" src="https://github.com/AppFlowy-IO/AppFlowy/assets/68953739/1553f399-30a8-43e8-8092-53836be5bda1"> https://github.com/AppFlowy-IO/AppFlowy/assets/68953739/2de99899-5e58-4f9d-915a-c30efe73ca53 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:22:08 +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#6194
No description provided.