-
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
Revert: Show empty paragraphs on fronted. #29809
Conversation
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 don't like it, but reverting this change does fix the regression with shortcodes.
Thank you for the quick fix!
Thank you Ari. I'd appreciate thoughts from Kjell or Ben before we merge this one. Just in case there's a solution other than a revert that I'm not seeing. |
Size Change: -120 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
It is not only shortcodes that have been affected by this, extra p tags are sometimes added when blocks in full site editing themes are rendered on the front. Until those extra p tags have been solved, I think this revert is needed. |
I think @joyously made a good point:
I wasn't aware of this, but it is true in my testing. Reverting seems best for now. |
Thanks all. I'll merge when the checks pass and we can look at this again in the future. |
3dba434
to
23795e8
Compare
I can't get the e2e tests to pass here. Any insights? |
23795e8
to
237ec4a
Compare
@gwwar Fixed the tests, I rebased and merged for you 🎉 |
Description
This PR is a followup to feedback in #27995 (comment) and https://core.trac.wordpress.org/ticket/52764.
In 27995 we merged a change where an empty paragraph written in the editor, would correspond to en empty paragraph on the frontend. This fixed #10051.
However shortcodes when they get parsed commonly generate lots of empty paragraphs (
<p></p>
), which causes layout issues when those get inflated.This PR reverts the change.
Editor/frontend before:
Editor/frontend after:
How has this been tested?
Insert text, then a slew of linebreaks, then text again, and compare editor with frontend.
Observe that before, editor and frontend would match perfectly. Observe that after this PR, the paragraphs on the frontend collapse to zero height.
Types of changes
It's unfortunate that we might not be able to get accurate behavior here. But it is potentially something that could be revisited in the future.
Let me know your thoughts!
Checklist: