-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
TextControl
: Add opt-in prop for 40px default size
#55471
Conversation
Size Change: +209 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
Flaky tests detected in 5c806c4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6777428725
|
71c3911
to
642be60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of comments, but this is looking good!
cc'ing @jameskoster and @richtabor
packages/editor/src/components/post-publish-panel/test/__snapshots__/index.js.snap
Outdated
Show resolved
Hide resolved
Nice. Should we also update that 29px default height to 32px here (related: #55490)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me! No new comments to add, but I'll let @ciampo approve after previous feedback is addressed.
642be60
to
a5d3433
Compare
From the PR you mentioned:
With the above context, I assume a 3px change is also okay to proceed with? |
Hey @jameskoster , to make sure we're on the same page here: in this PR we are working towards transitioning |
Hm, thinking beyond the Editor, forcing 40px in all situations might be a bit heavy-handed? It's fine as a default, but there could be scenarios that call for a smaller control. cc @jasmussen @SaxonF @richtabor for more thoughts on that. |
The idea is 40px is the default, but the compact 32px can be used on a per-basis case. 40px is the tall and graceful, neatly clickable on big screens and phones, default. I'd turn the question around, why would you want a 32px default? |
Unless I'm mistaken I think the question was about whether 32px is needed at all, not whether it's the default. |
32 feels useful across buttons and text controls both, as they might appear next to each others, IMO. |
This sounds sensible. However, since I don't remember this being included in the initial specs, it may be beneficial to understand what other components we may need to render at a We can keep this PR as-is (focused on starting the transition to |
I'd imagine any control that we're making 40px could also use a 32px size variant. |
Even more so, then, let's discuss this holistically so that we can have as much of a coherent approach as possible, since this feels like a departure from the specs shared here, where For this PR, I think it's fine to update the current default size from 29 to 32px, knowing that it will be eventually become 40px. |
823aad2
to
c93b3de
Compare
c93b3de
to
5c806c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM 🚀 🚢
Part of #46741
What?
Add a new opt-in prop
__next40pxDefaultSize
to TextControl, following the plan outlined in above mentioned PR.Why?
For more consistency in styling.
How?
A new, temporary
__next40pxDefaultSize
prop. When the prop is set totrue
, the input will have a height of 40px instead of 29px.Testing Instructions
In Storybook:
npm run storybook:dev
__next40pxDefaultSize
set tofalse
__next40pxDefaultSize
totrue
In the editor
Smoke test the component in the editor; TextControl shouldn't have any visible changes for now.