feat(navbar): new account widget — balance chip, deposit slot, avatar#8
feat(navbar): new account widget — balance chip, deposit slot, avatar#8diterra-code wants to merge 5 commits into
Conversation
✅ Deploy Preview for breadcoopstorybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@diterra-code Update Storybook for the updated nav. |
|
Added mobile navbar work (design: Bread DS V1.1, node Mobile account widget — Collapsible Solidarity apps — new Files: Verification: |
|
Added Storybook stories for the mobile navbar work in
Privy is stubbed for Storybook via a Vite alias ( Verified: |
Updates the shared nav account widget so every Bread app gets the new design once approved: - AccountMenu trigger is now the three-part chip: balance chip (useBreadBalance) · injected deposit action · divider · blo avatar · address · app-themed caret. - Adds a `depositSlot` prop threaded Navbar -> AccountSection -> AccountMenu so each app wires its own deposit/fund flow (extensible for future features). - New exported `NavDepositButton`: app-themed (fund/stacks/net) lift/press button apps drop into the slot. - Adds `blo` for deterministic avatars. ESM/CJS build verified. (DTS generation OOMs on the repo's existing heavy type graph — pre-existing, unrelated to this change.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mobile menu improvements (design: Bread DS V1.1, node 727-3604): - Account widget is now responsive: desktop keeps the compact balance chip + dropdown; the mobile menu renders the full account card (address, balance, action/widget slots, sign out) inline. - "Solidarity apps" in the mobile menu is now a collapsible dropdown, collapsed by default and expanding vertically on tap (new `collapsible` prop on NavSolidarityApps; desktop dropdown content unchanged). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…opdown Add Storybook stories for the mobile navbar work: - MobileAccountCard: the full account card rendered inline in the mobile menu (address, balance, Claim widget + Deposit/Withdraw actions, sign out), behind a mocked wagmi/react-query/kit provider stack with a forced CONNECTED user. - SolidarityAppsMobile: the collapsible "Solidarity apps" dropdown (collapsed by default, expands on tap), no wallet context needed. Privy is stubbed for Storybook via a Vite alias so the navbar renders without a real PrivyProvider/app id. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7da122e to
35345ee
Compare
New AccountCardMobile component matching the open-menu design: address
row (avatar, address, copy, explorer), large balance, Deposit / Withdraw
outline buttons, and a claim row (orange logo, claimable amount, Claim).
The app passes only handlers (onDeposit/onWithdraw) and the claimable
{amount, onClaim}; the kit owns the layout/styling. Sign out is not in
the card (it belongs at the bottom of the menu).
Adds a Storybook story (MobileAccountCardExact) rendering it via the
mocked connected-user providers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Restructure the mobile menu to match Bread DS V1.1 (727-3622): header -> account card (top) -> links -> collapsible Solidarity apps -> Sign out (bottom). - Navbar gains optional onDeposit/onWithdraw/claimable props; the kit renders AccountCardMobile at the top of the mobile menu (md:hidden) and a Sign out button at the bottom. - Extract shared address resolution into useConnectedAccount; both the desktop chip (AccountSection) and the new mobile card use it. - AccountMenu is now desktop-only (compact chip + dropdown); the old md:hidden NavAccountDetails card is replaced by AccountCardMobile. - Desktop layout is unchanged: every new mobile piece is md:hidden. Also removes a stale @next/next eslint-disable in account-menu (rule not configured in this non-Next repo; was failing the lint gate). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Wired the exact account card into the mobile menu and reordered it to match Mobile menu order now: header → account card (top) → links → collapsible Solidarity apps → Sign out (bottom) — previously the account block was at the bottom and Sign out was inside the card.
Gates: Note / follow-up: the mobile menu opens via an imperative hamburger toggle, so |
Summary
Updates the shared nav account widget in the UI kit to the new account-widget design, so every Bread app (Solidarity Fund, Stacks, Safety Net) picks it up once this is approved and released. Also lays the extensibility groundwork for future features.
What changed
AccountMenutrigger is now the three-part chip from the new design:balance chip (
useBreadBalance) · injected deposit action · divider ·bloavatar · address · app-themed caret. (Was justaddress + caret.)depositSlotprop threadedNavbar → AccountSection → AccountMenu, so each app wires its own deposit/fund flow without the UI kit knowing app specifics. This is the hook for future features.NavDepositButton— app-themed (orange/blue/jade perfund/stacks/net) lift/press button apps drop intodepositSlot.blofor deterministic avatars.Usage (per app)
Build / verification
tsup);NavDepositButtonexported.tscerrors) — pre-existing and unrelated to this change. Happy to add aNODE_OPTIONS=--max-old-space-sizebump to the build script in a follow-up if CI needs it.Theming
Uses theme tokens (
paper-main,surface-ink,surface-grey) +appsConfig[app]accent, so it themes correctly across all three apps.🤖 Generated with Claude Code