Skip to content

Distraction Free: Enhance distraction-free mode to restore previous state#78679

Open
Infinite-Null wants to merge 6 commits into
WordPress:trunkfrom
Infinite-Null:feat/distraction-free-restore-panel-states
Open

Distraction Free: Enhance distraction-free mode to restore previous state#78679
Infinite-Null wants to merge 6 commits into
WordPress:trunkfrom
Infinite-Null:feat/distraction-free-restore-panel-states

Conversation

@Infinite-Null

@Infinite-Null Infinite-Null commented May 26, 2026

Copy link
Copy Markdown
Contributor

Closes: #59789

What?

This PR updates Distraction Free mode so the editor preserves and restores panel state.

  • Saves whether Inserter is open before enabling Distraction Free mode.
  • Saves whether List View is open before enabling Distraction Free mode.
  • Restores both states when disabling Distraction Free mode.

Testing Instructions

  1. Open a page in the editor.
  2. Open Inserter and List View.
  3. Enable Distraction Free mode.
  4. Verify Inserter and List View are closed.
  5. Disable Distraction Free mode.
  6. Verify Inserter and List View return to their previous open state.

Screencast

Before

Screen.Recording.2026-05-27.at.2.12.17.PM.mov

After

Screen.Recording.2026-05-27.at.2.11.01.PM.mov

@Infinite-Null Infinite-Null marked this pull request as ready for review May 27, 2026 08:49
@github-actions

github-actions Bot commented May 27, 2026

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.

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

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: bacoords <bacoords@git.wordpress.org>
Co-authored-by: richtabor <richtabor@git.wordpress.org>

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

@github-actions github-actions Bot added the [Package] Editor /packages/editor label May 27, 2026
@yogeshbhutkar yogeshbhutkar added the [Type] Enhancement A suggestion for improvement. label May 27, 2026
@bacoords

bacoords commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for a PR for my issue. I can't speak to the code approach, but I can speak to the user experience of testing this PR:

  1. Overall does what it says. For some reason the right hand sidebar can remember which tab you're on (Post vs Block) but the left hand sidebar does not (Block vs Pattern, or List vs Outline). It returns the correct left sidebar, but always selects the first tab. But not sure that's a blocker.
  2. The animation is a bit glitchy because the sidebar suddenly positions to the top over the "W" logo. This might be a CSS fix - you could see how the right sidebar handles it.
Area

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

Labels

[Package] Editor /packages/editor [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyboard Shortcut: Toggling in/out of distraction free mode should remember open panels

3 participants