Make search sort option sticky by type #9932
Labels
Lead: @jimchamp
Issues overseen by Jim (Front-end Lead, BookNotes) [managed]
Needs: Community Discussion
This issue is to be brought up in the next community call. [managed]
Needs: Design Feedback
Priority: 3
Issues that we can consider at our leisure. [managed]
State: Blocked
Work has stopped, waiting for something (Info, Dependent fix, etc. See comments). [managed]
Theme: Search
Issues related to search UI and backend. [managed]
Type: Feature Request
Issue describes a feature or enhancement we'd like to implement. [managed]
Proposal
Right now, there are sort droppers on...
(a) search page,
(b) author pages,
and (c) list pages
Every time one refreshes the page, these droppers return to their default selected value.
We'd like to use locaStorage to keep track of the last selected sort option per type (i.e. we should store a different
selectedSorts
value forsearchPage
,authorPage
,listPage
, e.g.We use localStorage similarly elsewhere in our JS:
openlibrary/openlibrary/plugins/openlibrary/js/SearchUtils.js
Line 42 in 6ff7058
Justification
Several librarians, including @seabelis and @mheiman, have told us that now that all sort links are in a dropper, it's becoming more challenging to re-select the sort option they want every time they redo a search.
Breakdown
Requirements Checklist
sort=
<input type="hidden" name="sort" value="$(whatever-localstorage-value)>
Related files
Instructions for Contributors
Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
The text was updated successfully, but these errors were encountered: