-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 issue with appender jumping when creating a new pattern. #59582
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. |
Size Change: +35 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
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, thanks!
What?
Related to #59550. Fix issue where the empty appender jumps when going from the appender button to the paragraph block.
How?
Margin rules exist to zero out the top margin of the first paragraph block, and the bottom margin of the last. Those rules do not exist for the incarnation of the paragraph appender, when used in the "create new pattern" flow. This appender is a button component that exists in the canvas as a prompt to start typing, so that the document can be empty until you actually click it and a paragraph block is added.
This PR fixes it by adding the rules needed. Before, a shift:
After, no shift:
Testing Instructions
Test empty documents across the editor. New pages, new posts, new patterns, anything that has the empty appender. There should be no layout shift when going from the truly empty state of the document, to the one where an empty paragraph block has been inserted.