From b358b15d21aa5cbe373b3a4b122d4a1e3311ffcb Mon Sep 17 00:00:00 2001 From: Nabil-Aufa <181296848+Nabil-Aufa@users.noreply.github.com> Date: Mon, 19 Oct 2026 16:40:01 +0700 Subject: [PATCH 01/29] fix(#70): give the shells the section 08 breakpoints Tablet from 768: the top nav and no tab bar, a 32px gutter and one column up to 640. Desktop from 1024: content up to 1200, centred, a 40px gutter (80 from 1280). The onboarding top bar and its centred column start at 768 too. Co-Authored-By: Claude Opus 5.5 --- fe/src/components/layout/AppShell.tsx | 15 +++++++---- fe/src/components/layout/MobileHeader.tsx | 2 +- fe/src/components/layout/OnboardingShell.tsx | 27 +++++++++++--------- fe/src/components/layout/TabBar.tsx | 2 +- fe/src/components/layout/TopNav.tsx | 4 ++- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/fe/src/components/layout/AppShell.tsx b/fe/src/components/layout/AppShell.tsx index 30401f8..afd3ae2 100644 --- a/fe/src/components/layout/AppShell.tsx +++ b/fe/src/components/layout/AppShell.tsx @@ -11,9 +11,12 @@ import { TopNav } from "./TopNav"; /** * The frame of every screen after onboarding (Advance, Repayment, History). * - * Desktop (lg, 1440 frame): an 80px margin, the 90px top nav, then the screen 32px below it. A phone - * (390 frame): the 64px header, the screen 16px below it with a 16px margin, and the tab bar pinned to - * the bottom, so the screen keeps 120px free underneath to scroll clear of it. + * Three layouts, from section 08 of the design ("Layout and responsive"): + * - Phone, under 768: the 64px header, the screen 16px below it with a 16px gutter, and the tab bar + * pinned to the bottom, so the screen keeps 120px free underneath to scroll clear of it. + * - Tablet, 768 to 1023: the top nav, a 32px gutter, and one column up to 640 wide, centred. + * - Desktop, 1024 and up: the top nav, content up to 1200 wide and centred, a 40px gutter (80 from + * 1280). Each screen lays out its main and side columns inside that. */ export function AppShell({ children }: { children: ReactNode }) { const router = useRouter(); @@ -32,11 +35,13 @@ export function AppShell({ children }: { children: ReactNode }) { ); return ( -
+
{/* The gap under the top nav is the page's own: 32 on 2a to 2d, 28 on 3a and 3b. */} -
{children}
+
+ {children} +
); diff --git a/fe/src/components/layout/MobileHeader.tsx b/fe/src/components/layout/MobileHeader.tsx index ddc7ba3..4ed9b5d 100644 --- a/fe/src/components/layout/MobileHeader.tsx +++ b/fe/src/components/layout/MobileHeader.tsx @@ -5,7 +5,7 @@ import { NetworkChip } from "@/components/ui/NetworkChip"; /** Mobile header from "05 Product components": the mark, Testnet and the wallet. The tabs sit at the bottom. */ export function MobileHeader({ wallet }: { wallet: ReactNode }) { return ( -
+
diff --git a/fe/src/components/layout/OnboardingShell.tsx b/fe/src/components/layout/OnboardingShell.tsx index eb3da40..ad4e03a 100644 --- a/fe/src/components/layout/OnboardingShell.tsx +++ b/fe/src/components/layout/OnboardingShell.tsx @@ -31,11 +31,13 @@ export function OnboardingShell({ actions?: ReactNode; }) { return ( -
- {/* Desktop top bar */} - {/* Three columns, the outer two equal and at least as wide as the widest chips, so the stepper stays - centred and keeps its place from step to step whatever the wallet chip says. */} -
+ // Section 08: a 32px gutter on a tablet, 40 at 1024, 80 from 1280. +
+ {/* Top bar, from 768. On a tablet the three sit side by side as drawn (wordmark, the 480 stepper, + the chips). From 1024 the outer two columns are equal and at least as wide as the widest chips, + so the stepper stays centred and keeps its place from step to step whatever the wallet chip + says. */} +
@@ -47,7 +49,7 @@ export function OnboardingShell({
{/* Phone header */} -
+
{onBack ? (
-
+
-
+ {/* From 768 the column is centred in the page, as on the tablet and desktop frames. */} +
{onBack && ( -
+
-
-
+
+

Your wallet

{walletName}} /> @@ -70,23 +72,28 @@ export function ProveRevenue({ } />
-
-

How your advance is set

- {terms === "loading" ? ( - // As tall as the line it stands for: one 20px line on a phone, two 21px lines on desktop, - // where "The same proof always gives the same number." wraps under it. -
- - -
- ) : ( -

- {terms - ? `${shareWords(terms)} of your proven revenue, up to ${usdcWords(terms.capStroops)}.` - : "A share of your proven revenue, up to a limit per advance."} - The same proof always gives the same number. -

- )} +
+

How your advance is set

+ {/* While the rate loads, bars in the shape of the sentence: invisible words of about the same + length, so the bars wrap, and the card keeps its height, as the sentence will at any width. */} +

+ {terms === "loading" ? ( + + Reading the rate of your advance, up to its limit. + The same proof always gives the same number. + + ) : ( + <> + {terms + ? `${shareWords(terms)} of your proven revenue, up to ${usdcWords(terms.capStroops)}.` + : "A share of your proven revenue, up to a limit per advance."} + The same proof always gives the same number. + + )} +

@@ -95,11 +102,12 @@ export function ProveRevenue({ function List({ head, items, icon }: { head: string; items: string[]; icon: ReactNode }) { return ( -
+

{head}