Skip to content

feature: tier themed buttons#7351

Merged
maxbbb merged 1 commit intodevelopfrom
04-14-feature_tier_themed_buttons
Apr 21, 2026
Merged

feature: tier themed buttons#7351
maxbbb merged 1 commit intodevelopfrom
04-14-feature_tier_themed_buttons

Conversation

@maxbbb
Copy link
Copy Markdown
Contributor

@maxbbb maxbbb commented Apr 14, 2026

Fixes APP-3580

What changed

The staking card's action buttons are now themed to match the user's current tier. Getting there cleanly required rewriting the tier visual tokens and reshaping a few adjacent pieces so tier buttons could share primitives with RnbwButton.

Main changes

  • MembershipTierButton/: new MembershipTierButtonSurface, MembershipTierButtonText, MembershipTierButton. Mirrors the surface/text/button split used by RnbwButton. Consumed by RnbwStakingCard.
  • tierVisuals.ts: replaces the old TIER_VISUALS record in constants.ts. Each tier now exposes typed badge, primaryButton, secondaryButton, progress, labelGradient, and background themes, with accessors (getTierBadgeTheme, getTierPrimaryButtonTheme, etc.). A tier's primary/secondary button themes are derived from its badge tokens.

Other changes (refactors that aren't strictly required for tier buttons)

  • RnbwButton/: moves RnbwButtonSurface, RnbwButton (previously RnbwThemedButton), and RnbwHoldToActivateButton into a folder and splits RnbwButtonSurface into a surface + text pair so MembershipTierButton can mirror the same shape.
  • rnbwButtonTheme.ts: extracts the gold rnbw button palette out of RnbwButtonSurface so tierVisuals.ts can reuse it.
  • ShadowLayers: new component that renders a stack shadows to accommodate tier themed designs for TierBadge and MembershipTierButtonSurface.
  • membershipCardTheme.ts + MembershipCard + NotchedMembershipCard: pre-computes the card background as a solid color via getSolidColorEquivalent so shadow views behind tier buttons blend against the real card surface instead of a translucent fill.
  • TierProgressBar, TierThemedLabel: updated to the new getTierProgressBarTheme / getTierLabelTheme accessors.

Notes

  • The "Other changes" section above isn't strictly needed to ship tier themed buttons, but these changes emerged as I attempted to implement the tier themed buttons, and it would have been particularly messy to try and separate them.
  • The black tier's design is still not the real design. It will require an escape hatch out of this theme system with custom components and will be addressed in a followup PR.

Screen recordings / screenshots

Simulator Screenshot - iPhone 16e - 2026-04-15 at 13 29 54 Simulator Screenshot - iPhone 16e - 2026-04-15 at 13 29 44 Simulator Screenshot - iPhone 16e - 2026-04-15 at 13 29 22 Simulator Screenshot - iPhone 16e - 2026-04-15 at 13 29 17 Simulator Screenshot - iPhone 16e - 2026-04-15 at 13 29 10 Simulator Screenshot - iPhone 16e - 2026-04-15 at 13 29 04

What to test

  • Staking card renders correctly for all tiers in both light and dark mode.

Copy link
Copy Markdown
Contributor Author

maxbbb commented Apr 14, 2026

@linear
Copy link
Copy Markdown

linear Bot commented Apr 15, 2026

@maxbbb maxbbb force-pushed the 04-14-feature_tier_themed_buttons branch from 5addc61 to d45f9de Compare April 15, 2026 17:00
@maxbbb maxbbb marked this pull request as ready for review April 15, 2026 17:32
@github-actions
Copy link
Copy Markdown

Launch in simulator or device for f5fbfb5

@maxbbb maxbbb force-pushed the 04-13-feature_stake_card_top_cutout_tier_badge_design branch from ae50d5c to a31a142 Compare April 15, 2026 18:49
@maxbbb maxbbb force-pushed the 04-14-feature_tier_themed_buttons branch from d45f9de to 290544f Compare April 15, 2026 18:49
@github-actions
Copy link
Copy Markdown

Launch in simulator or device for 476df6f

Copy link
Copy Markdown
Contributor

i1skn commented Apr 17, 2026

Overall this looks good, but I think right now we effectively have two parallel button stacks:

  • MembershipTierButton / MembershipTierButtonSurface / MembershipTierButtonText
  • RnbwButton / RnbwButtonSurface / RnbwButtonText

They look mechanically very similar, and the main difference seems to be where the surface/text theme comes from. I think this could probably collapse into a single reusable ThemedButton primitive that takes a surface theme plus a text theme, with MembershipTierButton and RnbwButton becoming thin wrappers around it. That would reduce duplication and make future themed buttons cheaper to add.

@maxbbb maxbbb force-pushed the 04-14-feature_tier_themed_buttons branch from 290544f to 0f202d0 Compare April 20, 2026 14:24
@maxbbb maxbbb force-pushed the 04-13-feature_stake_card_top_cutout_tier_badge_design branch from a31a142 to 1089a49 Compare April 20, 2026 14:24
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

🧪 Flashlight Performance Report (AWS Device Farm)

🔀 Commit: 1ccad0c

📎 View Artifacts

Metric Current Δ vs Baseline
Time to Interactive (TTI) 5593 ms 🔴 +103.4 ms (+1.9%)
Average FPS 56.67 ⚪ +0.4 (+0.7%)
Average RAM 394.3 MB ⚪ -0.4 MB (-0.1%)

@maxbbb maxbbb force-pushed the 04-13-feature_stake_card_top_cutout_tier_badge_design branch from 1089a49 to bdd32b1 Compare April 20, 2026 15:14
@maxbbb maxbbb force-pushed the 04-14-feature_tier_themed_buttons branch from 0f202d0 to 16f24c2 Compare April 20, 2026 15:14
@github-actions
Copy link
Copy Markdown

Launch in simulator or device for 4c8d120

@maxbbb maxbbb changed the base branch from 04-13-feature_stake_card_top_cutout_tier_badge_design to graphite-base/7351 April 20, 2026 16:06
@maxbbb maxbbb force-pushed the graphite-base/7351 branch from bdd32b1 to 4785405 Compare April 20, 2026 16:07
@maxbbb maxbbb force-pushed the 04-14-feature_tier_themed_buttons branch from 16f24c2 to d2fb86d Compare April 20, 2026 16:07
@graphite-app graphite-app Bot changed the base branch from graphite-base/7351 to develop April 20, 2026 16:07
@maxbbb maxbbb force-pushed the 04-14-feature_tier_themed_buttons branch from d2fb86d to 6aef615 Compare April 20, 2026 16:07
@github-actions
Copy link
Copy Markdown

Launch in simulator or device for 1ccad0c

@maxbbb
Copy link
Copy Markdown
Contributor Author

maxbbb commented Apr 20, 2026

Overall this looks good, but I think right now we effectively have two parallel button stacks:

  • MembershipTierButton / MembershipTierButtonSurface / MembershipTierButtonText
  • RnbwButton / RnbwButtonSurface / RnbwButtonText

They look mechanically very similar, and the main difference seems to be where the surface/text theme comes from. I think this could probably collapse into a single reusable ThemedButton primitive that takes a surface theme plus a text theme, with MembershipTierButton and RnbwButton becoming thin wrappers around it. That would reduce duplication and make future themed buttons cheaper to add.

I agree, and I did create them in such a way that a proper abstraction should be easy enough. I think if we're going to have a single API for generally themed buttons, some more thought should be put into and it would be better as a separate PR. For example, the later PR for supporting the black tier had to escape hatch out of some of the elements of the membership button.

A generic properly thought out themed button component / component API is a good idea though and I've made a ticket for creating this here: https://linear.app/rainbow/issue/APP-3668/single-themed-button-component-api

Copy link
Copy Markdown
Contributor Author

maxbbb commented Apr 21, 2026

Merge activity

  • Apr 21, 4:28 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 21, 4:29 PM UTC: @maxbbb merged this pull request with Graphite.

@maxbbb maxbbb merged commit 927775e into develop Apr 21, 2026
21 checks passed
@maxbbb maxbbb deleted the 04-14-feature_tier_themed_buttons branch April 21, 2026 16:29
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.

2 participants