Files
initiative/specs/034-topbar-redesign/data-model.md
Lukas 95cb2edc23 Redesign top bar with dedicated round badge and centered combatant name
Replace the combined "Round N — Name" string with a three-zone flex layout:
left (prev button + R{n} pill badge), center (prominent combatant name with
truncation), right (action buttons + next button). Adds 13 unit tests
covering all user stories including layout robustness and empty state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:39:57 +01:00

30 lines
1.1 KiB
Markdown

# Data Model: Redesign Top Bar with Dedicated Round and Turn Fields
**Feature**: 034-topbar-redesign | **Date**: 2026-03-11
## Summary
No data model changes required. This feature is a purely presentational refactor of the `TurnNavigation` component. All data needed for the new layout already exists in the `Encounter` type:
- `encounter.roundNumber` — displayed in the round badge
- `encounter.combatants[encounter.activeIndex].name` — displayed as the centered combatant name
- `encounter.combatants.length` — used to determine the no-combatants state
## Existing Entities (no changes)
- **Encounter**: Contains `roundNumber` (number), `activeIndex` (number), and `combatants` (array). Already passed to `TurnNavigation` as a prop.
- **Combatant**: Contains `name` (string). Already accessed via `encounter.combatants[encounter.activeIndex]`.
## Component Interface (no changes)
The `TurnNavigationProps` interface remains unchanged:
```
encounter: Encounter
onAdvanceTurn: () => void
onRetreatTurn: () => void
onClearEncounter: () => void
onRollAllInitiative: () => void
onOpenSourceManager: () => void
```