Skip to content

feat(add-funds): refresh the add funds screen - #2932

Merged
CassioMG merged 16 commits into
masterfrom
feature/home-refresh-add-funds
Aug 11, 2026
Merged

feat(add-funds): refresh the add funds screen#2932
CassioMG merged 16 commits into
masterfrom
feature/home-refresh-add-funds

Conversation

@CassioMG

@CassioMG CassioMG commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Part of the Home refresh project.

What changed

The Add funds screen, per Figma frame 9593-26775:

  • Each option card puts its icon on its own line above the title, instead of beside the text block.
  • Header: X close icon, and the "Choose your method" subtitle is removed.
  • Coinbase card copy shortens to "Transfer from Coinbase & other options".
  • The * payment methods may vary based on your location footnote is removed — and so is the * in the Coinbase description that referenced it. Leaving an orphaned asterisk with no footnote would have been worse than either state.
  • Transfer card: purple QR icon, description "Receive funds from another wallet".

Both ?isAddXlm=true and default modes keep their distinct copy.

Screenshot 2026-08-04 at 13 42 58

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR Preview build is ready: https://github.com/stellar/freighter/releases/tag/untagged-37efa77c26d84ac79af2 (SDF collaborators only — install instructions in the release description)

@CassioMG
CassioMG marked this pull request as ready for review August 4, 2026 16:43
Copilot AI balanced review requested due to automatic review settings August 4, 2026 16:43
Align the Add funds option cards with the refreshed design:

- Drop the View content top padding so the first card sits 40px below
  the screen title instead of 64px.
- Space the card icon 12px from the title. The previous margin-top was
  dead code: SDS ships `div.Text{margin:0}`, whose element+class
  specificity outranks a lone class selector, so use flex `gap` on the
  card and a wrapper for the title/subtitle pair instead.
- Set the title to Medium (was semi-bold) and the subtitle to xs (12px,
  was 14px).
- Shrink the QR glyph to 16px and center it in a 24px lilac circle with
  a lilac border.

Regenerate the buyWithOnramp e2e snapshots for the new layout.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refreshes the Add Funds screen as part of the broader Home redesign.

Changes:

  • Restyles funding option cards and header.
  • Updates Coinbase and transfer copy while preserving XLM-specific text.
  • Adds locale keys and regenerates visual snapshots.

Reviewed changes

Copilot reviewed 4 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
AddFunds/index.tsx Updates layout, header icon, and copy.
AddFunds/styles.scss Applies refreshed card styling.
locales/en/translation.json Adds English copy keys.
locales/pt/translation.json Adds Portuguese locale entries.
add-xlm-page-darwin.png Updates XLM visual baseline.
add-xlm-page-chromium-darwin.png Updates Chromium XLM baseline.
buy-with-coinbase-darwin.png Updates Add Funds visual baseline.
buy-with-coinbase-chromium-darwin.png Updates Chromium Add Funds baseline.
Suppressed comments (1)

extension/src/popup/locales/pt/translation.json:726

  • This Portuguese-locale entry is still English, so the refreshed Coinbase card remains partially untranslated for pt users. Add the Portuguese value required for every new user-facing string.
  "Transfer from Coinbase & other options": "Transfer from Coinbase & other options",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread extension/src/popup/locales/pt/translation.json Outdated
CassioMG and others added 2 commits August 4, 2026 13:51
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The card subtitle was added as an English placeholder and was rendering
untranslated in pt.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@CassioMG CassioMG self-assigned this Aug 4, 2026
@CassioMG

CassioMG commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

CassioMG and others added 2 commits August 4, 2026 14:01
The restructured option cards no longer render the header subtitle, the
footnote, or the old "send funds" copy, so these keys are unreferenced:

- "* payment methods may vary based on your location"
- "Choose your method"
- "Send funds to this account address"
- "Transfer from Coinbase, buy with debit and credit cards or bank transfer *"

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@piyalbasu piyalbasu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved! Claude found 1 small CSS bug worth fixing

@piyalbasu

Copy link
Copy Markdown
Contributor

.AddFunds__error uses a font-weight variable that nothing defines

Nit — not a merge blocker. Cosmetic, confined to the on-ramp error message.

TL;DR: The new error text is meant to render at medium weight, but the variable it asks for doesn't exist anywhere in the project or in the design system, so the browser throws the declaration away and the text renders at normal weight instead. It's a one-token fix. Worth catching here because a repo-wide cleanup of exactly this mistake is already in flight, and this PR adds a new instance that the cleanup won't cover.

Steps to reproduce:

  1. Open Add Funds and trigger the on-ramp error state (the error message under the buttons).
  2. Inspect the error text — computed font-weight is 400, not the intended 500.

Detailed explanation (for agents)

Root cause: --font-weight-medium is not defined anywhere — not in extension/src, and not in @stellar/design-system@3.2.8, which exposes the weight scale as --sds-fw-* (--sds-fw-medium: 500). Because font-weight is an inherited property, a var() reference to an undefined custom property is invalid at computed-value time and resolves to unset, falling back to the parent's weight (400 here). The declaration is silently dropped.

&__error {
color: var(--sds-clr-red-09);
font-size: pxToRem(12px);
font-weight: var(--font-weight-medium);
line-height: pxToRem(18px);
margin-top: pxToRem(8px);
}

This is the same defect documented in the merged #2937 (d1f328d), whose commit message states it directly: the row weights "referenced var(--font-weight-medium) / var(--font-weight-regular), which nothing defines … the weights never applied." That PR migrated its own files to --sds-fw-medium.

Merge-order hazard: the systematic sweep of this mistake — 61a7ea38, "fix(styles): replace undefined --font-weight-* vars with SDS tokens", which converts 44 medium-weight sites — is not on master yet; it's unmerged on origin/fix/undefined-font-weight-vars. master currently has 44 var(--font-weight-medium) against 28 var(--sds-fw-medium). If this PR lands after that sweep, it reintroduces a 45th broken site that the sweep has already passed over, and the cleanup will read as complete when it isn't.

Note also that the restyle removed the old &__button rule carrying font-weight: var(--sds-fw-semi-bold), so AddFunds/styles.scss now has exactly one font-weight declaration and it's the non-functional one.

Suggested fix:

   &__error {
     color: var(--sds-clr-red-09);
     font-size: pxToRem(12px);
-    font-weight: var(--font-weight-medium);
+    font-weight: var(--sds-fw-medium);
     line-height: pxToRem(18px);
     margin-top: pxToRem(8px);
   }

`--font-weight-medium` is not defined in extension/src or in
@stellar/design-system, so the declaration was invalid at computed-value
time and the error text rendered at weight 400 instead of 500. The
design system exposes the scale as `--sds-fw-*`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@CassioMG
CassioMG merged commit 97c6dd6 into master Aug 11, 2026
11 checks passed
@CassioMG
CassioMG deleted the feature/home-refresh-add-funds branch August 11, 2026 03:38
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.

3 participants