kolibri
kolibri copied to clipboard
Library & Topic Pages: Track user preference for Card vs List views
Observed behavior
A user can alternate between Grid and Card views, but when they navigate, they are reverted to the default card view even if they've previously selected the list view.
Expected behavior
When a user selects List or Grid in any given context, that should be stored as a cookie which can be used to ensure the user has a consistent experience across navigations.
User-facing consequences
User has a more consistent experience.
Note that this would need to be an optional cookie when/if the #8148 feature is implemented.
I would suggest using localStorage for this rather than a cookie - we already have the lockr library being used in our code for this kind of ephemeral settings persistence. That would also avoid having to catalogue it for cookies to exempt from.
Have implemented this using a URL parameter instead.