Repository navigation
Add exit overlay button - #81981
Draft
coderGtm wants to merge 3 commits into
Draft
Add exit overlay button#81981coderGtm wants to merge 3 commits into
coderGtm wants to merge 3 commits into
Conversation
This branch has not been deployed
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.
What?
Closes #75210
Adds an "Exit original" button to the Document tab of the Settings sidebar when editing a template part in the isolated (overlay) editor, mirroring the "Edit original" button used to enter it.
Why?
There is currently no way to exit the isolated template part editor from the Settings sidebar. Users must use the "Back" button in the editor toolbar, which is easy to miss and inaccessible when the toolbar is not in view. This change provides a discoverable, sidebar-based way to return to the previous editing context, matching the existing "Edit original" entry affordance.
How?
Adds a new
ExitTemplatePartPanelcomponent inpackages/editor/src/components/exit-template-part-panel. It:wp_template_part(i.e. inside the isolated template part editor), and only whengetEditorSettings().onNavigateToPreviousEntityRecordis available (it is provided by bothedit-postandedit-site; it isundefinedwhen there is no previous entity to return to, e.g. in the regular post editor).onNavigateToPreviousEntityRecord(), the same callback the "Edit original" flow uses to navigate back.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Use of AI Tools
This PR was developed with the assistance of AI tooling (opencode) for implementation and testing. All changes were reviewed by the author, including lint, formatting, and unit test verification.