Repository navigation
fix(web): end a search placeholder too long for its box with an ellipsis - #5470
Conversation
On a phone in a longer language, search boxes cut their placeholder off mid-word with no ellipsis: in German at 393 px the Admin Users search read "Nach Benutzername oder E-Mail such". The shared Input set no text-overflow, and only Silo-Server#5057's diagnostics filters had one. The shared Input now sets text-overflow: ellipsis while its placeholder shows (placeholder-shown:text-ellipsis), which covers every search box built on it, and the raw input of the Watch Together browse shelf gets the same class. A typed value is unaffected, so a long path or URL keeps its end visible. Closes Silo-Server#5059 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The Evidence section covers phone-width web, but this changes the shared |
A blurred typed value shows its start and clips its end with or without the ellipsis, so the comment's claim that a typed path keeps its end visible was wrong. Say instead that typed values keep the plain clip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quick104
left a comment
There was a problem hiding this comment.
🤖 Claude Code (claude-opus-5-5)
The change works. I built the web bundle at the base and at this head and rendered the Admin › Users search and the Watch Together search with each build's compiled CSS and the German strings. In Chromium, WebKit and Firefox, the base stops the placeholder mid-word and this head ends it in "…". Typed values look the same before and after. I could not use a signed-in dev sandbox for this check, so these are fixture renders rather than captures of the running app.
One inline finding, about the new comment. I'm fixing it in a commit on this branch, so there's no need to change it yourself.
Two browser facts for the maintainers, neither caused by this PR:
- Chromium and WebKit drop a placeholder's ellipsis while the empty field has focus, and Firefox keeps it. After someone taps into a search box on a phone, the placeholder is clipped again until they type. No CSS on the input or on
::placeholderchanges that. - The Ctrl/Cmd-K search dialog (
GlobalSearch.tsx) uses a raw<input>, so this PR doesn't reach it. Its request-mode placeholder still stops mid-word at narrow widths in most languages other than English. That input hasautoFocus, so adding the same class there would only help Firefox. I've left that as a maintainer decision.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
🤖 Claude Code (claude-opus-5-5) Review summaryReviewed head: The PR does what it says. On the base, an overflowing placeholder on the shared How it was checked
Evidence: https://evidence.siloserver.org/r/silo-server/pr-5470-review/ Addressed
Left for the maintainers
Validated features: I checked the passed v1.0 cases. None depends on how an overflowing placeholder looks. User manual: unaffected. No setting, label or step changes. Other clients: Web only. The Apple and Android apps draw their own search fields. Council review (one combined code and visual round, on
All three flagged the inaccurate comment, which is now fixed. They also flagged the Ctrl/Cmd-K search: Gemini wanted the class added there, and Opus judged it fine to leave out because the input autofocuses. That is the maintainer decision above. Fit: 9/10 · Readiness: 8/10, conditional (assuming CI is green)
|
Depends on: none. Merge order: none. Follows #5057 (merged), which fixed the four diagnostics filters the same way.
Problem
Closes #5059
Related issue: #5057
Validation tasks: none
Other clients: none. Web only.
On a phone in a longer language, the web app's search boxes cut their placeholder off mid-word with no ellipsis, so nothing shows that text is missing. In German at 393 px, the Admin Users search read "Nach Benutzername oder E-Mail such". The shared
Input(web/src/components/ui/input.tsx) sets notext-overflow, so any input whose placeholder overflows clips it. #5057 fixed only the diagnostics filters.Approach
Inputgetsplaceholder-shown:text-ellipsis:text-overflow: ellipsiswhile its placeholder shows. Chromium, WebKit and Firefox draw the ellipsis on the placeholder when the input itself has it; setting it on::placeholderalone works only in Firefox, as the issue notes.Input. The one raw<input>it names, the Watch Together browse shelf (BrowseShelf.tsx), gets the same class.Inputfields keeps the browser's plain clip instead of ending in "…" while unfocused.text-ellipsis, which also covers typed text there.Validation
main, the search box's computedtext-overflowisclipand its placeholder stops at "…E-Mail such"; with this change it'sellipsisand the placeholder ends "su…". Screenshots are below.pnpm exec vitest run src/components/ui src/pages/AdminUsers src/pages/watchtogether: 21 passed.tsc -b --noEmit, eslint (no new findings) and prettier on the changed files: clean.Input), Safari and Firefox (the issue reports their behaviour), and a typed value in a browser (placeholder-showndoesn't match once a value is typed).Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-5470/ (before/after screenshots of the Admin Users search in German at phone width)
Admin › Users search, German, phone width (393×852)
Before (main): the placeholder stops at "Nach Benutzername oder E-Mail such", with no sign that text is missing.
After: it ends "Nach Benutzername oder E-Mail su…".
Risks
Inputwith a placeholder now ends an overflowing placeholder in "…". That's the intended change. A field whose placeholder fits looks the same.Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Add placeholder text-overflow ellipsis to
Inputand browse search fieldAdds a placeholder-only text-overflow utility to the shared
Inputcomponent in input.tsx so overflowing placeholder text ends with an ellipsis. Applies it to the watch-together browse search field in BrowseShelf.tsx. Entered values keep the browser's default clipping behavior.Macroscope summarized 6f34003.