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

Better integrate storing user preferences in browser local storage #13843

nijel opened this Issue Nov 28, 2017 · 3 comments


None yet
3 participants

nijel commented Nov 28, 2017

After #13466 will be fixed, all user configuration will be stored in the user preferences. When the phpMyAdmin configuration storage is not configured, these do not persist over session.

This should be addressed by using browser local storage in this case. There already is existing code for this in the user preferences, it just needs manual actions, but this should happen automatically without need for user interventions:

  • Save any changes to local storage. As this is on the client and we maintain the database on the server, we need to push changes somehow. It can be probably included in the AJAX responses as an additional field listing which values should be changed (or complete configuration). We can keep track of changed values in the session when calling Config::setUserValue...
  • Automatically load settings from local storage. This should happen once at login time.

This comment has been minimized.


nulll-pointer commented Jul 24, 2018

Hello @nijel, I'm working on this as a part of my GSOC project. I looked into your commits and found that change in local storage is not bound with change in values in the form. So I guess I'll have to work on this. Some other things I wanted to clarify-

  1. I think we need to uniquely identify the configuration under username and server name.
  2. There are tons of configuration directives, I think we can save the values for all the changed configurations.
  3. At login time, we can send this data to the server which can change its $cfg[''] directives accordingly.
  4. Whenever a user changes a configuration, it's saved for the session and in the local storage. When they relogin, it's loaded directly from the local storage.

This comment has been minimized.


nijel commented Jul 24, 2018

Your approach looks reasonable to me.


This comment has been minimized.


ibennetch commented Jul 24, 2018

I agree that this seems reasonable.

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