internetarchive/openlibrary

Allow `view` URL parameter for list page display mode

Aperta

#13.327 aperta il 13 ago 2026

 (4 commenti) (0 reazioni) (1 assegnatario)Python (1957 fork)batch import
Affects: UIGood First IssueLead: @RayBBModule: JavaScriptNeeds: HelpTheme: DesignTheme: ListsType: Feature Request

Metriche repository

Star
 (6608 stelle)
Metriche merge PR
 (Merge medio 6g 2h) (126 PR mergiate in 30 g)

Descrizione

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

Guida contributor