Repository navigation
UI pass part A: donate and pledge flows and payment pages on the design kit (#96) - #99
Merged
Merged
Conversation
… kit (#96 part A) Donation payment page, guest not-found page, donate form, pledge page and form, and the pledge payment page move onto the #95 kit. New kit pieces: Callout (toned message box) and PledgeStatusBadge; TransferDetails shares the VietQR block between the two payment pages. Copy buttons get 44px targets and names for screen readers. No data, action or field changes. Refs #96 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
…note size Refs #96 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #96
Part A of #96: the public money flows move onto the #95 design kit. Parts B (
/me) and C (admin) are separate PRs under the same issue.What changed
Fields, larger tabular amount input, 44 px checkbox row with its hint linked byaria-describedby,lgprimary button./donations/[code](signed-in and guest): page header with the amount and the donation code, a status bar (pulsing dot only undermotion-safe), the VietQR block, a success panel when received, and kit callouts for "QR expired" and "campaign closed"./donations/[code]: icon, larger copy, kit buttons./campaigns/[slug]/pledge: two columns on desktop (form left, "Đạt mục tiêu mới thanh toán" terms card right; on phones the card comes first), tier choice cards with a clear chosen state, sold-out as a danger badge, address fieldset and "Thông tin hiển thị" group; the open-pledge and earlier-pledge notes are callouts; "Hủy cam kết" usesbtn-danger(it had two text colours)./me/pledges/[code]: same header pattern with a status badge, the shared VietQR block, state notes as callouts, details as a labelled card.components/TransferDetails.tsx, new): one component for both payment pages. QR in a framed tile, a details list where the transfer content row is tinted and set in mono (a wrong one cannot be matched), the footnote at body size.New kit files only, no existing kit file changed:
components/ui/Callout.tsx: a toned message box with neutral, info, success, warning and danger tones, an optional title and an icon. Text is at least 9:1 on every tint.components/ui/PledgeStatusBadge.tsx: the pledge status as a kitBadge, replacing therounded-fullpill. Part B can reuse it.No behaviour change
Every data call, server action, redirect,
notFound, form field (name,required,maxLength,inputMode,autoComplete, defaults) and copy value is unchanged. Therole="status"regions are unchanged too. The only added attributes arearia-describedbyand a screen-reader name on the copy buttons.Some wording is new or reworded with the same meaning:
The 🎉 on the received panel is now a check icon.
No route
loading.tsx, on purpose. These routes callnotFound()andredirect()(sign-in, guest token). Aloading.tsxwould stream the page shell first, and the 404 or 307 would then go out as a 200. Loading states are therefore the submit buttons' pending label ("Đang xử lý…") and the live status bar. Error states are the action's inline alert, the global error page, the donation not-found page, and the per-state callouts.Evidence
tsc --noEmit,eslint,prettier: clean.vitest: 72 files, 918 tests pass.Screenshots
Taken on a seeded local stack: DOS.Me
devmigrations, the #95 seed (3 give and 3 back campaigns), plus a pending donation and an ended album campaign whose pledgesfinalize_ended_campaignsmoved topayment_due. The guest row is the real flow, end to end: the donate form is submitted without signing in and lands on the guest status page. For "received" and "QR expired", one donation each was set directly in the local DB.Follow-ups (not in this PR)
ActionForm(components/forms.tsx) shows under the submit button, far from the field it is about. That component is shared with/meand admin, so changing it belongs to the kit, not part A.components/ui/icons.tsxis an existing kit file. They can move there when the kit is next edited.🤖 Generated with Claude Code