Update justification control in flex layout#34651
Conversation
|
Size Change: +53 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
jasmussen
left a comment
There was a problem hiding this comment.
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.
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.
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.
As long as we remember to circle back and clean up all this stuff 👍 👍
There was a problem hiding this comment.
It's going to be hard to miss unfortunately as there are many controls that needs consolidation 😞
There was a problem hiding this comment.
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
justificationcontrol in inspector controls.based on @jasmussen proposal:
Notes
I haven't used
ToggleGroupControlfor this because it needs some enhancements to supporticonsinstead ofstringlabels. When this is implemented we should consider changing again.