Skip to main content

Module search_view

Module search_view 

Source
Expand description

Dedicated search view for the library sidebar.

The search form is a persistent Revealer that sits above the content_stack. When search is active the form stays visible and results render in the normal masonry grid below it. This avoids the โ€œsearch bar disappearsโ€ problem while keeping a single grid renderer.

Structsยง

SearchViewParts
UI widgets for the dedicated search form.

Constantsยง

MODE_LABELS ๐Ÿ”’

Functionsยง

available_modes ๐Ÿ”’
build_action_row ๐Ÿ”’
build_filter_panel ๐Ÿ”’
Assemble all filter groups into a revealer.
build_search_bar ๐Ÿ”’
build_search_view
Build the search form widget tree.
clear_all_filters
Reset all filter widgets to their default (empty) state.
collect_filters
Collect all filter widget values into a MetadataSearchFilters.
connect_filter_toggle ๐Ÿ”’
Wire the toggle button to show/hide the filters revealer.
current_mode ๐Ÿ”’
normalise_iso_date
Normalise a user-entered date to ISO 8601 UTC. Accepts bare YYYY-MM-DD or full RFC 3339.
opt_string
Convert a non-empty trimmed string to Some, otherwise None.
opt_true ๐Ÿ”’
select_tag
Select tag_id in the Tag dropdown, if it is listed.
selected_mode
selected_tag_id ๐Ÿ”’
set_available_modes
set_available_tags
Fill the Tag dropdown from the serverโ€™s tags, keeping the current choice if it still exists.
set_filter_features
stack_groups ๐Ÿ”’
wrap_in_scrolled_revealer ๐Ÿ”’