Repository navigation
Front end: responsive layout from the section 08 rules (#70) - #71
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@Nabil-Aufa, I ran this locally: 1. Everything clickable needs the pointer cursorTailwind 4's preflight sets One rule in @layer base {
button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
[role="menuitem"],
[role="tab"],
label[for],
summary,
select {
cursor: pointer;
}
button:disabled,
[aria-disabled="true"] {
cursor: not-allowed;
}
}Then drop 2. Transaction amounts at 320 break differently in one listOn 3a and 3b at 320, "−20.00 USDC" breaks onto two lines while "−10.00 USDC" in the next row stays on one, so the amount column looks uneven. Under the width where the longest amount no longer fits (about 360), put the unit under the figure on every row, as the History tiles already do. Cosmetic only, nothing overflows. The type scale question is still open on my side; I'll answer it separately. |
|
@Nabil-Aufa, on the type sizes question: the roles win. Convert the screens to the section 08 roles, and treat the drawn in-between sizes as the nearest role:
The scale gets one new role for the two cases with no fit: Figure, 20 / 28 / 32 (phone / tablet / desktop), "Figures in tiles and breakdowns". It sits between Card title and Body in the section 08 table of The frames keep their drawn pixel sizes; where they differ from this table, the table is right. |
Section 08's type scale gets a Figure role, 20 / 28 / 32 (phone / tablet / desktop), for figures in tiles and breakdowns: the History figure tiles and the offer breakdown's "Your advance" had no role that fit. Answers the type size question on #71: the roles win over the drawn in-between sizes. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
@AncungAulia, thanks for both. The cursor rule, the amount units under 360, and the type roles from your table (with the new Figure role, 20 / 28 / 32) are in, and will be pushed after our strict review passes. One size your table does not cover: the repay amount input on 3a ("0.00", in "Make a repayment"). It was drawn at 36. I mapped it to Figure, the nearest role over the three breakpoints, so it is now 20 / 28 / 32. On a phone it reads small: it is smaller than the 22 "USDC" beside the balance, and only a little larger than the Max chip. Which role should it take?
🤖 Generated with Claude Code |
@AncungAulia's answer on #71: the roles win, and drawn in-between sizes take the nearest role. Card, panel, dialog and empty-state titles take Card title (20, 22, 24); sentences and rows take Body (16); labels, statuses, dates, chips, notes and links take Small (13, 13, 14). A new Figure role (20, 28, 32) sets the History tiles, the breakdown's Your advance and the repay amount input. A unit beside a figure keeps its own weight and drops to Small next to a Figure. No pixel font size is left in the app. The checking skeleton follows the new body height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
08691d5 to
66856ee
Compare
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 <noreply@anthropic.com>
…hen they do not fit text-hero, text-amount, text-page-title, text-card-title, text-body and text-small step at 768 and 1024, in rem. They replace the unused single-size scale. tailwind-merge learns they are font sizes. An error panel's two buttons wrap to a second row when they do not fit, the main one on top. When they must stack under 768 is settled in a later commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m 1024 Tablet: the desktop stepper, the Prove card as a row with a 200 illustration, the two lists one under the other, and the wallet and rule cards side by side under it, as frame 2a Tablet draws. Desktop: a 320 side column (the 360 from 1200 takes effect in a later fix), the lists side by side only when the text column has room, and every list item free to wrap. The page and card titles use the type roles. The rule's placeholder is now bars in the shape of the sentence, so the card keeps its height however many lines the sentence takes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…row phone Tablet: the desktop offer card and breakdown labels, with If you accept, the timer and both buttons under them, as frame 2b Tablet draws. Desktop: the side column is 320 (360 from 1200 in a later fix). The offer uses the hero amount role (56, 72, 88). A breakdown row with no room puts its value under its label, so nothing spills at 320. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From 768 the onboarding steps, Sign and Funds received use the centred column and sizes the desktop has, the wallet chip shows its chevron, the wallet picker and the repayment approval are centred dialogs rather than sheets. Step titles use the page title role (28, 36, 44) and Funds received the amount role (48, 56, 64); the checking skeleton follows the title's height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tablet: the desktop balance card, quick action labels and View contract, with the repay form, transactions, advance details and the ledger note in one column, as frame 3a Tablet draws. Desktop: the side column is 320 (360 from 1200 in a later fix). The balance uses the hero amount role. A transaction's date moves under its status on a narrow phone, a quick action label wraps rather than being cut, and a repay chip with no room moves to a second row (a later commit gives the chips equal widths). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tablet: the desktop summary tiles, eyebrow and ledger note, as frame 3b Tablet draws. The title uses the page title role. On a narrow phone the tiles no longer spill: a later commit lets them keep their size and wrap, as section 08 asks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Onboarding (1a, 1b, no wallet, 1c), 2a, 2b, a two-button panel, 3a and 3b, each at 320, 375, 768, 1024, 1280 and 1440: the page is no wider than the window, nothing is wider than its own box, and no label runs past its content box (centred text spills on both sides, which scrollWidth does not count). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The No advance yet card is 400 wide with 24 padding, the full column on a phone, and sits 48 under the title from a tablet up, as the four No advance yet frames draw. The layout check covers both pages in that state. Until #16 answers, the fixture client takes forepay.mock.ledger: none, active (the default), repaid or error, to try each ledger state by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed transaction reached the ledger and failed there: the network fee was spent and no
USDC moved, so "not charged" and "No transaction" were wrong. The row now says "Failed, no
USDC moved" ("Failed" on a phone) and links its receipt like every other row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Not the contract's claim template: it is the input of our own flow, what the #17 relay asks AdSense for, as @Lexirieru explained in the #57 review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The send's answer went to the screen the creator had left, which dropped it, so the screen they came back to waited two minutes on a transaction that never reached a ledger. A refusal is now remembered with the pending advance, and a screen already waiting on it is told: either way "The transaction did not go through" shows at once, and Try again sends it. The RPC stub no longer reports a request_advance still being sent, or refused, as landed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
min-[1200px]: sorted before lg: in the built CSS, so the column stayed 320 at every width. A wide breakpoint (75rem) sorts after lg. The layout check now measures the content box at 768 to 1440 and the side column at 1199 and 1200. In the 360 column the rule card's sentence takes three lines, so its loading bars now stand on invisible words with no figure that render as wide as the usual sentence, keeping the card's height at every width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row needs 745 for the wordmark, tabs and chips as the 834 frame draws them, and a 768 window leaves 704, so the wordmark shrank to 109. Nothing in the row shrinks now: below 834 the tabs take 10 of side padding instead of 20, from 834 they are as drawn, 12 apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at 320 Wrapping by the current width put "Allow USDC" and "Not now", or "Get Freighter" and "Back", side by side at 375. Section 08 decides per pair: under 768 they stack, main first, and only "Try again" or "Prove again" with "Back", which fit at 320, keep one row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heir drawn place The chips were sized by their labels (69, 70, 117). They now share one row equally where Full amount fits three times over; otherwise Full amount moves to a second row at the same width, as section 08 asks of chips. The balance card's circles are anchored 560 and 610 from the left, as every 3a frame draws them, rather than from the right, which only matched an 824 card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Side by side under the Prove card they stretched to the taller one; frame 2a Tablet draws the rule card shorter than the wallet card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Repayment" read "Repayme…" and "Advance received" read "Advance …": section 08 keeps the ellipsis for a line that matters more than its words. The title column keeps at least its longest word, so a title wraps between words; on a narrow phone the amount gives way instead, its unit moving under the figure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Section 08: chips and figure tiles keep their size and move to a new line. The tiles share equal grid columns at least 98 wide on a phone (the label on one line, the unit under the figure as frame 3b Mobile draws it), so at 320 the third moves to a second row at the same width; from 375 the three share one row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ledger too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hen disabled Tailwind 4's preflight gives buttons the default cursor, so every button showed the arrow while links showed the pointer. One base rule in globals.css, from @AncungAulia's review, covers buttons, menu items, tabs and labels; the wallet menu items drop their cursor-default. Buttons and quick actions no longer turn pointer events off when disabled (a disabled button ignores clicks anyway), so the not-allowed cursor shows over them. The e2e reads the cursor of what is really under the pointer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fixture row is dated 20 Oct 2026, so on that day the list held two Todays and the check failed in strict mode. It now looks in the row of the repayment just made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…column stays even At 320 "−20.00 USDC" broke onto two lines while "−10.00 USDC" in the next row did not (@AncungAulia's review). An amount now carries its unit apart: under 360, where the longest amount no longer fits, every row puts USDC under the figure; from 360 it sits beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AncungAulia's answer on #71: the roles win, and drawn in-between sizes take the nearest role. Card, panel, dialog and empty-state titles take Card title (20, 22, 24); sentences and rows take Body (16); labels, statuses, dates, chips, notes and links take Small (13, 13, 14). A new Figure role (20, 28, 32) sets the History tiles, the breakdown's Your advance and the repay amount input. A unit beside a figure keeps its own weight and drops to Small next to a Figure. No pixel font size is left in the app. The checking skeleton follows the new body height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and press Since disabled buttons stopped turning pointer events off (so the not-allowed cursor shows), their plain hover: and active: colours applied to them too: a disabled Repay tile or 25% chip turned grey under the pointer. Hover and pressed colours now apply only while the control can be used (not-disabled:, which links drawn as buttons match too). The e2e hovers and presses each disabled control on a fully repaid advance and checks a link tile still answers a hover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5ca40cd to
deb0ee9
Compare
|
Rebased onto Why it needed it: #56, #57 and #58 all landed on Not merging this one. It is 54 files of layout against @AncungAulia's section 08 rules, and he is the only person who can say whether it matches them — approving it myself would be a rubber stamp on the one thing I cannot check. @AncungAulia, it is clean and green and waiting on you. Separately, and it is a comment rather than code:
Also, as of #79 the template is now eight parts and seven values ( Nice work on reading |
|
@Lexirieru, thanks for the rebase. My local branch now matches That comment is already fixed on this branch, in 01a4f79 ("say where 2a's revenue window really comes from").
That matches what you describe. Before the advance, the window is our own request, carried through the relay into Noted on #79 (eight parts, seven values, unpadded dates). The front end never builds the template, so nothing here changes; it matters for the #17 relay. 🤖 Generated with Claude Code |
|
@Nabil-Aufa, good catch. Neither fits, so the scale gets a role for it: Input amount, 32 / 36 / 36 (phone / tablet / desktop), "The amount typed in a field". It sits between Amount and Page title in the section 08 table.
Use it for the 3a repay input (the |
Section 08's type scale gets an Input amount role, 32 / 36 / 36 (phone / tablet / desktop), for the amount typed in a field such as the 3a repay input. Figure read too small on a phone and Amount was too large for the 320 side column. Answers the question on #71. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@AncungAulia's answer on #71, with the role added to section 08 in #84: the amount typed in a field. On a phone it reads larger than the balance's unit, and from a tablet it is the 36 the frames draw, which still fits the 320 side column beside the USDC and Max chips. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wrap instead
With the Input amount role, "100.00" was cut to an ellipsis at 320 and in the 320 side column
from 1024 to 1199. The amount field is now as wide as what was typed, and when it and the USDC
and Max chips no longer share the row, the chips move under it. The full-width repay action wraps
a long label ("Repay 60.00 USDC instead") rather than run into its padding at 320.
So that an uncut amount can never outgrow its field, the field takes no zero before another digit
and a whole part of at most 99, or what is left to repay when that is more (60 left: up to 99, so
typing past it still shows "Only ... left"; 100 left: up to 100, never 101 or a wide 800), and with three digits six decimals at most. The
limit is on the value because digits differ in width ("1" narrowest, "0" widest in Geist). The
widest amounts it allows, "80.0000000" and "100.000000", fit the field at 320 and in the side
column. The e2e types them key by key and measures them against the field's border.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A dev server pointed at another build folder (NEXT_DIST_DIR) left one behind and failed lint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@AncungAulia, the Input amount role from your answer above is in (6eae97c): One thing to know for the board. At 36, the field cannot hold every typed amount on one row next to the USDC and Max chips:
So, following section 08's wrap rules (fb91a0a):
If the contract's cap per advance is ever raised above 100 USDC, these widths need measuring again; the code comment says so. The board might want the chips-under-the-amount state drawn for 320 and for the 1024 side column. 🤖 Generated with Claude Code |
AncungAulia
left a comment
There was a problem hiding this comment.
Re-checked at 83a490e: layout.spec.ts and repayment.spec.ts pass here (49/49). Everything clickable on 3a shows the pointer, and the disabled repay button shows not-allowed. The repay input is 32 on a phone and 36 from a tablet up, and "59.99" sits beside the USDC and Max chips at 320. The type utilities match the section 08 table, Figure and Input amount included, and no one-off pixel sizes are left. Approving from the design side; merge stays with @Lexirieru.
Closes #70. Stacked on #58 (#21), which is stacked on #57 and #56: review and merge those first; this PR's base then moves to
main.The responsive follow-up @AncungAulia asked for in the approving reviews of #56, #57 and #58, built from section 08 "Layout and responsive" and the tablet frames in
docs/design/forepay.pen(#69).What
Breakpoints (section 08)
Tablet frames at 834: built for 1b, 2a, 2b, 3a and 3b. Onboarding, 2c and 2d also take their desktop form from 768. From a tablet up, the wallet picker and the repayment approval are centred dialogs.
Overflows found in review, now gone:
notFoundat 320.The six wrapping rules, as built:
Repayment and History before the first advance, as drawn in "3a No advance yet" and "3b History, no advance yet" (desktop and mobile).
Type roles:
text-hero56/72/88,text-amount48/56/64,text-page-title28/36/44,text-card-title20/22/24,text-figure20/28/32,text-body16 andtext-small13/13/14, in rem intokens.css. They replace the unused single-size scale, andcn()treats them as font sizes. Every touched screen uses them (see below).Small items from the same reviews
ProveRevenuecomment: the window is our flow's input (what the Proof relay: carry the proof and bind it to a Stellar address #17 relay asks AdSense for), not the claim template.failedrow: worded as Backend API the front end needs #16 (PR #16 /advances and /transactions, from Horizon and the contract's own record #66) defines it. It reads "Failed, no USDC moved" ("Failed" on a phone) and has a Receipt link, because it is on the ledger./advance: it is remembered with the pending advance, and the screen shows "The transaction did not go through" at once, instead of after two minutes. This holds whether the refusal arrives while the creator is away or after they come back.forepay.mock.ledger: a switch for the fixtures whileNEXT_PUBLIC_API_URLis empty:none,active(default),repaid,error. It is documented infe/README.md.Decisions worth a look
sizing()loads, the rule card shows bars over invisible words with no figure, "A part of the revenue you have proven, up to a cap". They render as wide as the usual sentence, so the card keeps its height at every width.Since @AncungAulia's comments on this PR
fe/src.text-figure) sets the History tiles and the breakdown's "Your advance".globals.css.not-disabled:), so a disabled button, quick action or chip keeps its look.New wording for the board (@AncungAulia)
sizing()loadsHow it was checked
pnpm lint,typecheck,test(175 infe) andbuildpass. Every one of the 21 commits typechecks and lints on its own.fe/tests/e2e/layout.spec.tschecks every app screen at 320, 375, 768, 1024, 1280 and 1440:🤖 Generated with Claude Code