Skip to content
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

Font Size Picker: Add default size #18273

Merged
merged 6 commits into from Dec 18, 2019
Merged

Font Size Picker: Add default size #18273

merged 6 commits into from Dec 18, 2019

Conversation

@mmtr
Copy link
Contributor

mmtr commented Nov 4, 2019

Description

Adds a default option to the font size picker component that unsets any font size.

Previously, the font size selector was falling back to the normal size, but this size might have not been defined by theme.

Fixes #17908

How has this been tested?

  • Activated the Twenty Twenty theme or any other theme providing font sizes not including a normal size (Twenty Twenty recently added a normal font size: WordPress/twentytwenty#989).
  • Created a new post and added some paragraph blocks.
  • Made sure the Text Settings on the right sidebar has the "Default" font size, with no font size applied to the block.
  • Tried setting any other font size and made sure it worked as expected.
  • Clicked on "Reset" and verified the selector changed to "Default", with no font size applied to the block.
  • Removed the font size number (after toggling any font size) and verified the selector changed to "Default", with no font size applied to the block.

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.
@kwight

This comment has been minimized.

Copy link

kwight commented Nov 13, 2019

Works great 👍

Copy link
Member

jorgefilipecosta left a comment

I left some comments, but the general idea looks good to me :)

@mmtr mmtr force-pushed the fix/17908-default-font-size branch from b1aaff8 to c27a740 Nov 15, 2019
@mmtr mmtr force-pushed the fix/17908-default-font-size branch from c27a740 to 62ee44f Nov 29, 2019
@mmtr mmtr requested review from nerrad and ntwb as code owners Nov 29, 2019
@mmtr mmtr force-pushed the fix/17908-default-font-size branch from 50a5478 to 88114ee Nov 29, 2019
@mmtr mmtr force-pushed the fix/17908-default-font-size branch from 88114ee to 4e9be65 Dec 16, 2019
Copy link
Member

jorgefilipecosta left a comment

Works well on my tests 👍

@mmtr mmtr merged commit a039edb into master Dec 18, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@mmtr mmtr deleted the fix/17908-default-font-size branch Dec 18, 2019
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.