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

user preferences #1640

Closed
plegall opened this issue Mar 29, 2022 · 0 comments
Closed

user preferences #1640

plegall opened this issue Mar 29, 2022 · 0 comments

Comments

@plegall
Copy link
Member

plegall commented Mar 29, 2022

In administration, switching from light to dark mode updates the global configuration setting admin_theme, meaning all administrators have dark OR light mode. If you have several administrators, they must share the same color scheme. Not good.

Still in the administration, in the user manager, you can switch between compact/tile/line views. The value is stored in a cookie. This time the setting can be different for each user BUT it's lost when the cookie expires and you lose it if you use another computer. Better, but still not good.

To have the best of both situations, we need the setting to be a user setting, stored in the database. We already have some, like user_infos.show_nb_hits or user_infos.recent_period. The drawback is that we need to create a new column in user_infos for each setting. It can become a mess considering plugins would also like to use this possibility.

I suggest we add a new column user_infos.preferences which would store a serialized array of preferences. It would be more flexible and usable by plugins. In addition to the table column, we would need dedicated function userprefs_get_param, userprefs_update_param, userprefs_delete_param (just like the conf_get_param functions for the global configuration).

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

No branches or pull requests

1 participant