Skip to content

Stop displaying FontSizePicker dropdown when there are no fonts.#13782

Merged
jorgefilipecosta merged 2 commits intoWordPress:masterfrom
Naerriel:fix/font-picker-present-with-no-fonts
Feb 11, 2019
Merged

Stop displaying FontSizePicker dropdown when there are no fonts.#13782
jorgefilipecosta merged 2 commits intoWordPress:masterfrom
Naerriel:fix/font-picker-present-with-no-fonts

Conversation

@Naerriel
Copy link
Copy Markdown
Contributor

@Naerriel Naerriel commented Feb 8, 2019

Description

Closes #11628.
The FontSizePicker currently displays a dropdown with fonts, even when there are no fonts.
This change stops displaying the dropdown in this case.

How has this been tested?

In packages/components/src/font-size-picker/index.js I overwrote fontSizes to [] and the dropdown would not display anymore.
Ran npm run test and see that all tests passes.

Screenshots

image

Types of changes

Bug fix.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Paragraph Affects the Paragraph Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hide the Font Size picker on Paragraph blocks when there is only one size defined

6 participants