-
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
Fix block movers in navigator on experimental navigation page displaying horizontally #23779
Conversation
Size Change: +4 B (0%) Total Size: 1.14 MB
ℹ️ View Unchanged
|
@@ -8,18 +8,15 @@ import { useViewportMatch } from '@wordpress/compose'; | |||
*/ | |||
import BlockMover from '../block-mover'; | |||
|
|||
function BlockMobileToolbar( { clientId, moverDirection } ) { | |||
function BlockMobileToolbar( { clientId } ) { |
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 think this file can actually be deleted. I couldn't see any usage other than the native mobile version of it.
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.
Wouldn't deleting it break the native mobile app, then?
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.
Yeah, that's what I don't know. I don't think so as there's a separate index.native.js.
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.
Aha, gotcha. Yeah you're right that it probably can be removed.
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!
Description
Fixes two small issues from #23416.
BlockMobileToolbar
(which is the web-based responsive mobile toolbar) had amoverDirection
prop, which wasn't being used and didn't do anything, asBlockMover
handles its own orientation so this can be omitted.BlockMoverUpButton
andBlockMoverDownButton
are both used in the block navigator on the experimental navigation page. The prop for these components should have been renamed toorientation
from__experimentalOrientation
but was somehow missed. This fixes an issue where the block movers in the navigator are sometimes shown horizontally instead of vertically—the prop is used to force the movers to display vertically.How has this been tested?
Screenshots
Before
After
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: