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

Save sorting options using cookies #451

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

pbogre
Copy link
Collaborator

@pbogre pbogre commented Jul 27, 2023

use cookies to save sorting options for movies and people.

the cookies are set to last 1 year and are based in "/", here's what an example looks like:

'movie-sort-order' = 'desc'
'movie-sort-by' = 'name'
'person-sort-order' = 'asc'
'person-sort-by' = 'uniqueAppearances'

closes #441

@pbogre pbogre requested a review from leepeuker as a code owner July 27, 2023 11:14
@pbogre
Copy link
Collaborator Author

pbogre commented Jul 29, 2023

reminder: create & use save sorting button for people too once a search option modal is implemented

@pbogre
Copy link
Collaborator Author

pbogre commented Jul 30, 2023

@leepeuker all set with the new modal ui! feel free to take a look using latest commit

@leepeuker
Copy link
Owner

There are a few things I would like to adjust:

  • only use cookies for visitors, for logged in users it should be stored in the backend, so that the user does not have to save the option again on every new client
  • the options should only be saved if a visitor/user explicitly wants it and not automatically like it is currently (the options should reset on default, at least that is usually the standard in UX imo)
  • maybe we should include the filter options as well and not only the sort options 🤔

@pbogre
Copy link
Collaborator Author

pbogre commented Aug 8, 2023

i agree about using the backend and not cookies for the preferences. maybe a new column in the user settings database?

the options shouldn't be saved automatically in the latest commit. unless you click the button that saves them they shouldn't persist next time you load the page, and if they do that's a bug that i need to fix :)

i'm not sure about saving other options like filters, because that's not really something that people would want to persist on a long term basis, while sorting options might

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

Successfully merging this pull request may close these issues.

feature - save sorting options
2 participants