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

[Drag & drop, intro] Blockquote formatting is lost #14640

Closed
Tracked by #13933
Witoso opened this issue Jul 24, 2023 · 7 comments Β· Fixed by #14891
Closed
Tracked by #13933

[Drag & drop, intro] Blockquote formatting is lost #14640

Witoso opened this issue Jul 24, 2023 · 7 comments Β· Fixed by #14891
Assignees
Labels
package:clipboard squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@Witoso
Copy link
Member

Witoso commented Jul 24, 2023

πŸ“ Provide detailed reproduction steps (if any)

In the experimental drag and drop:

Nagranie.z.ekranu.2023-07-11.o.14.49.29.mov

βœ”οΈ Expected result

Formatting is preserved.

❌ Actual result

Formatting is lost.


If you'd like to see this fixed sooner, add a πŸ‘ reaction to this post.

@Witoso Witoso added the type:bug This issue reports a buggy (incorrect) behavior. label Jul 24, 2023
@Witoso Witoso mentioned this issue Jul 24, 2023
16 tasks
@Witoso Witoso added package:clipboard squad:core Issue to be handled by the Core team. labels Jul 24, 2023
@Witoso Witoso changed the title [Drag & drop] Blockquote formatting is lost [Drag & drop, intro] Blockquote formatting is lost Aug 21, 2023
@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Aug 22, 2023
@filipsobol filipsobol self-assigned this Aug 25, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Aug 25, 2023
@filipsobol
Copy link
Member

What should happen when only part of the blockquote is selected? Is it "all or nothing" or should we automagically split the blockquote?

@Witoso
Copy link
Member Author

Witoso commented Aug 25, 2023

What should happen when only part of the blockquote is selected? Is it "all or nothing" or should we automagically split the blockquote?

I would say that we need to do a bit of predicting of the user intent (and choosing what's the strongest/most popular/maakes more sense).

Possible intents of partial select and dragging:

  1. I would like to split the quote into two quotes (it's too big? Parts of the quote in different parts of the document?) Β 
  2. I would like to extract something out of the quote. (I think this one is tricky, why it ended up in a quote? Semantically, part of a quote is a quote, extracting something to not be a quote only makes sense when it was added there mistakenly?).

I'm leaning towards, no 1. As an experiment, I added a quote from you to the top, and I wanted to extract "Is it (...)" to pull it above this sentence as a quote. This is a valid case, and nice behavior (if it worked πŸ˜› ). WDYT? @dagdzi

@dagdzi
Copy link

dagdzi commented Aug 28, 2023

@Witoso I am also leaning towards solution no 1.

Code blocks currently behave this way, and I think it's intuitive. When we repeat this behavior in the case of blockquote, it will also be a consistent solution.

@CKEditorBot CKEditorBot added status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Sep 4, 2023
@filipsobol
Copy link
Member

Due to technical limitations, in the PR #14891 we will only add support for extending the range when ALL child elements are selected. I've created a new issue #14940 to also extend the range when the selection touches the beginning or end of the parent elements.

@Witoso I've added this new issue to the list of New behaviors under the things could be moved v2. group in our D&D epic. Feel free to move it if you don't agree with this.

@Witoso
Copy link
Member Author

Witoso commented Sep 8, 2023

@filipsobol not sure what are the product/user consequences, it's a bit too tech for me to decide πŸ˜„

@filipsobol
Copy link
Member

Sorry, let me explain this better using the blockquote example from above.

With PR #14891, the blockquote style is only maintained if EVERYTHING within it is selected before dragging (Example 1).

However, it would be nice to maintain the blockquote style when the selection doesn't include everything, but touches the beginning or end of the blockquote (Examples 2 and 3). This is skipped for now due to technical limitations described in #14940.

Once this is fixed, the blockquote style will NOT be copied only if the selection doesn't touch any of the blockquote ends (Example 4).

Example 1: βœ”οΈ The blockquote style is copied when all paragraphs are selected.
Blockquote with all three paragraphs selected

Example 2: βœ”οΈ The blockquote style is copied when the first two paragraphs are selected (currently skipped).
Blockquote with first two paragraphs selected

Example 3: βœ”οΈ The blockquote style is copied when the last two paragraphs are selected (currently skipped).
Blockquote with last two paragraphs selected

Example 4: βœ–οΈ The blockquote style is NOT copied when only the middle paragraph is selected.
Blockquote with only the middle paragraph selected

@Witoso
Copy link
Member Author

Witoso commented Sep 8, 2023

Gotcha, so for now let's do the simplest case I agree, then we can move to more specific scenarios.

@illia-stv illia-stv assigned illia-stv and unassigned illia-stv Sep 13, 2023
filipsobol added a commit that referenced this issue Sep 15, 2023
…4891)

Feature (clipboard): Extend drag-and-drop selection to parent elements when all their children are selected. Closes #14640.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Sep 15, 2023
@CKEditorBot CKEditorBot added this to the iteration 67 milestone Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:clipboard squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants