Skip to content

fix(theme/bootstrap): apply sort/num/lang options on search, not on change#3174

Merged
marevol merged 2 commits into
masterfrom
fix/static-theme-sort-apply-on-search
Jun 22, 2026
Merged

fix(theme/bootstrap): apply sort/num/lang options on search, not on change#3174
marevol merged 2 commits into
masterfrom
fix/static-theme-sort-apply-on-search

Conversation

@marevol

@marevol marevol commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Problem

In the bootstrap (Static/SPA) theme, changing the sort, number of
results
, or language select in the search-options drawer immediately
re-ran the search, so results changed before the user pressed the Search
button. The default (JSP) search screen only applies these options when a
Search button is pressed.

Fix (match the JSP behavior)

  • Remove the change -> runSearch() handlers on the sort/num/lang drawer
    selects, so changing a select no longer auto-runs a search.
  • When the header search form is submitted, read the current sort/num/lang
    selects so a manual change is applied on the Search button.
  • The search-options Clear button now performs a visual-only reset and
    no longer re-runs the search, matching the JSP Clear button; the reset is
    applied on the next search.
  • The home search form carries the drawer's sort/num/lang selections into
    the first search.

Tests

  • Added regression tests in BundledBootstrapThemeTest.
  • BundledBootstrapThemeTest: 113 tests pass.
  • node --check passes on the edited JS.

marevol added 2 commits June 22, 2026 23:48
…hange

The bootstrap (Static/SPA) theme re-ran the search immediately when the
sort, num, or lang select in the search-options drawer changed, so results
changed before the user pressed the Search button. The default JSP screen
only applies these options on submit.

Match the JSP behavior:
- Remove the change -> runSearch() handlers on the sort/num/lang selects.
- Read the current sort/num/lang selects when the header search form is
  submitted, so a manual change is applied on the Search button.
- The search-options Clear button now performs a visual-only reset and no
  longer re-runs the search (matching the JSP Clear button); the reset is
  applied on the next search.
- The home search form carries the drawer's sort/num/lang selections into
  the first search.

Add regression tests to BundledBootstrapThemeTest.
…ption/geo comments

- runFromUrl() now re-renders the search-options drawer selects on every
  navigation (link / back-forward / facet submit). Without this, the selects
  kept a stale displayed value and, now that they are applied on the Search
  button, that stale value was written back to the URL, reverting the user's
  actual sort/num/lang.
- Correct the Clear-button comment: the geo filter is dropped only when the
  drawer's own Search button reads the now-empty inputs; a header-form submit
  preserves geo from the URL, matching the JSP theme.
- Document why the header submit sets but never deletes num (the num select
  has no empty placeholder option, so its value is always present).
- Add a regression test for the runFromUrl select re-sync.
@marevol marevol self-assigned this Jun 22, 2026
@marevol marevol added the task label Jun 22, 2026
@marevol marevol added this to the 15.7.0 milestone Jun 22, 2026
@marevol marevol merged commit bc8d650 into master Jun 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant