Skip to content
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

Chrome: Publish sidebar toggle state persists between page loads #4248

Closed
aduth opened this issue Jan 3, 2018 · 2 comments · Fixed by #4529
Closed

Chrome: Publish sidebar toggle state persists between page loads #4248

aduth opened this issue Jan 3, 2018 · 2 comments · Fixed by #4529
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended

Comments

@aduth
Copy link
Member

aduth commented Jan 3, 2018

Issue Overview

If the Publish menu is opened, it will remain open in subsequent editor sessions.

Steps to Reproduce

  1. Navigate to Posts > Add New
  2. Enter a title
  3. Press Publish in the editor header
  4. Navigate to Posts > Add New
    • Ignore the prompt about unsaved changes and continue navigation

Expected Behavior

In the new editor session, the Publish sidebar is not visible.

Current Behavior

The Publish sidebar is visible, including after subsequent refreshes.

Possible Solution

Sidebar toggle state is managed in preferences state which is persisted between editor loads. Is this meant to be a preference? And if so, do we need to implement some behavior for the preferences reducer to allow specific values to be persisted vs. others? Maybe as with the REDUX_REHYDRATE action, we need a complementing persist action which allows the reducer to define which values should be included in that state?

@aduth aduth added General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended labels Jan 3, 2018
@noisysocks
Copy link
Member

cc. @youknowriad who worked on this in #4119.

Looking at the Layout class, it looks like we could avoid using Redux altogether in lieu of a simple setState().

@youknowriad
Copy link
Contributor

I think there's still value in using Redux to handle the sidebars state similarily between the different sidebars (default sidebar, publish sidebar, plugins sidebar to come). We need to know if there's an open sidebar to apply the styling and we need the default sidebar in state (used in several components and persisted)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants