[PR #3151] [MERGED] fix: paste multiple lines in codeblock #5602

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3151
Author: @MayurSMahajan
Created: 8/9/2023
Status: Merged
Merged: 8/30/2023
Merged by: @LucasXu0

Base: mainHead: fix_multiline_paste_2992


📝 Commits (10+)

  • 6a77988 fix: paste multiple lines in codeblock
  • e30df6c fix: works with non collapsed selection
  • 8500927 Merge remote-tracking branch 'upstream/main' into fix_multiline_paste_2992
  • 527bfd5 Merge remote-tracking branch 'upstream/main' into fix_multiline_paste_2992
  • 249d8a1 Merge remote-tracking branch 'upstream/main' into fix_multiline_paste_2992
  • 5e0217f chore: localize code block
  • 8b91a31 test: multiline paste in codeblock
  • 6856056 chore: remove unused import
  • 308787d Merge remote-tracking branch 'upstream/main' into fix_multiline_paste_2992
  • 0b57344 fix: only hanlde code block paste command if all the selected nodes are code block

📊 Changes

5 files changed (+127 additions, -3 deletions)

View changed files

frontend/appflowy_flutter/integration_test/document/document_codeblock_paste_test.dart (+60 -0)
📝 frontend/appflowy_flutter/integration_test/document/document_test_runner.dart (+2 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_component.dart (+3 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_shortcut_event.dart (+60 -1)
📝 frontend/resources/translations/en.json (+2 -1)

📄 Description

Solves: #2992

Feature Preview

https://github.com/AppFlowy-IO/AppFlowy/assets/47064215/1afb675d-5e3f-4631-88d3-f5c0c27095d3


PR Checklist

  • My code adheres to the AppFlowy Style Guide
  • 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/3151 **Author:** [@MayurSMahajan](https://github.com/MayurSMahajan) **Created:** 8/9/2023 **Status:** ✅ Merged **Merged:** 8/30/2023 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `fix_multiline_paste_2992` --- ### 📝 Commits (10+) - [`6a77988`](https://github.com/AppFlowy-IO/AppFlowy/commit/6a7798861801eafbf8e2968e17f554e7da4ff567) fix: paste multiple lines in codeblock - [`e30df6c`](https://github.com/AppFlowy-IO/AppFlowy/commit/e30df6cc7445f373d603a8340fe65fde43e9b5cd) fix: works with non collapsed selection - [`8500927`](https://github.com/AppFlowy-IO/AppFlowy/commit/85009270b79f12cc085bd70fa0f7475a7b7ca45b) Merge remote-tracking branch 'upstream/main' into fix_multiline_paste_2992 - [`527bfd5`](https://github.com/AppFlowy-IO/AppFlowy/commit/527bfd57f6520f11cbb34aabc4756fc53eed270a) Merge remote-tracking branch 'upstream/main' into fix_multiline_paste_2992 - [`249d8a1`](https://github.com/AppFlowy-IO/AppFlowy/commit/249d8a18a247cbb15e41e5c7f2603395f7fc95b0) Merge remote-tracking branch 'upstream/main' into fix_multiline_paste_2992 - [`5e0217f`](https://github.com/AppFlowy-IO/AppFlowy/commit/5e0217f3d7071611d04384f5fa7ae5e5bf3ece80) chore: localize code block - [`8b91a31`](https://github.com/AppFlowy-IO/AppFlowy/commit/8b91a31db1e4892453ad95e468a5834833151545) test: multiline paste in codeblock - [`6856056`](https://github.com/AppFlowy-IO/AppFlowy/commit/68560566625fb68871312a191c1880943df37bef) chore: remove unused import - [`308787d`](https://github.com/AppFlowy-IO/AppFlowy/commit/308787ddb54062268a07249d3ec89fcf9bb48eab) Merge remote-tracking branch 'upstream/main' into fix_multiline_paste_2992 - [`0b57344`](https://github.com/AppFlowy-IO/AppFlowy/commit/0b57344346b1d0fb291464389caec6cae361dad1) fix: only hanlde code block paste command if all the selected nodes are code block ### 📊 Changes **5 files changed** (+127 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `frontend/appflowy_flutter/integration_test/document/document_codeblock_paste_test.dart` (+60 -0) 📝 `frontend/appflowy_flutter/integration_test/document/document_test_runner.dart` (+2 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_component.dart` (+3 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_shortcut_event.dart` (+60 -1) 📝 `frontend/resources/translations/en.json` (+2 -1) </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). --> Solves: #2992 <!--- 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 https://github.com/AppFlowy-IO/AppFlowy/assets/47064215/1afb675d-5e3f-4631-88d3-f5c0c27095d3 <!--- 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 the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides) - [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. - [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 22:19:28 +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#5602
No description provided.