Refactor Home UI controls and add dice to campaign log entries

This commit is contained in:
2026-02-26 09:22:29 +01:00
parent 96238a9341
commit 2d1bf9b9b7
20 changed files with 774 additions and 255 deletions

15
UX.md
View File

@@ -20,7 +20,7 @@ In scope for this UX:
- Two authenticated screens:
- `Play` screen for character sheet and log
- `Campaign Management` screen for campaign details and management actions
- Character create/edit/activate
- Character create/edit with picker-selected active context
- Skill create/edit
- Skill rolling with public/private visibility
- Campaign log with live updates
@@ -135,7 +135,7 @@ Campaign details and management controls are excluded from this screen.
3. Open `Campaign Management`
4. Create campaign with ruleset
5. Create or move character into campaign
6. Activate character
6. Select character in picker (selection becomes active context)
7. Switch to `Play`
8. Create skill
9. Roll skill (public/private)
@@ -147,7 +147,7 @@ Campaign details and management controls are excluded from this screen.
2. Open `Campaign Management`
3. Select accessible campaign
4. Create character in that campaign
5. Activate character
5. Select character in picker (selection becomes active context)
6. Switch to `Play`
7. Add or edit skills
8. Roll and view log with visibility rules
@@ -235,12 +235,11 @@ Shows selected character details:
- Character name
- Owner
- Campaign affiliation
- Active badge if it matches session active character
- Active badge shown for the currently selected picker character
Actions:
- `Edit Character` button -> opens modal form
- `Activate Character` button (enabled only when permitted)
### Skills and Roll Commands
@@ -272,6 +271,7 @@ Shows chronological roll entries with:
- Roller identity
- Character + skill
- Result and breakdown
- Die-by-die visualization with states: `critical`, `fumble`, `wild`, `removed`, `added`
- Visibility badge
- Timestamp
@@ -339,7 +339,7 @@ Server error mapping:
| `campaign_not_found`, `character_not_found`, `skill_not_found` | Non-blocking panel alert + auto-refresh relevant list |
| `forbidden` | Explain permission rule and remove unavailable actions |
| `unauthorized` | Clear session and return to auth view with message |
| `no_active_character` | Show CTA to activate a character |
| `no_active_character` | Prompt user to choose a character in picker and auto-sync active context |
## 11. Empty, Loading, and Disabled States
@@ -388,7 +388,6 @@ Loading patterns:
- Use plain language and short action labels.
- Keep critical actions explicit:
- "Create Campaign"
- "Activate Character"
- "Roll Skill"
- Error tone: corrective and direct.
- Date/time: local display with ISO tooltip.
@@ -412,7 +411,7 @@ Loading patterns:
|---|---|
| User management | Auth view with register/login/logout, secure failure messaging |
| Campaign management | Dedicated `Campaign Management` screen with ruleset assignment and details |
| Character management | Character picker + modal edit/create/activate flows |
| Character management | Character picker + modal edit/create flows with selected-character active context |
| Active character context | Persistent header context and activation CTA |
| Skill management | Skill create/edit modals + ruleset-aware validation feedback |
| Dice rolling | Visibility toggle + deterministic result display in `Play` screen |