-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix : Empty last List Element should not be displayed #66344
Fix : Empty last List Element should not be displayed #66344
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @nani-samireddy! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not sure about and looking for the feedback from @ellatrix!
@up1512001, you can also see that tests are failing, with usually means that PR isn't ready to be merged.
I checked the test failure issue and noticed that its due to this file <ul class="wp-block-list"><!-- wp:list-item -->
<li></li>
<!-- /wp:list-item --> with this <ul class="wp-block-list"><!-- wp:list-item /--> as on frontend we are not putting |
@up1512001, @nani-samireddy, I also see failures in e2e tests. |
Co-authored-by: nani-samireddy <[email protected]>
@Mamaduka one thing I notice during debugging
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, @Mamaduka any suggestions. 🙇
<!-- wp:list-item --> | ||
<li></li> | ||
<!-- /wp:list-item --> | ||
<!-- wp:list-item /--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not make any sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
It is missing a check while saving the list-item.
I don't understand this answer to "Why?"
This does not make sense to me at all. If the user adds a list item, it should be displayed.
Closing this PR based on this comment Thank you @ellatrix for confirming the expected behaviour of the list-item. Thank you @up1512001 and @Mamaduka for taking time and reviewing this |
Thanks for contributing, @nani-samireddy! |
What?
Closes #65876
As mentioned in the above issue. When we create a list and if we leave the last item empty. It renders a empty list item on the front-end.
Why?
When the user adds a list item then we are saving it as list item block. But if the list-item has no content then we are saving empty list-item. Resulting in a empty list-item element
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
before
After