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

Editor preferences are saved in database every time the Settings sidebar opens/closes #61384

Open
miksansegundo opened this issue May 6, 2024 · 2 comments
Labels
[Package] Preferences /packages/preferences [Type] Bug An existing feature does not function as intended

Comments

@miksansegundo
Copy link
Contributor

miksansegundo commented May 6, 2024

Description

I wonder if this is a bug because a request to /wp/v2/users/me is made every time the Settings sidebar opens/closes. It seems that it is not needed because every update on the preferences modal also triggers a request.

Step-by-step reproduction instructions

  • Go to the Site editor
  • Click on the Settings icon to open or close the sidebar
Screenshot 2567-05-06 at 09 24 43
  • From the Chrome Dev Tools, verify a request to /wp/v2/users/me is made every time to save the preferences
Screenshot 2567-05-06 at 09 40 41

Screenshots, screen recording, code snippet

Click on the Settings icon to open or close the sidebar and verify a request is made:

Screen.Recording.2567-05-06.at.09.16.37.mov

Change any preferences from the modal and verify a request is also made:

Screen.Recording.2567-05-06.at.09.21.22.mov

Environment info

  • WordPress 6.5.2
  • Gutenberg 18.2.0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@miksansegundo miksansegundo added the [Type] Bug An existing feature does not function as intended label May 6, 2024
@hbhalodia
Copy link
Contributor

Hello @miksansegundo, I do not think this is an actual issue, but likely a kind of feature for the user. If you can see that, once you close/open the sidebar and then close the site and reopen/reload the site, the sidebar is persisted because it saves your preference to the DB and local storage as well with the option "isComplementaryAreaVisible":true in key WP_PREFERENCES_USER_{user_id}. So not the preferences are the actual preferences, but the open/close for the sidebar is also a preference for the user.

Thank You.

@buzztone
Copy link

buzztone commented Jan 2, 2025

I found this issue while searching the repo to confirm if this feature has been implemented.
I definitely want my user configuration of the Settings Sidebar to persist when I close/open the sidebar & reopen/reload the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Preferences /packages/preferences [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants