-
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
Site Editor: Update Navigation Panel Toggle UI #25622
Conversation
Size Change: +1.02 kB (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
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 is a good start; I'm able to open and close the sidebar as expected. I think there's two things could be improved in further followups:
- There's no way to move keyboard focus from the buttonIcon into the contents of the sidebar. I would expect to be able to use tab or my arrow keys to move down — or, perhaps, it would make sense to move focus into the sidebar, similar to how a dropdown works.
- I'd love to see a transition with the sidebar animating into view.
packages/edit-site/src/components/left-sidebar/navigation-panel/style.scss
Outdated
Show resolved
Hide resolved
@shaunandrews I've updated it to automatically focus the the sidebar on open.
|
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.
This works well for me!
I have two possible items for next iterations:
The first item (which is the one that gets the focus) of the sidebar is the "Back to Dashboard" button. I think it makes sense, and also helps keeping a bit of consistency with the post editor back button.
-
I find this a bit unexpected. Another option might be to activate/focus the template that's currently visible in site editor. Depending on how we present the hierarchy that might also be weird since it can be in nested levels. But at least with current setup it should work fine - we load homepage by default and I'd expect to see its template at the root level.
-
The animation of toggle and sidebar slide in are a bit out of sync. It's not that noticeable because of short duration. If we want to match them perfectly we could switch to linear animation, since I don't think we can perfectly match cubic bezier ones in general.
Unlike @vindl, I think this feels good and is the behavior I'd expect.
Now that you mention it, I find it strange that the
I believe this is a bug with the Inserter sidebar in the Site Editor; In the Post Editor the keyboard focus is "trapped" within the inserter, similar to a modal. See #24429 for more info. I believe we should fix that in a separate PR, as its unrelated to this one. That said, I don't think this sidebar should act like a popover. If it did that would mean navigating away from the sidebar would dismiss it.
I think linear could be better if it means we can get rid of the staggered transitions. |
I filed a follow-up issue to track this in #25701. |
Description
Update the toggle UI and the back navigation of the Site Editor navigation panel.
See: #23939
How has this been tested?
Tested in the local Gutenberg wp-env with the FSE experiment enabled, in the Site Editor.
Screenshots
Types of changes
New feature (non-breaking change which adds functionality
Checklist: