fix(settings): stop cropping the sidebar search placeholder

Reserve the clear button's 32px of right padding only while it renders,
which leaves the placeholder 124px instead of 102px at the default
sidebar width. Add text-ellipsis so longer translations end in an
ellipsis rather than a sliced glyph, and hide the native WebKit search
cancel button that doubled up with our own.
This commit is contained in:
neon
2026-09-20 17:36:19 +00:00
parent 06dcb6df6c
commit 2da27cb5c2
@@ -165,7 +165,8 @@ defineExpose({ focusSearch })
ref="searchInput"
v-model="query"
type="search"
class="h-9 w-full min-w-0 rounded-md border border-input bg-background pl-8 pr-8 text-sm shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50"
class="h-9 w-full min-w-0 overflow-hidden text-ellipsis rounded-md border border-input bg-background pl-8 text-sm shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [&::-webkit-search-cancel-button]:hidden"
:class="isSearching ? 'pr-8' : 'pr-2.5'"
:placeholder="t('settings.nav.searchPlaceholder')"
:aria-label="t('settings.nav.searchPlaceholder')"
data-testid="settings-nav-search"