FontSizePicker: Show min-max range for fluid font sizes in dropdown.#69956
FontSizePicker: Show min-max range for fluid font sizes in dropdown.#69956karthikeya-io wants to merge 1 commit intoWordPress:trunkfrom
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
We could have done with design feedback on the issue before jumping to PR so let's do that first then consider this PR after. For now please don't merge this until a direction is decided. |
|
It seems useful enough, and good motivation. My main question here is whether there's a good dropdown component that supports showing these two lines. The component in question, with the dark border, is an older one. I wonder, would you be able to use Menu instead? I think that could thread the needle, and show the ranges as help-text for each item. |
|
Closing this out now since the original issue was closed already. Thanks! |
What?
Closes #69939
This PR updates the
FontSizePickerSelectcomponent to improve how fluid font size presets are displayed in the dropdown. Instead of using thesizeproperty as the hint, it now shows values from thefluidproperty (minandmax) when they are available.Why?
Currently, the
FontSizePickerSelectcomponent uses thesizeproperty as the hint, even when thefluidproperty is present. However, thesizemay not accurately represent the rendered font size for fluid presets, as it is derived from the min–max fluid range.This change helps reduce confusion by explicitly displaying the fluid font size range in the UI.
How?
Updated the FontSizePickerSelect component to:
Fluid (min – max)when both are definedFluid (≥ min)when only min is definedFluid (≤ max)when only max is definedTesting Instructions
fluidproperty when its present.Note: Update
theme.jsonto have atleast 6 sizes to enable the dropdown selector instead of toggle.Testing Instructions for Keyboard
Same
Screenshots or screencast