-
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
add ability to show drop cap setting in paragraph block by default #45994
add ability to show drop cap setting in paragraph block by default #45994
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
Size Change: +52 B (0%) Total Size: 1.31 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.
The enhancement works as expected 👍
Since the dropCap
isn't a global typography feature, does it make sense to add this setting to its default controls?
@aaronrobertshaw, what do you think?
Thanks for putting this PR together @fabiankaegy and the ping @Mamaduka 👍 Given drop cap is a bespoke control, only relevant to the paragraph block, and generally is still infrequently used, I think it not being a default control is the right approach. I'm not against themes or plugins being able to elevate its prominence but toggling a non-block-support control via the block supports configuration doesn't seem like the right place to me. You can find some additional context and history in #36334 (comment). As part of that conversation it was floated that the drop cap setting might be moved outside of the typography panel eventually. @jasmussen might have better insight into where the drop cap control best fits now the block inspector sidebar is continuing to evolve. Ultimately, I think it would be best to avoid muddying the block supports configuration if we can avoid it. |
One of the challenges we have with the dropcap control, right now, is that it's a blunt boolean toggle. You cannot change size, font, style, margin, row-span, or anything like that. And ideally, you should be able to control all of those, so you can truly customize and have elaborate designs. In fact, I believe TwentyTwentyTwo disables the drop-cap by default, making it entirely inaccessible, mainly because there isn't a guarantee that the default drop cap values will look good across the various bundled style variations. In that light, the control itself is due for some design ideation: what would it look like if it wasn't just a toggle, but a toggle that offered various drop cap styles? A toggle that when enabled offered additional tools such as rowspan, font, style, and spacing options. What would that look like? And perhaps more importantly, what would that look like in theme.json definitions? Those options seem worth figuring out as a starting point. Once we have a clearer picture of that, it might also be clearer whether it's a control that is useful to surface by default, and where to surface it. |
Is there an issue opened for adding these drop cap style options? |
I'm not aware of one. |
Closing this PR as the approach isn't the right fit :) |
What?
Add the ability for developers to modify whether the Drop Cap setting should be shown by default in the paragraph block.
Closing: #45755
Why?
If the Drop Cap style is a commonly used tool it is frustrating that with the recent change to the tools panel there now always is an additional click to achieve this design. This update allows developers to modify which default controls get shown. Same as they already can for all the other tool panels that get registered via the block supports system.
How?
Adding the
isShownByDefault
property to theToolsPanelItem
component.Testing Instructions
You can test this in two ways:
dropCap
option to the__experimentalDefaultControls
in theblock.json
of the paragraph block