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

[Document list] List items are not removed correctly with backspace #11347

Open
FilipTokarski opened this issue Feb 28, 2022 · 7 comments
Open
Assignees
Labels
package:list squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@FilipTokarski
Copy link
Member

FilipTokarski commented Feb 28, 2022

Part of #11377.

📝 Provide detailed reproduction steps (if any)

  1. Switch to ck/10812-document-list-editing
  2. Create a few list items
  3. In an empty list item press backspace

✔️ Expected result

Item gets removed, cursor goes up to the previous list item.

❌ Actual result

Cursor does not go to the previous list item. All other list items get spaced out, which looks bad. Only after second backspace they get back to normal.

Screencast

0_list2.mp4

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@FilipTokarski FilipTokarski added type:bug This issue reports a buggy (incorrect) behavior. package:list squad:core Issue to be handled by the Core team. labels Feb 28, 2022
@Reinmar
Copy link
Member

Reinmar commented Mar 2, 2022

Document-wise, that's an expected behavior. That's exactly what happens in Google Docs.

However, in GDoc when item 3 is merged into item 2, the item 2 is not moved "down". Additional spacing appears, but it affects item 3 only. We may want to improve styling for blocks inside lists a bit to mimic this.

@Reinmar
Copy link
Member

Reinmar commented Mar 2, 2022

That's how it works on Google Docs:

Mar-02-2022.11-28-33.mp4

Note, that I have paragraphs ("Normal text") style in Google Docs to have bigger space after them:

image

If you'd test it with the default styles that Google Docs come with (no spacing around paragraphs), it would look a bit differently:

Mar-02-2022.11-50-23.mp4

To sum up:

  • The document changes as expected.
  • We could change the styling a bit to make it less confusing.

@arkflpc arkflpc self-assigned this Apr 5, 2022
@Reinmar
Copy link
Member

Reinmar commented Apr 11, 2022

Goals:

  • Try to limit the visual noise when merging two paragraphs into one list item
  • But don't overdo it – let's not overcomplicate the stylesheets

@oleq
Copy link
Member

oleq commented Apr 11, 2022

.ck-content li > p {
    margin: 0;
}

for starters and let's see where do we go from here.

@Reinmar Reinmar changed the title List items are not removed correctly with backspace [Document list] List items are not removed correctly with backspace Apr 11, 2022
@Witoso
Copy link
Member

Witoso commented Sep 11, 2023

Decision

Let's apply this style to the first (margin-top) / last paragraphs (margin-bottom).

To test

Nested ol/ul, and discovery the last paragraph before next list item.

@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 Sep 11, 2023
@pszczesniak pszczesniak self-assigned this Sep 27, 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. status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. labels Sep 27, 2023
@Reinmar
Copy link
Member

Reinmar commented Aug 7, 2024

Related ticket: #16866.

@Reinmar
Copy link
Member

Reinmar commented Aug 7, 2024

Related (not functionally, but due to combined confusion that these issues create together): #16884.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

7 participants