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

List: Hitting delete at the beginning of the last list item doesn't exit the block #53195

Open
danielbachhuber opened this issue Jul 31, 2023 · 7 comments
Labels
[Block] List Affects the List Block [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... Needs Decision Needs a decision to be actionable or relevant Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@danielbachhuber
Copy link
Member

When I hit delete on the beginning of the last list item in Google Docs, it breaks out of the list:

CleanShot 2023-07-31 at 13 23 57

However, when I do the same in the Block Editor, it moves the last list item to the end of the prior list item:

CleanShot 2023-07-31 at 13 25 35

I would expect the Block Editor to behave like Google Docs.

@jordesign jordesign added [Type] Enhancement A suggestion for improvement. [Block] List Affects the List Block labels Aug 1, 2023
@hanneslsm
Copy link

Not sure about this one.
Google Docs uses tabs, which is not really a thing in web. Would this be done with a tab then, padding, margin or something else? Or it stays a <li> but doesn't display the bullet point?

@annezazu annezazu changed the title Hitting delete on the beginning of the last list item doesn't break it out of the list List v2: Hitting delete at the beginning of the last list item doesn't exit Aug 3, 2023
@annezazu annezazu changed the title List v2: Hitting delete at the beginning of the last list item doesn't exit List v2: Hitting delete at the beginning of the last list item doesn't exit the block Aug 3, 2023
@danielbachhuber
Copy link
Member Author

Would this be done with a tab then, padding, margin or something else? Or it stays a <li> but doesn't display the bullet point?

Oh, I think we can ignore the tab that Google Docs adds. We can simply take the last list item to a paragraph block.

@mtias mtias added the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label Aug 4, 2023
@mtias mtias changed the title List v2: Hitting delete at the beginning of the last list item doesn't exit the block List: Hitting delete at the beginning of the last list item doesn't exit the block Aug 4, 2023
@mtias mtias added the Needs Design Feedback Needs general design feedback. label Aug 4, 2023
@Marc-pi
Copy link

Marc-pi commented Aug 4, 2023

well, first of all we need to fix the way this block is generating Lists/Sublists, because it mess it up, to make it far more robust.
see #53353

@ellatrix
Copy link
Member

I'm also not sure about this one. Pressing Backspace would be a bit jarring if a list item in the middle splits the list in two with a paragraph in between, which also adds margins.

@allisonplus
Copy link

My concern is that users less familiar with blocks would end up with multiple ul's without realizing the lists are splitting somewhere in the middle.

@ellatrix
Copy link
Member

ellatrix commented Oct 6, 2023

Just checked in Apple notes, and it behaves the same as Gutenberg.

Google Docs' concept of list items is very different, it is similar to MS Word: each list item is just a "styled" paragraph and internally there's no concept of nesting. Sure the list items are indented, but they are not nested. They don't need to handle having to break out of a list grouping.

@ellatrix ellatrix added the Needs Decision Needs a decision to be actionable or relevant label Oct 6, 2023
@ellatrix
Copy link
Member

ellatrix commented Oct 6, 2023

Oh, here you can see how Docs/Word represent lists internally by the garbage HTML we get handed on paste: #46832.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... Needs Decision Needs a decision to be actionable or relevant Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants