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
Customizer: Mobile & toolbar; Block toolbar widgets mobile #22533
Customizer: Mobile & toolbar; Block toolbar widgets mobile #22533
Conversation
Size Change: +111 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
return ( | ||
<WidgetAreasBlockEditorProvider blockEditorSettings={ settings }> | ||
<WidgetAreasBlockEditorProvider | ||
blockEditorSettings={ { ...settings, hasFixedToolbar: true } } |
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.
We should probably memoize this prop since it's such a big tree of components.
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 added memoization as suggested 👍
…n mobile widgets & customizer.
a6bc647
to
ae39b53
Compare
Cool stuff. Thanks |
Description
Supersedes: #17960
This PR implements three features very interconnected. I'm creating a single PR because with multiple PR's we would have constant conflicts between them.
The features implemented are:
Forces the mobile view on the customizer using the mechanism we have to stimulate the mobile view.
Add a toolbar with the global inserter, undo/redo, and navigator to the customizer blocks that missed this part of the UI.
Make the block toolbar fixed on top in the widgets screen when viewed on mobile. Currently the widget screen when viewed on mobile does not show the block toolbar at all. On customizer we always show the toolbar on top as we are forcing a mobile view.
Before:
After:
How has this been tested?
I added a media and text block on the customizer and verified by default it appears stacked instead of side by side (simulated mobile view).
I verified the block toolbar and the toolbar with inserter, undo/redo, and block navigator appears on top of the customizer.
I opened the widgets screen I resized the window to a mobile view. I verified the block toolbar appeared on top, previously it did not appear anywhere.