internetarchive / internetarchive/openlibrary

Global "Book Preferences" filter on top IA bar

Open
#10,760 6 comments 0 reactions 1 assignee Claimed by @BearSunny View on GitHub
Fellowship Opportunity Lead: @RayBB Priority: 3 Type: Feature Request
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 14h
Merged PRs (30d)
126

Description

### Feature Request

On OpenLibrary.org, the most common way for a patron to encounter books is through:
1. book carousels
2. search results

This issue can be split into multiple PRs, but the goal is to make it so that the patron has a set of global options that apply to **carousel results** and **search results**

These options include:
1. A checkbox whether to display ebooks only (versus all book records in the catalog)
2. A dropdown for selecting **books** in a specific language (a distinct option from changing the language of the **website** itself)

The search page already has some mechanism for toggling the mode (e.g. All v. Ebooks) and **in the future** (out of scope for this issue) maybe we can drop this in favor of the global settings (if the design is intuitive enough).

Today:
Image

The top bar offers a way for patrons to select the language of the **website**, though this may be expanded to also request **books** published in a specific language be shown.

### Problem / Opportunity

Right now patrons have facets for the search page but no option to control the results of carousels.

This make key pages like the homepage less relevant for international patrons.

### Proposal

* Some persistent layer like LocalStorage may be used to store the session's book preferences
* The UI may appear next to or grouped with site language chooser on IA topbar
* The design might be informed by the filter options experience at openlibrary.org/explore
* Should communicate these are global filter settings for Books being shown
* Options should include **book** language, ebook v. all (for now)
* Global preferences should be overwritten by per-carousel rules (see: #10512)

### Related files

Refer to [this map of common Endpoints](https://github.com/internetarchive/openlibrary/wiki/Endpoints):
*

### Stakeholders

* @jimchamp -- macros for carousels, partials, + testing "load more"
* @cdrini -- search APIs
* @mekarpeles -- product sign-off


### Instructions for Contributors

* **Before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) or pushing up changes to a PR, please first [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date, as the pre-commit bot may add commits to your PRs upstream.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.