-
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
Paragraph: Update condition for rendering Drop Cap for a selected block #67111
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @briannaneiderman, @Tmeemu. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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: +3 B (0%) Total Size: 1.82 MB
ℹ️ View Unchanged
|
Yes, I think this is ok personally. |
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.
Would be cool to have a test theme or something some e2e test where we disable everything and check the behavior of the editor.
I will try introducing a similar test without adding another custom theme to the test suite. It will most likely be later this week; meanwhile, PR is open for feedback. |
I don't have time at the moment to work on e2e tests, so I'm going to merge this and handle those later. |
What?
Fixes #61231.
PR prevents the typography panel from rendering with empty children without creating store subscriptions for every Paragraph block in the canvas (#56967).
Why?
The Typography panel shouldn't be rendered when a consumer disabled all options.
How?
Move
InspectorControls
withinDropCapControl
and only render it for the currently selected block.Note
One downside to this solution is that Drop Cap won't be available when multi-editing paragraphs. I'm not sure how often consumers actually need this.
Testing Instructions
See: #61231 (comment)
Testing Instructions for Keyboard
Same.