feat: move balances into the global navbar - #223
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: Rocío <69587750+RocioCM@users.noreply.github.com>
Review: feat: move balances into the global navbarFiles: 9 changed (+52/−94) SummaryMoves the shop credits and Polygon MANA balance chips from the shop's custom sub-nav into the shared ui2 navbar via the new props from What looks good
One noteThe & nav button[aria-label$=' shop credits']
& nav button[aria-label*=' MANA on ']If ui2 ever changes the aria-label format on these chips, these selectors will silently stop matching and the color overrides will break on the violet navbar. This is the same coupling pattern already used for the hamburger button ( Pipeline failures
Both will resolve once No issues found. LGTM ✅ 🤖 Generated with Claude Code |
decentraland-bot
left a comment
There was a problem hiding this comment.
No p0/p1/p2 findings. Good cleanup — net deletion, balance logic is sound, e2e tests properly migrated. LGTM.
Moves the sub-nav balance chips into the shared ui2 navbar, for #206: the credits chip and the Polygon MANA chip now render as navbar balances (
shopCreditsBalance,manaBalances+showManaBalancesInNavbar), with the credits chip clicking through to /credits. The gradient "Get credits" CTA stays in the sub-nav.useBalance/useManaBalancehooks; the react-query invalidations after purchases and top-ups flow straight through props, so the chip updates without a reload.undefined(chip hidden) rather than a misleading 0; MANA stays hidden at zero, keeping the web2-first "no crypto by default" behavior.NavbarVioletgains color overrides for the chips — ui2 styles them near-white for its dark bar, and the MANA diamond hardcodes a near-white fill — targeted via the chips' aria-labels, same contract as the existing hamburger overrides.subnav-balance/subnav-mana-balancetestids are gone); removed the dead chip styled-components and the orphanednav.polygonMana/nav.yourBalancekeys.Draft until decentraland/ui2#461 is released — then bump
decentraland-ui2here to that version. Locally verified against a packed ui2: typecheck, unit suite, and the chip-related e2e specs pass (the pack-purchase e2e failures reproduce on a clean tree and are unrelated).