Customizer: Mobile & toolbar; Block toolbar widgets mobile#22533
Merged
jorgefilipecosta merged 2 commits intomasterfrom May 22, 2020
Merged
Customizer: Mobile & toolbar; Block toolbar widgets mobile#22533jorgefilipecosta merged 2 commits intomasterfrom
jorgefilipecosta merged 2 commits intomasterfrom
Conversation
|
Size Change: +111 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
epiqueras
reviewed
May 21, 2020
| return ( | ||
| <WidgetAreasBlockEditorProvider blockEditorSettings={ settings }> | ||
| <WidgetAreasBlockEditorProvider | ||
| blockEditorSettings={ { ...settings, hasFixedToolbar: true } } |
Contributor
There was a problem hiding this comment.
We should probably memoize this prop since it's such a big tree of components.
Member
Author
There was a problem hiding this comment.
I added memoization as suggested 👍
…n mobile widgets & customizer.
a6bc647 to
ae39b53
Compare
epiqueras
approved these changes
May 21, 2020
Contributor
|
Cool stuff. Thanks |
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.
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.