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

Fix/issue#59698 #59719

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Open

Fix/issue#59698 #59719

wants to merge 4 commits into from

Conversation

dabowman
Copy link

@dabowman dabowman commented Mar 8, 2024

What?

Adjusting the styling of the selectControl component and the inputControl component to account for situations where prefixes and suffixes are used. Also adding responsive type sizes to prefixes and suffixes.

Why?

This is to address issue #59698

How?

I added the provided wrapper components for prefixes and suffixes to the selectControl component to resolve the padding issue.
I added the responsive type styles to the prefix and suffix in the base inputControl component. Much of the styling of the selectControl seems to have been copy/pasted from inputControl but the prefix and suffix are using the base components styles. I added the responsiveness there to resolve it wherever it appears.

Testing Instructions

Open the selectControl and inputControl components in storybook.
Add prefix and suffix values
In selectControl, See that there is padding added to the left and right and in both selectControl and inputControl see that the type size is using the same responsive styles as the placeholder and value text.

dabowman added 4 commits March 8, 2024 11:52
adding logic to check if a prefix or suffix exists. Then adding the appropriate wrappers to the result
I noticed how the input control component this is based on was handling it's type sizes. That seemed like a cleaner place to make the change, rather than in the selectControl component where it seems like it needed to be over-ridden with a media query.
@dabowman dabowman requested a review from ajitbohra as a code owner March 8, 2024 20:10
Copy link

github-actions bot commented Mar 8, 2024

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core.
  • Labels found: [Package] Components, First-time Contributor.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

Copy link

github-actions bot commented Mar 8, 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: dabowman <[email protected]>
Co-authored-by: mirka <[email protected]>

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

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Mar 8, 2024
Copy link

github-actions bot commented Mar 8, 2024

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @dabowman! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@t-hamano t-hamano linked an issue Mar 9, 2024 that may be closed by this pull request
@t-hamano t-hamano added the [Package] Components /packages/components label Mar 9, 2024
@mirka mirka requested a review from a team March 11, 2024 06:41
@mirka
Copy link
Member

mirka commented Mar 11, 2024

Currently discussing the best approach in #59698.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Package] Components /packages/components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style errors in selectControl prefix
3 participants