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

Add SizeControl component #62866

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Draft

Conversation

matiasbenedetto
Copy link
Contributor

@matiasbenedetto matiasbenedetto commented Jun 26, 2024

What?

Provide a new UI component to define a size.

This PR extracts a part of the FontSizePicker controller and makes it a new independent controller that can be used inside the FontSizePicker controller and as a stand-alone controller.

Why?

The new SizeControl provides an agnostic UI to define a size that could be used to define not only font sizes but spacings and probably other settings.

Most of the SizeControl component UI and logic already exist inside the FontSizePicker control, making it impossible to reuse them outside of it.

This component could be used in the implementation of these two interfaces:

How?

Extracting the UI and logic from FontSizePicker and making it a stand-alone component, simplifying the logic where possible.

Testing Instructions

  • Run unit tests
  • Use the storybook stories of the SizeControl component.

Screenshots or screencast

image

See screencasts of the component in use in #62328

Copy link

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: matiasbenedetto <mmaattiiaass@git.wordpress.org>

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

@matiasbenedetto matiasbenedetto added the [Feature] UI Components Impacts or related to the UI component system label Jun 26, 2024
@matiasbenedetto matiasbenedetto marked this pull request as draft June 26, 2024 10:18
@mirka
Copy link
Member

mirka commented Jun 26, 2024

Related (?): #61180

@priethor priethor added the [Type] Feature New feature to highlight in changelogs. label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Feature New feature to highlight in changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants