Skip to content

Add 'f' shortcut to open changelist filters#1982

Open
Quentin-Jadoul wants to merge 1 commit into
unfoldadmin:mainfrom
Quentin-Jadoul:feat/changelist-filter-shortcut-f
Open

Add 'f' shortcut to open changelist filters#1982
Quentin-Jadoul wants to merge 1 commit into
unfoldadmin:mainfrom
Quentin-Jadoul:feat/changelist-filter-shortcut-f

Conversation

@Quentin-Jadoul
Copy link
Copy Markdown

Description
This PR adds a keyboard shortcut on changelist pages to open the filters panel.

Changes

  • Added a changeList() Alpine helper in src/unfold/static/unfold/js/app.js
  • Added an f shortcut to open filters
    • works case-insensitively
    • ignored when typing in inputs, textareas, or contenteditable elements
    • only active when filters are available (cl.has_filters)
  • Wired the changelist root container to changeList(...) in src/unfold/templates/admin/change_list.html
  • Added an f shortcut hint next to the Filters button
  • Kept existing Esc behavior for closing filters

Why

  • Makes filters quicker to open on changelist pages
  • Keeps shortcut behavior aligned with existing shortcuts like t for search

Notes

  • Only applies to changelist filters
  • No changes outside changelist pages
image

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.

1 participant