-
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
FocalPointPicker: Fix layout misalignment when placed in the BlockInspector
#46631
Conversation
packages/components/CHANGELOG.md
Outdated
@@ -17,6 +17,7 @@ | |||
- `InputControl`: Fix internal `Flex` wrapper usage that could add an unintended `height: 100%` ([#46213](https://github.com/WordPress/gutenberg/pull/46213)). | |||
- `Navigator`: Allow calling `goTo` and `goBack` twice in one render cycle ([#46391](https://github.com/WordPress/gutenberg/pull/46391)). | |||
- `Modal`: Fix unexpected modal closing in IME Composition ([#46453](https://github.com/WordPress/gutenberg/pull/46453)). | |||
- `FocalPointPicker`: Reset `margin-bottom` of `UnitControl` to align vertical position ([#46631](https://github.com/WordPress/gutenberg/pull/46631)). |
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.
Is this PR a bug fix? Maybe it is 'internal' or 'enhancement'...
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 would classify it as a bug fix.
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 have moved the changelog entry to the block-editor
package.
Should we add the |
Mmm, good catch. This one is caused by the problematic override style added in the block-editor package's So yeah @glendaviesnz, the FocalPointPicker itself is already being used with the no-margin prop enabled, but the consumer ( @t-hamano If possible, my preference would be to add any workarounds in the offending consumer package ( |
BlockInspector
@mirka |
Size Change: +36 B (0%) Total Size: 1.32 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.
Looks good, thanks! 🚢
What?
This PR fixes a problem with the unit controls (Left, Top) not being aligned vertically when the
FocalPointPicker
component is used in the block sidebar (InspectorControls
).Why?
The control itself has no margin, but
margin-bottom
is applied by theInspectorControl
. And this is because the value is smaller in the UnitControl on the right side.How?
I have reset the
margin-bottom
on theUnitControl
. I believe this is the appropriate approach as this margin is not expected, but if there is another way, please advise.Testing Instructions