-
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
Update Site Editor’s reset of navigation panel menu #32011
Closed
Closed
Conversation
This file contains 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
7 tasks
Size Change: +53 B (0%) Total Size: 1.03 MB
ℹ️ View Unchanged
|
stokesman
added
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Enhancement
A suggestion for improvement.
labels
May 19, 2021
stokesman
force-pushed
the
update/edit-site-navigation-panel-menu-reset
branch
from
May 20, 2021 03:41
2f2688a
to
5798e4e
Compare
stokesman
force-pushed
the
update/edit-site-navigation-panel-menu-reset
branch
from
August 18, 2021 03:24
5798e4e
to
ad4e5ee
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Enhancement
A suggestion for improvement.
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.
Currently, the navigation menu is set back to the root menu via the store’s reducer whenever the panel is closed. This doesn't seem necessary after #30098 and it does have side-effects—one that is desirable and the other undesirable. In order to keep former and loose the latter, this PR still sets the menu back to root when the panel closes but only after the navigation panel has fully closed (after its transition). This avoids seeing the menu change as the panel is closing and preserves canceling the search state. Still, it might be better to consider a separate mechanism to cancel the search state.
Additionally, to prevent seeing the menu change as the panel opens, a new prop
skipAnimation
on theNavigation
component is added/utilized. As an alternative to adding this prop, the navigation can be unmounted once the panel has closed as it will already avoid animation upon mount.How has this been tested?
In the site editor opening and closing the navigation panel. Also opening it by using the "browse all templates" button in the header template dropdown and closing it by opening the inserter.
Screenshots
Before
menu changes as panel closes (animation speed is slowed)
site-editor-nav-reset-before2.mp4
After
menu stays put while panel closes and search still ends up canceled (animation speed is slowed)
site-editor-nav-reset-after2.mp4
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).