-
Notifications
You must be signed in to change notification settings - Fork 825
Forms: Update slider default and increment controls #44803
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
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
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.
LGTM, works as described
@@ -0,0 +1,4 @@ | |||
/* Ensure equal width for paired controls in the slider field inspector */ | |||
.jp-field-slider-inspector-row.components-h-stack > div { |
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.
It can come to bite is in future to use internal classes to components, as they might change in future.
Now to conflict a bit what I'm saying above, we could use __unstableInputWidth="100%"
insetead. That can change/break, but not without warning, and the whole number field is marked as experimental.
Docs: https://wordpress.github.io/gutenberg/?path=/docs/components-numbercontrol--docs
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.
I experimented with this for a bit, but that __unstableInputWidth is odd and I can't get it to work. For starters, based on the docs, it expects an object as an argument. I tried percentages in any case, but the percentage effects were inconsistent, so applying this to all the Number controls on this page did not give even, consistent size/spacing. For now, I removed .component-h-stack so we're just using our custom CSS. I know still not idea, but I'll push for now to keep it moving and revisit if worth doing so.
51d3b87
to
065bfd9
Compare
Partially addresses FORMS-66
Proposed changes:
This updates controls for the new Slider field block to match designs. Specifically:
Before

After

Original designs

Other information:
Jetpack product discussion
None.
Does this pull request change what data or activity we track or use?
No.
Testing instructions: