Skip to content

feat(wallets): refresh the rename wallet modal - #2931

Draft
CassioMG wants to merge 1 commit into
masterfrom
feature/home-refresh-rename-modal
Draft

feat(wallets): refresh the rename wallet modal#2931
CassioMG wants to merge 1 commit into
masterfrom
feature/home-refresh-rename-modal

Conversation

@CassioMG

@CassioMG CassioMG commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Part of the Home refresh project.

What changed

The rename-wallet modal, per Figma frame 9585-24423:

  • The card is now centred instead of pinned at top: 30%.
  • Circular X close button top-right inside the card.
  • Centred identicon above the input.
  • "Save" → "Set name", and Cancel / Set name sit side by side at equal width.
  • Removed: the "Rename Wallet" heading and the Address: G… line.

The form itself is untouched — same Formik setup, same 24-character Yup limit, same dispatch.

Two bugs found and fixed while implementing

  1. The modal was unclickable. Centring with transform: translateY(-50%) creates a new CSS stacking context, which let the sibling LoadingBackground backdrop sit above the card and swallow every click. Fixed by adding z-index: var(--z-index--banner) to the same wrapper block. Caught by actually clicking it in a browser, not by code review — worth knowing if you centre another overlay this way.
  2. variant="primary" was wrong for the "Set name" button. In SDS, primary is a purple fill; secondary is the near-white fill with black text that the frame shows (--sds-clr-gray-12 background, --sds-clr-base-00 text). Using secondary.

Scoped to avoid conflicts

views/Wallets/styles.scss is shared by three PRs in this batch. This PR changes only the .RenameWalletWrapper block — .AddWalletWrapper and everything else are untouched. The diff on that file is 5 lines.

Merge order

  • The wallets-list PR should merge before this one. Both touch views/Wallets/styles.scss, and it deletes the largest region of that file.
  • Heads-up: this PR also changes one line in extension/e2e-tests/loadAccount.test.ts ("Save""Set name", since that test asserts the button label). The wallets-list PR rewrites the rename navigation in that same test, so expect a small conflict there — take both changes: the new navigation and the new label.

Analytics

Unchanged. emitMetric(METRIC_NAMES.accountRenamed, { source: "wallets" }) is byte-identical, verified by grep.

One thing for the designer

The frame's backdrop is #000000e5 — black at ~90%. This PR reuses the existing LoadingBackground component at its --active opacity of 0.6, rather than hardcoding a new rgba or adding a one-off opacity variant for a single modal. If the darker scrim matters visually, that's a deliberate call to make rather than something I'd sneak in.

Verification

  • yarn test:ci — 196/202 suites, 1520/1571 tests, identical to baseline
  • yarn build:extension — clean
  • yarn test:e2e loadAccount.test.ts — 9 passed / 2 skipped, matching baseline
  • Clicked through the modal in a real browser build (that's how bug 1 surfaced)

Known repo issue

yarn build:extension:translations is broken on master (i18next-scanner-webpack needs .default, extension/webpack.extension.js:3), and the pre-commit hook hides the failure. The one new locale key here was added by hand to en and pt. Worth fixing separately.

🤖 Generated with Claude Code

Restyle the rename-wallet modal to match frame 9585-24423: a centered
card with a circular close button, a centered identicon, the name
input, and Cancel / Set name side by side. "Save" is renamed to "Set
name", and the "Rename Wallet" heading and Address line are removed.

Update the e2e test's button-text assertion to match the new label.
@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-8565efb64d42e48b710d (SDF collaborators only — install instructions in the release description)

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