-
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: obviate sidebar context #69172
Draft
stokesman
wants to merge
2
commits into
fix/edit-site-back-button
Choose a base branch
from
update/site-editor-obviate-sidebar-context
base: fix/edit-site-back-button
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Site editor: obviate sidebar context #69172
stokesman
wants to merge
2
commits into
fix/edit-site-back-button
from
update/site-editor-obviate-sidebar-context
+55
−63
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
Size Change: -56 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
6 tasks
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] Bug
An existing feature does not function as intended
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.
What?
The moves some state into the router so that it can be accessed without a context provider.
Why?
This should facilitate fixing some style issues and improving the markup in the site editor by getting rid of the need for components that rely on this state having to be nested within the sidebar.
Closes #68929
How?
Moves the state from the sidebar and its context provider to the router. A new helper hook is introduced and used in place of the
navigate
function that was provided by the sidebar context.Right now this is based on #69103 because it does a similar thing and includes a change needed here too (exposing the router’s location.state through the
useLocation
hook.).Testing Instructions
Maintained functionality of trunk (non-mobile-sized viewports)
These are keyboard instructions because otherwise focus rings aren’t visible.
As a fix for #68929
Bonus fix for mobile size viewports
Right now, the sidebar focus management fails in mobile sized viewports. I’ll get back to this later…