From 5a7b2e882ecf9ded8196b2f1d90e649561938ded Mon Sep 17 00:00:00 2001 From: Sergey Kozyrenko Date: Tue, 19 May 2026 17:55:54 +0700 Subject: [PATCH] style(frontend): align InputSearch sizing with size='sm' button geometry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `HeaderButton` defaults to `size='sm'` (h-8 px-3 rounded-md text-xs) and pages mount InputSearch right next to it. The component previously shipped with h-7 / icon-xs (28 px) so the icon-only trigger sat a notch shorter than its sibling action — visible in the knowledges header. Bumped the group to h-8, the trigger to size='icon-sm', and pinned the inner input to h-8 (it inherits `Input`'s default h-9 otherwise, which pokes 4 px past the bordered group). Dropped the duplicate negative margins on the button — the addon's `has-[>button]:ml-[-0.45rem]` already handles flush-left alignment when expanded; only the collapsed state needs the explicit `-mx-1.5` to claw back the addon's default padding around the lone icon. Verified: trigger 32×32, group 32 px, input 32 px, all matching the neighbouring `HeaderButton` baseline. Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/src/components/ui/input-search.tsx | 22 ++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/ui/input-search.tsx b/frontend/src/components/ui/input-search.tsx index 17240e90..bf707821 100644 --- a/frontend/src/components/ui/input-search.tsx +++ b/frontend/src/components/ui/input-search.tsx @@ -139,7 +139,10 @@ export function InputSearch({ return ( button]:ml-[-0.45rem]` already handles the + // analogous adjustment when expanded. + className={cn(!isExpanded && '-mx-1.5')} > {isExpanded ? ( @@ -179,7 +186,12 @@ export function InputSearch({ > onSearchChange(event.target.value)} onKeyDown={handleInputKeyDown} placeholder={placeholder}