Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable drag-and-drop functionality for text in the editor #685

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Jayaprakash-dev
Copy link
Contributor

I made this PR after coming across the issue Drag & drop content #3980. It restricts dragging and dropping block components, allowing only the movement of plain text.

This feature allows users to select text and drag it to a preferred location within the editor. The implementation ensures that only the plain text of the selection is copied, without including the node delta or any of node data associated
with the selected text. Instead, it 'adapts to the node' it is going to be placed in.

appflowy.drag.and.drop.text.feat.demo_comp.mov

@LucasXu0 LucasXu0 self-requested a review January 24, 2024 14:43
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: Patch coverage is 46.86567% with 178 lines in your changes missing coverage. Please review.

Project coverage is 75.70%. Comparing base (3cd5602) to head (cde0f60).
Report is 95 commits behind head on main.

Files Patch % Lines
...t/service/selection/desktop_selection_service.dart 25.38% 97 Missing ⚠️
...ib/src/render/selection/dashed_cursor_painter.dart 0.00% 21 Missing ⚠️
lib/src/editor_state.dart 77.77% 8 Missing ⚠️
...block_component/bulleted_list_block_component.dart 61.11% 7 Missing ⚠️
...ading_block_component/heading_block_component.dart 61.11% 7 Missing ⚠️
...block_component/numbered_list_block_component.dart 61.11% 7 Missing ⚠️
...aph_block_component/paragraph_block_component.dart 50.00% 7 Missing ⚠️
...t/quote_block_component/quote_block_component.dart 61.11% 7 Missing ⚠️
...ist_block_component/todo_list_block_component.dart 61.11% 7 Missing ⚠️
...base_component/selection/block_selection_area.dart 71.42% 6 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #685      +/-   ##
==========================================
- Coverage   76.46%   75.70%   -0.76%     
==========================================
  Files         295      296       +1     
  Lines       13094    13419     +325     
==========================================
+ Hits        10012    10159     +147     
- Misses       3082     3260     +178     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant