Conversation
|
Size Change: -1 B (0%) Total Size: 1.26 MB
ℹ️ View Unchanged
|
67 tasks
Contributor
|
It seems like this caused an issue with padding/margin visualizers - #44335 (comment). Not sure why though, I only found it via git bisect. 🤔 |
Contributor
|
I see. There are other implementations of I think I'll spin up a PR to fix this (#44484). |
Contributor
Author
|
Thank you @glendaviesnz and @talldan for flagging and fixing the regression — and apologies for introducing it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
This PR:
placementprop instead of the (legacy)positionprop for thePopovercomponent in the Block Toolbarplacementprop from being assigned to thePopovercomponent inline, to theuseBlockToolbarPopoverPropspropWhy?
placementis the prop that should be used for positioning thePopovercomponent. The legacypositionprop will soon be deprecateduseBlockToolbarPopoverProps, because the logic inside that hook really only makes sense with top/bottom placements. And so, havingplacementcloser to theuseBlockToolbarPopoverPropslogic made more sense to me (this was also reported in Ensure block toolbar doesn't overlap block by modifying forcePosition and shift popover props #42887 (comment))How?
Since
placementneeds to be always returned (regardless of whether there is enough space above the block or not), I've created aCOMMON_PROPSobject that is spread into bothDEFAULT_PROPSandRESTRICTED_HEIGHT_PROPSTesting Instructions
Play around with the block toolbar, make sure that its placement is the same as on
trunk: