[PR #6611] [MERGED] fix: use drop path rather than node #7489

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6611
Author: @Xazin
Created: 10/23/2024
Status: Merged
Merged: 10/25/2024
Merged by: @Xazin

Base: mainHead: fix/drop-path-over-node


📝 Commits (3)

📊 Changes

4 files changed (+97 additions, -12 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_drop_handler.dart (+2 -8)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/paste_from_file.dart (+2 -2)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/paste_from_image.dart (+2 -2)
frontend/appflowy_flutter/test/unit_test/editor/editor_drop_test.dart (+91 -0)

📄 Description

If the path doesn't exist (because it's dropped after the last node), the getNodeAtPath will return null, but we should still insert the dropped images/files.

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/6611 **Author:** [@Xazin](https://github.com/Xazin) **Created:** 10/23/2024 **Status:** ✅ Merged **Merged:** 10/25/2024 **Merged by:** [@Xazin](https://github.com/Xazin) **Base:** `main` ← **Head:** `fix/drop-path-over-node` --- ### 📝 Commits (3) - [`eafe0ec`](https://github.com/AppFlowy-IO/AppFlowy/commit/eafe0ec81ae0591b4c0ac761c81ef34d2d92597a) fix: use drop path rather than node - [`cea0044`](https://github.com/AppFlowy-IO/AppFlowy/commit/cea0044aa1bd30485a3f03e208803e59ebf298af) test: add unit tests - [`9c94990`](https://github.com/AppFlowy-IO/AppFlowy/commit/9c9499058741b68e27d05b314a81e3b4f8dcf08b) test: more test cases ### 📊 Changes **4 files changed** (+97 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_drop_handler.dart` (+2 -8) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/paste_from_file.dart` (+2 -2) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/paste_from_image.dart` (+2 -2) ➕ `frontend/appflowy_flutter/test/unit_test/editor/editor_drop_test.dart` (+91 -0) </details> ### 📄 Description If the path doesn't exist (because it's dropped after the last node), the `getNodeAtPath` will return null, but we should still insert the dropped images/files. #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] 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 23:19:51 +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#7489
No description provided.