kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Library & Topic Pages: Track user preference for Card vs List views

Open nucleogenesis opened this issue 3 years ago • 1 comments

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.

nucleogenesis avatar Apr 20 '22 21:04 nucleogenesis

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.

rtibbles avatar Apr 20 '22 21:04 rtibbles

Have implemented this using a URL parameter instead.

rtibbles avatar Dec 13 '22 17:12 rtibbles