-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update justification control in flex
layout
#34651
Update justification control in flex
layout
#34651
Conversation
Size Change: +53 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
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.
As described, I see the new buttongroup toggles for justification in the inspector, just like in the block toolbar, works well:
Giving tentative approval so we can land this as it's a big improvement over what's there. However I did leave one comment about how ideally we avoid adding unique classnames and writing CSS just for this one panel if we can. Ideally we find a way to make panels handle their form controls inside in a generalized way. Possibly a larger effort, but nevertheless a worthwhile one, so we don't proliferate the edgecase CSS.
Thanks so much for the fast followup 👌
|
||
.block-editor-hooks__flex-layout-justification-controls { | ||
legend { | ||
margin-bottom: 8px; |
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.
8px can be replaced by $grid-unit-10. But a larger question is, can this be handled in a more global fashion, rather than creating per-panel custom CSS? Ideally we slowly move towards generic reusable and systematized form controls as outlined in #27331, to avoid bespoke CSS like this.
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.
Totally agree but as you mentioned and know it's a larger effort and this follow up is an enhancement to the current one!
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.
As long as we remember to circle back and clean up all this stuff 👍 👍
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's going to be hard to miss unfortunately as there are many controls that needs consolidation 😞
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.
Even a thousand mile journey starts with one step!
* trunk: [RNMobile][Embed block] Add device's locale to preview content (#33858) Update AlignmentMatrixControl docs post merge. (#34662) Chore: Update caniuse package to the latest version (#34685) Chore: Move `react-native-url-polyfill` to dev dependencies (#34687) Site Editor - add basic plugin support (#34460) ESLint Plugin: Use Jest related rules only when the package is installed (#33120) Update `@wordpress/components` package's contributing guidelines (#33960) chore(release): publish Update changelog files [RNMobile] [Embed block] Fix content disappearing on Android when switching light/dark mode (#34207) Scripts: Convert legacy entry point arguments for compatibility with webpack 5 (#34264) Update justication control in `flex` layout (#34651) Block Editor: Rename experimental prop used in `BlockControls` (#34644) Fix social links deprecation (#34639)
flex
layoutflex
layout
Follow up of: #34493
This PR updates the
justification
control in inspector controls.based on @jasmussen proposal:
Notes
I haven't used
ToggleGroupControl
for this because it needs some enhancements to supporticons
instead ofstring
labels. When this is implemented we should consider changing again.