internetarchive/openlibrary

Allow `view` URL parameter for list page display mode

开放

#13,327 创建于 2026年8月13日

 (4 条评论) (0 个反应) (1 位负责人)Python (1,957 个派生)batch import
Affects: UIGood First IssueLead: @RayBBModule: JavaScriptNeeds: HelpTheme: DesignTheme: ListsType: Feature Request

仓库指标

星标
 (6,608 个星标)
PR 合并指标
 (平均合并 6天 2小时) (30 天内合并 126 个 PR)

描述

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

贡献者指南