internetarchive/openlibrary

Allow `view` URL parameter for list page display mode

オープン

#13,327 opened on 2026/08/13

 (4 件のコメント) (0 件のリアクション) (1 人の担当者)Python (1,957 件のフォーク)batch import
Affects: UIGood First IssueLead: @RayBBModule: JavaScriptNeeds: HelpTheme: DesignTheme: ListsType: Feature Request

Repository metrics

Stars
 (6,608 個のスター)
PR merge metrics
 (平均マージ 6d 2h) (30d で 126 merged PRs)

説明

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

コントリビューターガイド