Add ol-select-popover component#12635
Merged
Merged
Conversation
New ol-select-popover composes ol-popover to provide a multi-select list with optional filter input, grouped SELECTED/SUGGESTIONS sections, and a clear-selections footer. Adds a design page entry for it, plus minor ol-popover refinements and border-radius token tweaks.
for more information, see https://pre-commit.ci
Adds an EXCLUDE_DIRS path-prefix check to detect_missing_i18n.py so any template under openlibrary/templates/design/ is auto-skipped, matching the existing exclusion for design.html. Strips the now-unneeded $_(...) wrappers from select-popover.html and the matching design.html nav link, and removes the corresponding entries from messages.pot.
cdrini
approved these changes
May 8, 2026
Collaborator
cdrini
left a comment
There was a problem hiding this comment.
Lgtm! Chatted about some design feedback, but super excited to see this first step! This will be a huge boon for our search UX!
Comment on lines
+354
to
+359
| this.placeholder = 'Filter…'; | ||
| this.unselectedHeading = ''; | ||
| this.selectedHeading = 'SELECTED'; | ||
| this.suggestionsHeading = 'SUGGESTIONS'; | ||
| this.clearLabel = 'Clear selections'; | ||
| this.noMatchesLabel = 'No matches'; |
Comment on lines
+74
to
+79
| el.items = [ | ||
| { value: 'grid', label: 'Grid' }, | ||
| { value: 'list', label: 'List' }, | ||
| { value: 'compact', label: 'Compact' } | ||
| ]; | ||
| })(); |
Collaborator
There was a problem hiding this comment.
Is it possible to pass this in from html directly? Eg from our templetar or jinja html, something like:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Big step towards #12015 - reusable language selector
New
ol-select-popovercomposesol-popoverto provide a multi-select list with optional filter input, grouped SELECTED/SUGGESTIONS sections, and a clear-selections footer. Adds a design page entry for it, plus minorol-popoverrefinements and border-radius token tweaks.Note: Follow-up PR will implement it on patron facing pages.
ol-select-popover.mp4
Technical
ol-popoverfor animation, focus trap, mobile tray, and dismissal.items.length > search-threshold(default8);0always shows it, a large value hides it.slot="trigger".ol-select-popover-change({ selected, added, removed }) andol-select-popover-clear.--border-radius-sm2→3px,--md4→6px,--lg8→9px.Testing
/design#select-popover.Stakeholders
@mekarpeles @cdrini