Repository navigation
Search: Use one shared field across pages - #65
Merged
Merged
Conversation
Profile, project, package, release, tag, Actions and diff pages each wrote their own search input and restyled it in their page stylesheet, next to two shared implementations that declared the same box. components/common/search now renders all of them. Kind selects the variant (submit, icon or plain), Local marks a client-side filter, and Class carries the page's layout hook. The native query/mode/submit group keeps its opt-in class but its rules move beside the component, so one stylesheet owns search fields. A test fails when a template writes its own search input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 3, 2026
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.
Search fields were written and styled separately on almost every page that has one, alongside two shared implementations (
theme-search-fieldandtheme-search-control) that declared the same 32px box. This moves all of them ontocomponents/common/search/search.Changes
Kind:submit(default, trailing search button),icon(leading search icon) orplain.Localmarks a client-side filter that is never submitted,IDandNameset the input's identity,Labeloverrides the accessible name, andClassadds a page layout hook.theme-search-control, used by repository code search) move from the theme engine into the component stylesheet, so one file owns search fields.CONTRIBUTING.mddocuments the variants.Not migrated: the "Go to file" picker, which is a combobox with a shortcut hint and clear button rather than a search field.
Visual result
Intended to be unchanged. Measured in the dev preview at 1440px before and after, and against github.com:
Two deliberate differences: icon fields on Actions and diff move the icon 1px left to GitHub's offset, and the release and tag search icon is now decorative rather than a submit button, as on GitHub (Enter submits).
Checks
bun commitpasses (385 tests).http://localhost:3000, Forgejo 16.0.3): release search submits and keeps its value; the Actions run filter and both diff filters filter and restore their rows; focus rings render; every field fits a 390px viewport without horizontal overflow.🤖 Generated with Claude Code