Skip to content

UI foundation: design kit, header/footer, home and campaign page (give + back) - #97

Merged
JOY (JOY) merged 5 commits into
devfrom
claude/95-ui-foundation
Nov 3, 2026
Merged

JOY (JOY) merged 5 commits into
devfrom
claude/95-ui-foundation

Conversation

@JOY

@JOY JOY (JOY) commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Refs #95

What

The first design pass: tokens and a small component kit in apps/web, the header (search-centric, account menu, phone menu), the sitemap footer, the home page, and the campaign page for give and back, following docs/Design-Principles.md. Discovery and the statement page share the campaign page's tabs and filters. /me, admin, and the donate, pledge and payment flows are #96.

  • Tokens (globals.css): green primary, light orange accent, neutral ink/body/muted, 4px radius for buttons, badges and images, 6px for cards and inputs. No pills. 44px touch targets. Body text 16px; 14px only for badges and captions under figures.
  • Kit (components/ui): Button/ButtonLink/buttonClass, Badge, Money/MoneyRow (receipt rows with dotted leaders), ProgressBar, TabNav/FilterNav (link tabs with aria-current), EmptyState, Field, Card, SectionHeader, CoverPlaceholder, inline icons. The existing btn-*, field and card utilities are re-tokened, so pages not restyled yet already use the new colours.
  • Home: the hero shows the featured give campaign as a receipt of its public statement (gross in, refunded, spent, remaining) linking to its sao kê. Then "Sắp đạt mục tiêu" (closest to goal), "Chiến dịch mới", the two campaign types explained, "Give không giữ tiền của bạn", and an organizer band. The sections are split from the same live-campaign query (lib/home.ts, tested); the limit goes from 6 to 10.
  • Campaign page: cover, funding card (headline, progress, back figures pledged / paid / goal / refund owed as receipt rows, stats, the primary action, share, report), organizer and beneficiary with the verification badge, tabs (Câu chuyện / Sao kê / Người ủng hộ), story, milestones, updates, reward tier cards, transparency receipt. The DOM order is the phone order; from lg it is two columns.

Behaviour

No data call, server action, form field, route or data-figure/data-notice hook changed. Money formulas are unchanged. Small visible changes:

  • Home loads 10 campaigns instead of 6.
  • The category link on a campaign carries type=.
  • The type badge reads "Dự án sáng tạo".
  • Share uses the phone's share sheet or copies the link, with a Facebook share link built from NEXT_PUBLIC_SITE_URL when set.
  • "Báo cáo chứng từ có vấn đề" links to the statement's spending rows, where evidence reports already exist (PO, until a campaign report flow is filed).
  • text-brand-600 links elsewhere moved to brand-700 for contrast.

For the PO / owner

  • Font: proposes keeping Be Vietnam Pro (now self-hosted with next/font) instead of the doc's Roboto, for Vietnamese diacritics: side by side.
  • Primary green: buttons and text links use #047857 (green-700), not #059669. White on #059669 is 3.8:1, below WCAG AA's 4.5:1 for 16px text. #059669 stays for progress, focus rings and the logo.
  • Hero headline: "Gây quỹ minh bạch, từng đồng đều có sao kê" is kept as the brand line. The supporting copy says what the product does: statements are reconciled, and unexplained spending is flagged. Change the headline if the owner prefers something more literal.
  • "Người ủng hộ" tab: shows the statement's incoming rows. A real supporters list would be a separate issue.
  • Footer: lists only pages that exist. About, help and legal pages join it when they are written.

Screenshots (seeded local stack: DOS.Me dev migrations, 3 give + 3 back campaigns, flat placeholder covers)

Desktop 1440 Phone 375
Home full page full page
Give campaign full page full page
Back campaign full page full page
Discovery full page full page
Statement full page full page
Signed-in header account menu menu panel

Home, desktop Home, phone

Give campaign, desktop Give campaign, phone

Back campaign, desktop Back campaign, phone

(The images live on the assets/pr-97-screenshots branch, which holds no code.)

Checks

  • pnpm format:check, lint, typecheck: pass.
  • pnpm test: 918 passed, including the new lib/home.test.ts.
  • pnpm build: pass.
  • Lighthouse accessibility (dev server, mobile and desktop presets): 100 on home, the give campaign, the back campaign, discovery and the statement.
  • Independent review (design and accessibility, fresh-context subagent):

🤖 Generated with Claude Code

…it (#95)

Replaces the rose brand with the Design-Principles palette (green primary,
light orange accent, low radius, 44px targets), loads Be Vietnam Pro through
next/font, and adds the first kit pieces (Button, Badge, Money, ProgressBar,
EmptyState, SectionHeader, icons), the search-centric header with account
and mobile menus, the sitemap footer, and a home page whose hero shows the
featured campaign's public statement as a receipt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0f34f58a-fd26-4cc5-aeb8-48e86274d04d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

dos[bot]
dos Bot approved these changes Nov 3, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Code Review completed (20 eligible files · 68,238 chars · 3 model call(s) · 3 PR unit(s))

Whole diff with bounded context at base 899592f / head 7249006.

✅ CLEAN_PASS: Complete diff reviewed

Context investigation was bounded to the explicitly requested snapshot paths.

Campaign page for give and back: hero media, organizer and beneficiary
with the verification badge, a funding panel (headline, progress, pledge
figures as receipt rows, the primary action, share), page tabs (story,
statement, backers), reward tier cards and the transparency receipt.
Discovery and the statement page use the same tabs and filters. Primary
buttons and text links use the darker green so text meets 4.5:1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dos[bot]
dos Bot approved these changes Nov 3, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Code Review completed (52 eligible files · 148,503 chars · 1 model call(s) · 5 PR unit(s))

Whole diff with bounded context at base 899592f / head 5067cba.

✅ CLEAN_PASS: Complete diff reviewed

…older matches what search covers (#95)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dos[bot]
dos Bot approved these changes Nov 3, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Code Review completed (52 eligible files · 148,534 chars · 1 model call(s) · 5 PR unit(s))

Whole diff with bounded context at base 899592f / head 789a8ef.

✅ CLEAN_PASS: Complete diff reviewed

- Respect display_options on the home receipt and drop the people count
  from the page tabs, so a hidden backers count stays hidden.
- One colour class per money amount and card percentage (warning amber
  and the 100% green were overridden by Tailwind's class order).
- Phone order on the campaign page: media, funding card, story, then
  tiers and totals; two columns from lg.
- Menus close on a link, a search or focus leaving them; inset focus rings
  on tabs and the whole-card link; white focus ring on the dark band;
  stronger input focus ring.
- Trust and explainer copy says what the product does (statements are
  reconciled, unexplained spending is flagged); 'Sắp đạt mục tiêu'
  instead of 'Đang được quan tâm'; 'Dự án sáng tạo' on the type badge.
- Report link to the statement's evidence reports (PO, until a campaign
  report flow exists); Facebook share uses the site origin when known.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dos

dos Bot commented Nov 3, 2026

Copy link
Copy Markdown

⏸️ DOS Review: Automatic Review Limit Reached

DOS Code Review already reviewed 3 commits of this pull request automatically, the limit for one pull request, so this commit was not reviewed automatically and nothing was charged. Please step back before pushing another fix: a pull request that needs this many review rounds usually needs a rethink of its approach or a smaller scope, not one more patch. When you are ready, a maintainer can comment /review to review the current commit.

Cover, funding card, story, then tiers and totals in the DOM, placed in
two columns from lg with explicit grid rows, so keyboard and screen-reader
order follows what phones show. Money labels may wrap when wider than the
card; the home receipt drops its stats line when every stat is hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JOY

Copy link
Copy Markdown
Contributor Author

PO acceptance: merge at 4d42141. Lint + Build green; 918 tests and build locally; Lighthouse accessibility 100 on home, give, back, discovery, statement; design/a11y review 2 rounds; no data-flow change. Accepted: primary buttons #047857 for AA contrast; Be Vietnam Pro kept pending the owner's font call (a one-line token change if Roboto is chosen). DOS Code Review hit its auto-review cap after 3 CLEAN_PASS runs.

@JOY
JOY (JOY) merged commit 31f0313 into dev Nov 3, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant