fix: bump bundled SifterSearch to v0.6.0 (stop the double search box) - #200
Merged
Conversation
…mounting on every page A static export bundles every JS module into one self-executing file, so SifterSearch's results-page module (ext.sifter.results) ran on every page and mounted a second, full PagefindUI search box everywhere, not just on the configured SifterSearchResultsPage. SifterSearch v0.6.0 fixes this at the source: the results widget now guards on wgSifterSearchOnResultsPage and only mounts on the results page (#23), and a new retarget module points the native search form at the results page so it is actually reachable by submitting a query (#30). Verified by baking the docs with the new image: normal pages show a single (native) search box and no PagefindUI, while the Search page mounts the full results widget and its form submits to Search.html. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Bug
On the deployed docs site, every page showed two search boxes: the native one in the header plus a full PagefindUI box in the content.
Cause
wikven's static export bundles every JS module into one self-executing file. SifterSearch's results-page module (
ext.sifter.results) is server-queued only on theSifterSearchResultsPage, but once it's in the shared bundle it ran on every page and itsmount()unconditionally created the PagefindUI. It was also unreachable on its own page (withSifterSearchFullText: falsenothing linked to it).Fix
Bump the bundled SifterSearch from v0.5.0 → v0.6.0, which fixes this at the source:
wgSifterSearchOnResultsPageand mounts only on the results page.ext.sifter.retargetmodule points the native search form at the results page, so submitting a query actually reaches it.(SifterSearch v0.6.0 was released from chaotic-ground/SifterSearch's existing release-please PR.)
Verification (local bake with the new image)
wgSifterSearchOnResultsPageabsent.actionis retargeted to./Search.htmlwith thetitle=Special:Searchhidden input removed.