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

Empty last List Element should not be displayed #65876

Open
Gulamdastgir-Momin opened this issue Oct 4, 2024 · 6 comments
Open

Empty last List Element should not be displayed #65876

Gulamdastgir-Momin opened this issue Oct 4, 2024 · 6 comments
Labels
[Block] List Affects the List Block [Type] Enhancement A suggestion for improvement.

Comments

@Gulamdastgir-Momin
Copy link

While using the List Block (core/list) in the block editor, I noticed that if the last element in the list is left empty, an empty bullet point is still rendered on the front-end. This issue occurs when a user inadvertently adds an extra list item but does not enter any content. Ideally, the block should not display a bullet point for empty list items.Image
Image

@Gulamdastgir-Momin Gulamdastgir-Momin added the [Type] Enhancement A suggestion for improvement. label Oct 4, 2024
@Mamaduka Mamaduka added the [Block] List Affects the List Block label Oct 4, 2024
@vk17-starlord
Copy link
Contributor

@Mamaduka can i look into this issue ?

@praful2111
Copy link

@Mamaduka I have tested the patch and it working fine.

@nani-samireddy
Copy link

Thank you @praful2111 for taking time and testing it

@Gulamdastgir-Momin and @Mamaduka Can you please also take a look at this #66344

@Gulamdastgir-Momin
Copy link
Author

@nani-samireddy Yeah, I have tested and It Looks good to me !

@ellatrix
Copy link
Member

Hi!

It's not like this list item is invisible in the editor, but becomes visible on the front-end. The user can remove it. I'm sorry, but I think this is not a bug. I really don't like us auto removing/trimming stuff.

@ellatrix
Copy link
Member

Perhaps remove the placeholder. Only show it when there's one empty list item. That way it's clearer that the list item at the end is empty in the editor too.

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 [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants