Skip to content

Editor: Restore Document Overview after closing Inserter#78586

Open
dpmehta wants to merge 1 commit into
WordPress:trunkfrom
dpmehta:fix/restore-list-view-after-inserter
Open

Editor: Restore Document Overview after closing Inserter#78586
dpmehta wants to merge 1 commit into
WordPress:trunkfrom
dpmehta:fix/restore-list-view-after-inserter

Conversation

@dpmehta
Copy link
Copy Markdown
Contributor

@dpmehta dpmehta commented May 22, 2026

What?

Closes #53078

This PR restores the Document Overview sidebar after the Block Inserter is closed, when Document Overview was open before the Inserter was opened.

Why?

Previously, opening the Inserter from an open Document Overview cleared the List View state. When the Inserter was closed, the entire left sidebar disappeared, causing layout shift and forcing users to reopen Document Overview manually.

How?

  • Added an internal hidden state for the List View panel while it is temporarily replaced by the Inserter.
  • Restored the List View panel when the Inserter closes if it was open before the Inserter was opened.
  • Updated isListViewOpened() so it only reports true when the List View is actually visible.

Testing Instructions

  1. Open the editor.
  2. Open Document Overview from the top toolbar.
  3. Click the top-left Block Inserter button.
  4. Close the Inserter using the x button.
  5. Confirm Document Overview is restored instead of the left sidebar closing completely.

Also verify:

  1. Open the Block Inserter when Document Overview was not open.
  2. Close the Inserter.
  3. Confirm the left sidebar closes as before.

Screenshots or Screencast

Before Fix :

TreePane.open.-.InserterPane.opened.closed.-.TreePane.gone.-.User.disoriented.mp4

After Fix :

after-fix.mov

Use of AI Tools

Initial technical analysis and PR documentation for this fix were drafted with the assistance of AI tools.

@github-actions github-actions Bot added the [Package] Editor /packages/editor label May 22, 2026
@dpmehta dpmehta marked this pull request as ready for review May 22, 2026 16:50
@github-actions
Copy link
Copy Markdown

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: [Package] Editor.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @porg.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: porg.

Co-authored-by: dpmehta <mehtadev@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Editor /packages/editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If Block Inserter Panel closes it should restore Document Overview Pane if it was open

1 participant