Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
268521e to
5addc61
Compare
5addc61 to
d45f9de
Compare
ae50d5c to
a31a142
Compare
d45f9de to
290544f
Compare
|
Overall this looks good, but I think right now we effectively have two parallel button stacks:
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 |
290544f to
0f202d0
Compare
a31a142 to
1089a49
Compare
|
🧪 Flashlight Performance Report (AWS Device Farm) 🔀 Commit: 1ccad0c
|
1089a49 to
bdd32b1
Compare
0f202d0 to
16f24c2
Compare
bdd32b1 to
4785405
Compare
16f24c2 to
d2fb86d
Compare
d2fb86d to
6aef615
Compare
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 |

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/: newMembershipTierButtonSurface,MembershipTierButtonText,MembershipTierButton. Mirrors the surface/text/button split used byRnbwButton. Consumed byRnbwStakingCard.tierVisuals.ts: replaces the oldTIER_VISUALSrecord inconstants.ts. Each tier now exposes typedbadge,primaryButton,secondaryButton,progress,labelGradient, andbackgroundthemes, 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/: movesRnbwButtonSurface,RnbwButton(previouslyRnbwThemedButton), andRnbwHoldToActivateButtoninto a folder and splitsRnbwButtonSurfaceinto a surface + text pair soMembershipTierButtoncan mirror the same shape.rnbwButtonTheme.ts: extracts the gold rnbw button palette out ofRnbwButtonSurfacesotierVisuals.tscan reuse it.ShadowLayers: new component that renders a stack shadows to accommodate tier themed designs forTierBadgeandMembershipTierButtonSurface.membershipCardTheme.ts+MembershipCard+NotchedMembershipCard: pre-computes the card background as a solid color viagetSolidColorEquivalentso shadow views behind tier buttons blend against the real card surface instead of a translucent fill.TierProgressBar,TierThemedLabel: updated to the newgetTierProgressBarTheme/getTierLabelThemeaccessors.Notes
Screen recordings / screenshots
What to test