Skip to content

Hide sort menu for series lists#12060

Merged
cdrini merged 1 commit intointernetarchive:masterfrom
IvanPisquiy06:12054/refactor/hide-sort-menu-series
Mar 12, 2026
Merged

Hide sort menu for series lists#12060
cdrini merged 1 commit intointernetarchive:masterfrom
IvanPisquiy06:12054/refactor/hide-sort-menu-series

Conversation

@IvanPisquiy06
Copy link
Copy Markdown
Contributor

Closes #12054

fix: Hides the sorting dropdown menu on Series pages.

As discussed on Slack, the sorting logic is currently designed for standard Lists and does not yet support the new Series data structure. This PR hides the UI element on Series pages to prevent user confusion during the beta rollout.

Technical

  • File modified: openlibrary/templates/lists/view_body.html
  • Implementation: Wrapped the search/sort_options.html template render call in a conditional block ($if not list.key.startswith('/series/'):).
  • Note: By checking the list.key namespace at the parent level (view_body), we successfully hide the dropdown for Series without having to alter the shared sort_options.html widget itself. The layout toggle (Grid/List view) is intentionally left outside the condition so it remains functional.

Testing

  1. Navigate to any standard User List.
  2. Verify that the "Sort by" dropdown is visible and functional.
  3. Navigate to any Series page.
  4. Verify that the "Sort by" dropdown is completely hidden.
  5. Verify that the Layout dropdown (Grid/List) next to it is still visible and functional.

Screenshot

Series example:
Screenshot 2026-03-09 at 9 39 59 PM
List example:
Screenshot 2026-03-09 at 9 45 04 PM

Stakeholders

cc @cdrini - Thanks for pointing me toward this as a good first issue!

Copilot AI review requested due to automatic review settings March 10, 2026 03:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hides the “Sort by” dropdown on Series pages to avoid presenting sorting controls that don’t currently work for the /series/ namespace, while keeping the layout toggle available.

Changes:

  • Wraps the search/sort_options.html render in a conditional so it doesn’t display for list.key under /series/.
  • Leaves search/layout_options.html rendering unchanged so Grid/List layout remains available on Series.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread openlibrary/templates/type/list/view_body.html
Copy link
Copy Markdown
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Lgtm!

@cdrini cdrini merged commit ac8cd80 into internetarchive:master Mar 12, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hide Sort Menu on Series

3 participants