Skip to content

Commit d5a4221

Browse files
fix(web): keep the header on one line between md and lg
Tailwind's container is 768px wide across the whole 768–1023 range (736px content box). Measured at 768: logo 128 + nav 297 + gaps 48 + utility cluster 387 = 860, so the document scrolled to 845px and "Help Wanted" wrapped onto two lines. Hide the GitHub icon link below lg (the mobile sheet keeps its own GitHub row) and narrow the desktop search to w-24 there, restoring w-48 / focus-within:w-72 at lg. The results dropdown is anchored right-0 with min-w-72 instead of stretching left-0 right-0, so it stays 288px wide over the narrow input — the width it already had at lg. After: 728px used at 768, no horizontal scroll; 1024 fits with the icon and wide search back. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RdRwHvDupRLV8GuJpYKzEr
1 parent b417c87 commit d5a4221

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎apps/web/src/components/AppHeader.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ const navLinkClass = ({ isActive }: { isActive: boolean }) =>
189189

190190
function GitHubLink() {
191191
return (
192-
<Button asChild variant="ghost" size="icon-sm">
192+
// Desktop-only: between md and lg the header has no room for it (the
193+
// utility cluster would push "Help Wanted" onto two lines); the mobile
194+
// sheet carries its own GitHub row.
195+
<Button asChild variant="ghost" size="icon-sm" className="hidden lg:inline-flex">
193196
<a
194197
href={GITHUB_URL}
195198
target="_blank"

‎apps/web/src/components/SearchBox.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function SearchBox({ inline = false }: SearchBoxProps) {
6666

6767
return (
6868
<div
69-
className={`relative ${inline ? 'w-full' : 'w-48 focus-within:w-72 transition-all duration-200'}`}
69+
className={`relative ${inline ? 'w-full' : 'w-24 lg:w-48 lg:focus-within:w-72 transition-all duration-200'}`}
7070
>
7171
<Input
7272
ref={inputRef}
@@ -88,7 +88,7 @@ export function SearchBox({ inline = false }: SearchBoxProps) {
8888
id="search-results-dropdown"
8989
role="listbox"
9090
aria-label="Search results"
91-
className="absolute top-full left-0 right-0 mt-1 bg-popover border border-border rounded-md shadow-lg z-50 py-1 max-h-[28rem] overflow-y-auto"
91+
className="absolute top-full right-0 min-w-72 mt-1 bg-popover border border-border rounded-md shadow-lg z-50 py-1 max-h-[28rem] overflow-y-auto"
9292
>
9393
{loading && results.length === 0 && (
9494
<p className="px-3 py-2 text-sm text-muted-foreground">Searching…</p>

0 commit comments

Comments
 (0)