Vault dashboard redesign: sidebar + galaxy/donut/heatmap/stack + ⌘K + token-direct nav#181
Open
sktbrd wants to merge 10 commits into
Open
Vault dashboard redesign: sidebar + galaxy/donut/heatmap/stack + ⌘K + token-direct nav#181sktbrd wants to merge 10 commits into
sktbrd wants to merge 10 commits into
Conversation
- Sidebar chain list replaces the cards grid; main area centers a flex-1 hero region with stable sun/donut y-position. - Chain-detail orbital (chain icon as the sun, clean tokens orbiting) with per-token glow extracted from each icon's dominant color. - Always-on Receive/Send/Swap action row in drilled mode; Swap opens the SwapDialog directly via a lazy import (no AssetPage detour). - DonutChart enlarged and restyled to match the rest of the app; legend pill uses ink palette + bigger USD amount. - View toggle (orbital/donut) moved to the TopNav, shared with Dashboard through a tiny context. - Mono is the app-wide default font; serif aliases collapse to mono and decorative italic headers are dropped. - Full-screen ambient radial glow, removed per-card chrome around the orbital so the glow reads as the page background. - Refresh + Reports moved to top-right of the main canvas. - Icon preloader keeps chain/token logos warm so they don't re-fetch when switching chains in the sidebar. - Dogecoin easter egg: bottom-right Shiba that slides in, bobs, barks (synthesized), spouts random doge speak, and auto-dismisses after 8s (timer resets on click).
Pull in develop's portfolio reliability + cache fixes (failedPubkeySet, no-walk-backwards cache, api-blue selector, forceRefresh changes, 1.3.6 prep) so the design branch stays current and minimizes future conflicts. # Conflicts: # projects/keepkey-vault/src/mainview/components/Dashboard.tsx
- ⌘K / Ctrl+K command palette (CommandPalette.tsx) for fuzzy-jumping to any chain or token. Substring matching across name/symbol/CAIP with priority (exact symbol > startsWith > contains). Arrow-key navigation, Enter to select, Esc/backdrop to close. - Tiny commandBus.ts pub/sub bridges the palette (lives at the App level) to Dashboard's drilldown state and serves Dashboard's balances Map for token search without lifting state. - AssetPage accepts an `initialToken` prop. Clicking a token in the orbital (satellite or token list row) now lands directly on the token detail view — no more select-again after entering the chain. - Token hover card in the chain-detail orbital uses the icon's extracted dominant color: tinted inset/outer shadow, colored symbol text. Falls back to white when extraction returned the fallback color. - Doge easter egg picks a random phrase on initial appearance so every remount feels fresh instead of always saying "wow such doge".
- Add a third "heatmap" portfolio view next to orbital/donut in the TopNav pill. Renders a squarified treemap (Bruls et al, 2000) where each chain (or each token in chain-detail mode) is a tile with area proportional to its USD value, tile color from chain.color (or a rotating token palette). Click a tile to drill in / open the token. - DashboardView type extended to 'orbital' | 'donut' | 'heatmap', persistence respects the new value. - Tighten CommandPalette styles: kill the browser default focus ring on the search input, restyle the esc badge as a small ink-3 pill, smaller magnifying-glass icon in muted text-3 for a calmer look.
- Replace the three-button orbital/donut/heatmap pill in the TopNav with a single eye-icon button that drops a 260px menu (ViewPickerMenu.tsx). Each menu row carries a small SVG "thumbnail" of the view so the selection is visually recognizable, plus a one-line description and a gold check on the currently active view. - Add a fourth view "stack": a horizontal stacked bar (StackedBarView.tsx) where each chain (or each token, when drilled) is a colored segment proportional to its USD share. Segments above 5% get inline labels (name + percentage + value); smaller items collapse into a chip legend below the bar. Optional 24h delta slot is wired but not fed data yet — pass `deltaUsd`/`deltaPct` once the engine surfaces it. - DashboardView type extended to 'orbital' | 'donut' | 'heatmap' | 'stack'.
- HeatmapView measures its parent via ResizeObserver and lays out squarified tiles to the actual rendered dimensions, instead of the prior hardcoded 520×420. Explicit width/height props still supported for embedded usages. - Dashboard wraps the heatmap in a flex-stretch container when the user is on the heatmap view, and collapses the bottom slot's reserved height when no per-chain content needs to render — gives the heatmap the entire area to the right of the sidebar.
…bar scrollbar - Heatmap squarified layout now applies a value^0.65 compression curve so tiny-balance chains still get a usable tile next to five-figure positions. Pure proportional sizing made $5 chains effectively invisible against $5k chains; this trades exact area accuracy for glanceability. - Heatmap container clamps to `calc(100vh - 90px)` (h + maxH) so the layout area equals the visible canvas — small chains no longer fall below the viewport fold. - Outer hero region drops its 60–70vh minH when on the heatmap view so the column doesn't push beyond the viewport. - Sidebar scrollbar is hidden by default and only fades in on hover (kk-sidebar-scroll class + scrollbar-width + webkit-scrollbar CSS).
The previous calc(100vh - 90px) guess was wrong because the actual available height varies with the Dashboard's top-right utility row, banners, and the App's nav padding. Introduce HeatmapHost which: - on mount + window resize, reads the container's top via getBoundingClientRect and subtracts from window.innerHeight with a 12 px breathing margin, then sets that as the explicit px height - re-measures one frame later so it picks up flex-layout-settled rects Net result: smaller tiles no longer fall below the fold; the heatmap fills exactly the area between its top edge and the window bottom.
Previously the scrollbar width toggled 0 → 6px on hover, which re-flowed the chain rows. Now the 6px gutter is reserved at all times and only the thumb opacity changes: - resting: gutter present, thumb transparent (invisible) - hover: thumb at rgba(255,255,255,0.06) - thumb-hover: rgba(255,255,255,0.14) Firefox `scrollbar-color` mirrors the webkit treatment.
Token page (AssetPage): - When `initialToken` is set, the header now actually renders the token as the primary identity — icon, name, symbol, balance, and USD value all switch to the token. The chain shows up as a small "on Ethereum" subtitle with a "← chain" pill to drop the token context and view the chain. - Mobile balance row and right-side balance both follow the same rule. Send/receive flows already consumed selectedToken, so they continue to work; this just makes the page visually feel like a token page instead of "chain page with a token internally tracked". Sidebar scrollbar: - Dropped `scrollbar-width: thin` — on WebKit it overrode the ::-webkit-scrollbar pseudo-elements and let the system thin scrollbar paint bright/white over the gutter. Now we only declare ::-webkit-scrollbar (6px reserved gutter, transparent track and thumb until hover) and gate the Firefox treatment behind a `@supports (-moz-appearance: none)` block. `colorScheme: dark` on the box for good measure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR brings a substantial UX refresh to the vault dashboard. Everything is gated behind the existing dashboard view-mode preference (persisted to localStorage), so on first load returning users see the new orbital layout but can switch back to a familiar donut at any time.
Highlights
Notes for review
Test plan
🤖 Generated with Claude Code