refactor(theme/bootstrap): remove no-op home-view option select helpers#3172
Merged
marevol merged 2 commits intoJun 22, 2026
Merged
Conversation
renderHomeOptions() and applyHomeOptions() read and write the element ids home-sort-select / home-num-select / home-lang-select / home-label-select, which no longer exist in the theme markup: the home view was migrated to the shared #searchOptions drawer, so these ids are never rendered. Both functions still run, but every getElementById returns null, so they have no effect. resetOptionsDOM() also iterated the same non-existent home-*-select ids. Remove both functions, the applyHomeOptions export and its call in app.js, the renderHomeOptions call in renderSearchOptions, and the home-*-select loop in resetOptionsDOM(). The home search-form submit still carries the keyword and navigates, and clearSearchState() still resets the live drawer controls, so behavior is unchanged.
… home select test_searchJs_populatesHomeOptions asserted that search.js contains the literal "home-sort-select", but no theme markup ever defined home-*-select elements — the home view shares the #searchOptions drawer, and the helpers referencing those ids were removed as no-ops. Update the test to assert what search.js actually does: dynamically populate the shared label multi-select (#labelSearchOption) via renderLabelOptions(). Renamed to test_searchJs_populatesLabelOption.
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.
Summary
Remove helper functions that operate only on home-view option selects that no longer exist in the theme markup. Pure no-op cleanup; no behavior change.
Background
The home view was migrated to the shared
#searchOptionsdrawer. The idshome-sort-select,home-num-select,home-lang-select,home-label-selectare no longer rendered inindex.html(and a check of the history shows they never were — they were introduced dead alongside the shared-drawer redesign).renderHomeOptions()andapplyHomeOptions()still execute, but everygetElementByIdfor those ids returnsnull, so they have no effect.resetOptionsDOM()also looped over the same non-existent ids.Changes
renderHomeOptions()and its call inrenderSearchOptions().applyHomeOptions(), itsexport, and its call inapp.js's home search-form submit handler.home-*-selectloop inresetOptionsDOM().BundledBootstrapThemeTest: the test that assertedsearch.jscontains the literalhome-sort-selectnow asserts whatsearch.jsactually does — populate the shared label multi-select (#labelSearchOption) viarenderLabelOptions(). Renamedtest_searchJs_populatesHomeOptions→test_searchJs_populatesLabelOption.The home search-form submit still carries the keyword and navigates, and
clearSearchState()still resets the live drawer controls. No live behavior changes.Testing
node --checkpasses for the changed JS files.home-*-selectids.#labelSearchOptionpopulation, whichsearch.jsperforms inrenderLabelOptions().