-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Design: Panel Width & Card Uniformity
Overview
Widen both side panels to reduce wasted space in the center and fix the jagged upgrade-card grid where cards in the same row have mismatched heights.
Layout
Current widths (global.css):
| Panel | Current | Target |
|---|---|---|
.sidebar-upgrades (left) |
320 px | 640 px (+100 %) |
.sidebar-bonuses (right) |
240 px | 360 px (+50 %) |
.game-layout min-width |
860 px | 1 300 px (640 + 360 + 300 center) |
Before:
┌──────320px──────┬───── flex ─────┬──240px──┐
│ UpgradesSidebar│ PetDisplay │ Bonuses │
└─────────────────┴────────────────┴─────────┘
After:
┌──────────640px──────────┬──── flex ────┬────360px────┐
│ UpgradesSidebar │ PetDisplay │ Bonuses │
└─────────────────────────┴──────────────┴─────────────┘
Components
global.css — three changes only
.sidebar-upgrades {
width: 640px; /* was 320px */
}
.sidebar-bonuses {
width: 360px; /* was 240px */
}
.game-layout {
min-width: 1300px; /* was 860px */
}UpgradeCard & ClickUpgradeCard — uniform card heights
Root cause: The .upgrades-grid already uses CSS Grid align-items: stretch (default), so grid cells are equal height per row. But the Mantine <Card> inside each cell has no height: 100%, so it shrinks to its content and the border box stops short, creating visual misalignment between the two columns.
Fix — apply to both UpgradeCard.tsx and ClickUpgradeCard.tsx:
- Add
style={{ height: '100%', display: 'flex', flexDirection: 'column' }}to the<Card>component. - Add
style={{ flex: 1 }}to the description<Text>(thec="dimmed"paragraph) so it absorbs surplus space and pushes the action row (button/price) to the card bottom consistently.
This ensures:
- Both columns in a row are always the same visual height.
- The buy button / price line always sits at the card bottom regardless of description length.
Interaction Patterns
No interaction changes. Existing hover, glow-pulse, and purchase-snap animations are unaffected.
Accessibility
No ARIA or keyboard changes needed. Panel width is a visual-only change.
Acceptance Criteria
-
.sidebar-upgradesrenders at 640 px -
.sidebar-bonusesrenders at 360 px -
.game-layoutmin-width updated to 1 300 px - In the
.upgrades-grid, cards in the same row are the same height - Buy button / price badge always flush with card bottom
- No regressions in existing tests (689 passing)
- Lint and build clean
Out of Scope
- Responsive / mobile breakpoints (game is desktop-only for now)
- Reflow of the two-column grid to three columns (separate discussion)
-- Dani (HiveLabs designer agent)