[PR #5054] [MERGED] feat: code block improvements #6608

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/5054
Author: @Xazin
Created: 4/3/2024
Status: Merged
Merged: 4/10/2024
Merged by: @LucasXu0

Base: mainHead: feat/code-block-improvements


📝 Commits (10+)

  • 070adf2 feat: prettify code block component + copy code
  • 64326e1 feat: search for languages in code block
  • 024f8b4 feat: non-collapsed selection indentation in code block
  • fe0e722 fix: focus workaround for language search
  • 23ff6b1 feat: multi selection outdent
  • a147ba2 feat: add line numbering
  • 39c2b8c feat: prefer built in mono font for code block
  • 21507ef fix: add clamping physics to scrollview
  • eadd637 feat: pseudo auto indent and fix rebuild issue
  • bf10ab3 chore: merge branch 'upstream/main' into feat/code-block-improvements

📊 Changes

11 files changed (+635 additions, -199 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/document/application/document_appearance_cubit.dart (+5 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart (+4 -7)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart (+11 -4)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/format_arrow_character.dart (+78 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/selectable_item_list_menu.dart (+15 -9)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_component.dart (+399 -102)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_shortcut_event.dart (+94 -59)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_style.dart (+12 -3)
📝 frontend/appflowy_flutter/lib/workspace/application/settings/appearance/base_appearance.dart (+3 -1)
📝 frontend/appflowy_flutter/packages/appflowy_popover/lib/src/popover.dart (+7 -11)
📝 frontend/resources/translations/en.json (+7 -3)

📄 Description

Closes: #5034
Closes: #3478
Closes: #4967
Closes: #4971
Closes: #4405

Feature Preview

https://github.com/AppFlowy-IO/AppFlowy/assets/42929161/425b082a-b2cc-4d79-a107-b79a61a5003f

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/5054 **Author:** [@Xazin](https://github.com/Xazin) **Created:** 4/3/2024 **Status:** ✅ Merged **Merged:** 4/10/2024 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `feat/code-block-improvements` --- ### 📝 Commits (10+) - [`070adf2`](https://github.com/AppFlowy-IO/AppFlowy/commit/070adf26cb5c07ed71babab9145ee4b975458643) feat: prettify code block component + copy code - [`64326e1`](https://github.com/AppFlowy-IO/AppFlowy/commit/64326e1a3941961c808638fce07606fb6c9b7eea) feat: search for languages in code block - [`024f8b4`](https://github.com/AppFlowy-IO/AppFlowy/commit/024f8b41d4b718ba46037846ab240c2b806d171a) feat: non-collapsed selection indentation in code block - [`fe0e722`](https://github.com/AppFlowy-IO/AppFlowy/commit/fe0e72274213c54c90fdcbe7bbc9d0c8b9ea69fb) fix: focus workaround for language search - [`23ff6b1`](https://github.com/AppFlowy-IO/AppFlowy/commit/23ff6b11366d2c120c163d8d502d589fb60b9a95) feat: multi selection outdent - [`a147ba2`](https://github.com/AppFlowy-IO/AppFlowy/commit/a147ba29b8cce8e1dba8022ce866c3ad9de997e5) feat: add line numbering - [`39c2b8c`](https://github.com/AppFlowy-IO/AppFlowy/commit/39c2b8c17cd5027f3f67a2f1e29a04933c6f71cc) feat: prefer built in mono font for code block - [`21507ef`](https://github.com/AppFlowy-IO/AppFlowy/commit/21507ef72f72468c485b5e8dbb9d861d7d7ff6bb) fix: add clamping physics to scrollview - [`eadd637`](https://github.com/AppFlowy-IO/AppFlowy/commit/eadd6375642b6319699f34f68d9e7b66247e2c3b) feat: pseudo auto indent and fix rebuild issue - [`bf10ab3`](https://github.com/AppFlowy-IO/AppFlowy/commit/bf10ab3bd7cb6127bfb6eb86da58c764d707c400) chore: merge branch 'upstream/main' into feat/code-block-improvements ### 📊 Changes **11 files changed** (+635 additions, -199 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/document/application/document_appearance_cubit.dart` (+5 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart` (+4 -7) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart` (+11 -4) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/format_arrow_character.dart` (+78 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/selectable_item_list_menu.dart` (+15 -9) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_component.dart` (+399 -102) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_shortcut_event.dart` (+94 -59) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_style.dart` (+12 -3) 📝 `frontend/appflowy_flutter/lib/workspace/application/settings/appearance/base_appearance.dart` (+3 -1) 📝 `frontend/appflowy_flutter/packages/appflowy_popover/lib/src/popover.dart` (+7 -11) 📝 `frontend/resources/translations/en.json` (+7 -3) </details> ### 📄 Description Closes: #5034 Closes: #3478 Closes: #4967 Closes: #4971 Closes: #4405 ### Feature Preview https://github.com/AppFlowy-IO/AppFlowy/assets/42929161/425b082a-b2cc-4d79-a107-b79a61a5003f #### 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. - [x] 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:15:44 +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#6608
No description provided.