-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Hide the Font Size picker on Paragraph blocks when there is only one size defined #11628
Copy link
Copy link
Closed
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first timeNeeds Technical FeedbackNeeds testing from a developer perspective.Needs testing from a developer perspective.Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.[Block] ParagraphAffects the Paragraph BlockAffects the Paragraph Block[Feature] UI ComponentsImpacts or related to the UI component systemImpacts or related to the UI component system[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Milestone
Metadata
Metadata
Assignees
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first timeNeeds Technical FeedbackNeeds testing from a developer perspective.Needs testing from a developer perspective.Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.[Block] ParagraphAffects the Paragraph BlockAffects the Paragraph Block[Feature] UI ComponentsImpacts or related to the UI component systemImpacts or related to the UI component system[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Is your feature request related to a problem? Please describe.

When the
editor-font-sizesarray has been limited to a single item, paragraphs only have one size. If custom font sizes are also disabled, the font size picker becomes a redundant control. See below screenshot:Describe the solution you'd like
When custom font sizes are disabled, and only a single
editor-font-sizeis set, the font size picker should not be displayed.For instance, given the following code:
I would expect to see the following:

Describe alternatives you've considered
This could potentially be solved on a case-by-case basis with some custom JS, or by creating a custom block. However, these are not particularly good solutions compared to a simple conditional statement in the original block definition.