internetarchive/openlibrary

Allow `view` URL parameter for list page display mode

Geschlossen

#13.327 geöffnet am 13.08.2026

 (4 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (1.961 Forks)batch import
Affects: UIGood First IssueLead: @RayBBModule: JavaScriptNeeds: HelpTheme: DesignTheme: ListsType: Feature Request

Repository-Metriken

Stars
 (6.616 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 2h) (126 gemergte PRs in 30 T)

Beschreibung

Feature Request

Problem / Opportunity

Right now, when you share a link to an Open Library list, the recipient sees whatever view they last used. There is no URL parameter to enforce a specific display mode (list or grid), unlike the existing sort parameter (e.g. ?sort=last_modified). This makes it harder to share lists with a specific visual context in mind.

Proposal

Add a view URL parameter to list pages, accepting list or grid as values.

Example URLs

Behavior

  • ?view=list — forces the list to render in list mode.
  • ?view=grid — forces the list to render in grid mode.
  • If the parameter is omitted, the page falls back to the user’s last selected preference (current behavior).
  • The existing sort parameter (sort=last_modified) should continue to work in conjunction with view.
  • I'm not sure if we should make the url switch from grid/list when someone clicks on a different mode but I lean towards yes.

Breakdown

Related files

Requirements Checklist

  • URL parameter view is parsed on list page load.
  • Valid values (list, grid) are accepted and applied.
  • Invalid or missing values fall back to existing behavior.
  • Sort parameter continues to work correctly alongside view.

Stakeholders

  • @cdrini @lokesh

Instructions for Contributors

Contributor Guide