Summary
Scientists have requested the ability to search and filter missions by Citation directly from the sidebar filter panel on the Home and Missions pages.
Current State
The backend is fully implemented:
citation — ModelMultipleChoiceFilter on Mission.citations (M2M to Citation model), queryset ordered by DOI
citation_search — CharFilter searching citations__doi__icontains OR citations__full_reference__icontains
- Both fields are included in
MissionFilterSidebarHelper and MissionFilterFormHelper
- Both are listed in the JS
filterKeys arrays across all pages
However, the citation multi-select does not currently render as a collapsible checkbox-dropdown in the sidebar (the setupCheckboxDropdowns function in project.js requires .form-check child elements, which ModelMultipleChoiceFilter may not produce with the default widget). The citation_search text field may also not be visible or styled consistently with other sidebar inputs.
Requested Work
citation filter — ensure it renders as a collapsible checkbox-dropdown in the sidebar (matching the style of Vehicle Name, Platform Type, Survey Quality). This may require switching the widget to CheckboxSelectMultiple in filters.py.
citation_search text field — confirm it is visible in the sidebar with correct placeholder text and dark-theme styling consistent with other text inputs.
- Home page (
map.js) — verify both fields are cloned and displayed in the Home page sidebar (the Home page has its own form-building logic separate from the Missions page).
- Clear behavior — ensure both citation fields are cleared correctly when the Clear button is clicked.
- URL param round-trip — verify
citation and citation_search params are preserved in the URL and restore correctly on page load (sidebar re-open).
Files Likely Affected
smdb/smdb/filters.py — possibly add widget=CheckboxSelectMultiple to citation filter
smdb/smdb/static/js/map.js — Home page sidebar citation field rendering
smdb/smdb/static/js/map_mission_filter.js — Missions page sidebar citation field rendering
smdb/smdb/static/js/project.js — setupCheckboxDropdowns may need to handle citation dropdown
Acceptance Criteria
Summary
Scientists have requested the ability to search and filter missions by Citation directly from the sidebar filter panel on the Home and Missions pages.
Current State
The backend is fully implemented:
citation—ModelMultipleChoiceFilteronMission.citations(M2M toCitationmodel), queryset ordered by DOIcitation_search—CharFiltersearchingcitations__doi__icontainsORcitations__full_reference__icontainsMissionFilterSidebarHelperandMissionFilterFormHelperfilterKeysarrays across all pagesHowever, the
citationmulti-select does not currently render as a collapsible checkbox-dropdown in the sidebar (thesetupCheckboxDropdownsfunction inproject.jsrequires.form-checkchild elements, whichModelMultipleChoiceFiltermay not produce with the default widget). Thecitation_searchtext field may also not be visible or styled consistently with other sidebar inputs.Requested Work
citationfilter — ensure it renders as a collapsible checkbox-dropdown in the sidebar (matching the style of Vehicle Name, Platform Type, Survey Quality). This may require switching the widget toCheckboxSelectMultipleinfilters.py.citation_searchtext field — confirm it is visible in the sidebar with correct placeholder text and dark-theme styling consistent with other text inputs.map.js) — verify both fields are cloned and displayed in the Home page sidebar (the Home page has its own form-building logic separate from the Missions page).citationandcitation_searchparams are preserved in the URL and restore correctly on page load (sidebar re-open).Files Likely Affected
smdb/smdb/filters.py— possibly addwidget=CheckboxSelectMultipletocitationfiltersmdb/smdb/static/js/map.js— Home page sidebar citation field renderingsmdb/smdb/static/js/map_mission_filter.js— Missions page sidebar citation field renderingsmdb/smdb/static/js/project.js—setupCheckboxDropdownsmay need to handle citation dropdownAcceptance Criteria