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

FontSizerPicker: Improve docs for default units #60996

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

mirka
Copy link
Member

@mirka mirka commented Apr 23, 2024

What?

Clarify in the docs/code for FontSizerPicker that there is a default value for the units prop.

Why?

I noticed when reviewing #60607 that this was unclear.

Testing Instructions

  • In the "With Units" story for FontSizePicker, click on the "Set custom size" button to reveal the number input. The unit dropdown should still show the default units.
  • Passing a custom unit array to the units prop should still work, which is asserted by this unit test.

@mirka mirka added [Type] Developer Documentation Documentation for developers [Package] Components /packages/components labels Apr 23, 2024
@mirka mirka self-assigned this Apr 23, 2024
@mirka mirka requested a review from ajitbohra as a code owner April 23, 2024 12:12
@@ -84,7 +84,6 @@ Default.args = {
size: 26,
},
],
units: [ 'px', 'em', 'rem' ],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing from the story args to make it clearer what the default is.

Copy link

github-actions bot commented Apr 23, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks 🚀

@mirka mirka merged commit 425c5c0 into trunk Apr 23, 2024
59 of 61 checks passed
@mirka mirka deleted the fix/font-size-picker-docs-units branch April 23, 2024 16:34
@github-actions github-actions bot added this to the Gutenberg 18.3 milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants