-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add and apply a disabled picker button style #34057
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
|
Size Change: 0 B Total Size: 1.03 MB ℹ️ View Unchanged
|
|
Will review ASAP :-) |
|
I had trouble reproducing the original issue so I've pinged the author of wordpress-mobile/gutenberg-mobile#3800 and will loop back here once I get clarification. |
|
Speaking with @iamthomasbishop, we agreed that the issue this PR fixes is no longer reproducible in the editor. However, it still makes sense to go ahead with this change because: The Spacer block height control should show a disabled unit picker instead of not showing any unit at all:
The Cover block opacity control should also show a disabled unit picker instead of not showing any unit:
I think the best course of action would be to make the above fixes, and then merge this PR afterwards to ensure it correctly fixes the issues we see. I can make the above updates and then follow up and review and merge this PR. |
Sounds good. Thanks @guarani ! |
|
Unfortunately I didn't get to this, so I'm unassigning myself now that I'm no longer focusing on Gutenberg Mobile. |
|
I'll go ahead and close this PR as it's become stale, and we can always revive when needed. Thanks for your effort on this folks! ❤️ |


Description
Fixes wordpress-mobile/gutenberg-mobile#3800 by updating the styling of the
UnitControlunit button to look like a normal label when there is only a single unit option available (for example, "Pixel"). When this is the case the unit button is disabled and treated just as label and should only look like a label.How has this been tested?
The easiest way to test is to either figure out a block that has a setting that uses
UnitControlbut only has a single unit to pick from, or to change theisPickerButtonEnabledconstto return false like this:unitoption in theUnitControl. The screenshots below are from the Column block for example.isPickerButtonEnabled, be sure to revert that change first).Screenshots
Types of changes
Small styling changes that should not break anything.
Checklist:
*.native.jsfiles for terms that need renaming or removal).