Skip to content

Commit 62da208

Browse files
Sbussisoclaude
andcommitted
fix(mobile): nav overflow + docs Quick Setup + long API path wrapping
Three issues found in a mobile-viewport audit (390×844, iPhone 12 size): 1. .landing-nav-actions (Sign In + Get Started) was still rendering at ≤1024px alongside the hamburger button, pushing the row past the viewport and clipping "Get Started." Now hidden via the existing 1024px media query, with the auth CTAs duplicated INSIDE the .landing-nav-links dropdown as styled button-pills (only visible when the hamburger menu is toggled open). The dropdown is now a complete navigation surface — marketing links + auth — with no visible row overflow. 2. The docs Quick Setup step 3 embedded an <OsTabs> picker whose .install-tabs container defaulted to display: flex / row (from index.css). On mobile this stacked the OS chips + curl code block in a single horizontal row that ran 933 px wide on a 390 px viewport. Forced flex-direction: column inside the existing ≤768px media query so the code block lands below the OS strip. Mirrors the same fix already shipped for the landing Quick Start via .install-tabs.install-tabs-landing. 3. .docs-endpoint-path rendered long URL paths like /api/incidents/{incident_id}/evidence/{evidence_id}/playlist.m3u8 on a single line with no break opportunities. Added overflow-wrap: anywhere + word-break: break-word at all widths so long paths wrap gracefully in the API Reference table. Sentinel, Pricing, and Security pages were already mobile-clean and needed no changes (the security comparison table h-scrolls inside its own container, which is acceptable). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7eaf92c commit 62da208

2 files changed

Lines changed: 88 additions & 1 deletion

File tree

frontend/src/components/LandingNav.jsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,28 @@ function LandingNav() {
8181
<li>
8282
<Link to="/pricing" onClick={() => setMobileMenuOpen(false)}>Pricing</Link>
8383
</li>
84+
{/* Mobile-only auth CTAs. The desktop nav has these in
85+
.landing-nav-actions (hidden via media query at ≤1024px); the
86+
dropdown duplicates them so the hamburger menu is a complete
87+
navigation surface on phones / narrow tablets. */}
88+
<li className="landing-nav-mobile-cta">
89+
<Link
90+
to="/sign-in"
91+
className="landing-btn-ghost"
92+
onClick={() => setMobileMenuOpen(false)}
93+
>
94+
Sign In
95+
</Link>
96+
</li>
97+
<li className="landing-nav-mobile-cta">
98+
<Link
99+
to="/sign-up"
100+
className="landing-btn-primary"
101+
onClick={() => setMobileMenuOpen(false)}
102+
>
103+
Get Started
104+
</Link>
105+
</li>
84106
</ul>
85107
</SignedOut>
86108

frontend/src/styles/landing.css

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,6 +1453,14 @@
14531453
.docs-endpoint-path {
14541454
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
14551455
color: var(--text-primary);
1456+
/* Long URLs like /api/incidents/{incident_id}/evidence/{evidence_id}/playlist.m3u8
1457+
don't have natural break opportunities — slashes and underscores aren't
1458+
break points for `word-break: normal`, so the path renders on a single
1459+
line and overflows narrow viewports. anywhere lets the browser break
1460+
between any two characters when needed without sprinkling hyphens or
1461+
introducing wrap markers in the JSX. */
1462+
overflow-wrap: anywhere;
1463+
word-break: break-word;
14561464
}
14571465

14581466
.docs-flow-diagram {
@@ -1791,6 +1799,42 @@
17911799
padding: 1rem;
17921800
}
17931801

1802+
/* Hide the inline auth buttons at hamburger-breakpoint widths — at iPhone
1803+
widths they push the row past the viewport and clip the "Get Started"
1804+
CTA. The dropdown menu surfaces auth actions instead via the
1805+
.landing-nav-mobile-cta items appended to .landing-nav-links. */
1806+
.landing-nav-actions {
1807+
display: none;
1808+
}
1809+
1810+
/* Auth CTAs that live INSIDE the mobile dropdown. They are appended at
1811+
the bottom of .landing-nav-links and styled like proper buttons so the
1812+
dropdown is a complete navigation surface — marketing links + auth
1813+
CTAs, no separate visible row. */
1814+
.landing-nav-links li.landing-nav-mobile-cta {
1815+
padding: 0.5rem 1rem;
1816+
}
1817+
.landing-nav-links li.landing-nav-mobile-cta:first-of-type {
1818+
margin-top: 0.5rem;
1819+
border-top: 1px solid var(--border-color);
1820+
padding-top: 1rem;
1821+
}
1822+
.landing-nav-links li.landing-nav-mobile-cta a {
1823+
display: block;
1824+
text-align: center;
1825+
padding: 0.75rem 1rem;
1826+
border-radius: 8px;
1827+
font-weight: 600;
1828+
}
1829+
.landing-nav-links li.landing-nav-mobile-cta a.landing-btn-ghost {
1830+
border: 1px solid var(--border-color);
1831+
color: var(--text-primary);
1832+
}
1833+
.landing-nav-links li.landing-nav-mobile-cta a.landing-btn-primary {
1834+
background: var(--accent-green);
1835+
color: #0a0a0f;
1836+
}
1837+
17941838
.landing-mobile-menu-btn {
17951839
display: flex;
17961840
}
@@ -1863,12 +1907,33 @@
18631907
.docs-step {
18641908
gap: 0.75rem;
18651909
}
1866-
1910+
18671911
.docs-step-number {
18681912
width: 1.75rem;
18691913
height: 1.75rem;
18701914
font-size: 0.8125rem;
18711915
}
1916+
1917+
/* Step content can be wider than the viewport on mobile because some
1918+
steps embed an OS-tabs picker followed by a code block. Without this
1919+
min-width: 0 the inner flex child (.docs-step-content) refuses to
1920+
shrink below its intrinsic content width, pushing the whole row out
1921+
past the viewport edge. */
1922+
.docs-step-content {
1923+
min-width: 0;
1924+
flex: 1;
1925+
}
1926+
1927+
/* The docs Quick Setup wraps an <OsTabs> inside step 3. OsTabs renders
1928+
`.install-tabs` (display: flex, default row) with three OS chips and
1929+
a code block side-by-side — fits desktop, blows past mobile. Force
1930+
a vertical stack at narrow widths so the code block lands BELOW
1931+
the OS tab strip instead of overflowing to the right. Mirrors the
1932+
fix already in place for .install-tabs.install-tabs-landing on the
1933+
landing-page Quick Start. */
1934+
.install-tabs {
1935+
flex-direction: column;
1936+
}
18721937

18731938
.docs-flow-diagram {
18741939
padding: 1rem;

0 commit comments

Comments
 (0)