From b18bf683a948811dbc99edf425e08ee748e3e9f7 Mon Sep 17 00:00:00 2001 From: Tim McCarthy Date: Mon, 15 Jun 2026 11:01:16 -0700 Subject: [PATCH] Simple tasks: Tooltips and UI Layout Completed tasks: 'PvP challenge tooltips', 'Secret technique tooltips', and 'Character sheet layout' from TODO.md --- TODO.md | 6 +-- frontend/src/assets/css/character.css | 18 +++++++ frontend/src/components/Card.svelte | 2 +- .../components/scene/ChallengePanel.svelte | 4 +- .../components/scene/CharacterSheet.svelte | 48 ++++++++++--------- frontend/src/lib/cards.js | 24 +++++++++- frontend/src/lib/changelog.js | 11 ++++- 7 files changed, 82 insertions(+), 31 deletions(-) diff --git a/TODO.md b/TODO.md index 38a4925..cb387cd 100644 --- a/TODO.md +++ b/TODO.md @@ -2,9 +2,9 @@ - [x] **Event log items**. Completing a crew objective should go in the event log - [x] **Personal objectives for pi-rats** Mousing over a personal objective as a pi-rat should not make the cursor change, as it's a non-interactive UI element for them -- [ ] **PvP challenge tooltips** Update the PvP challenge card selection dropdown tooltips so that they describe the general class of obstacles for the suit rather than the specific challenge for that card. This also goes for the temporary obstacles created by PvP challenges. -- [ ] **Secret technique tooltips** The tooltip for a played secret technique should include the full secret technique description, since it gets truncated in the main display. -- [ ] **Character sheet layout** Personal objectives should be on a second column to the right, on screen layouts wide enough to accommodate it +- [x] **PvP challenge tooltips** Update the PvP challenge card selection dropdown tooltips so that they describe the general class of obstacles for the suit rather than the specific challenge for that card. This also goes for the temporary obstacles created by PvP challenges. +- [x] **Secret technique tooltips** The tooltip for a played secret technique should include the full secret technique description, since it gets truncated in the main display. +- [x] **Character sheet layout** Personal objectives should be on a second column to the right, on screen layouts wide enough to accommodate it ## DevOps/Maintenance diff --git a/frontend/src/assets/css/character.css b/frontend/src/assets/css/character.css index 17a0e4f..48854c6 100644 --- a/frontend/src/assets/css/character.css +++ b/frontend/src/assets/css/character.css @@ -123,6 +123,24 @@ /* --- Character sheet layout --- */ .character-sheet-details { text-align: left; + display: flex; + flex-direction: column; +} + +@media (min-width: 768px) { + .character-sheet-details { + flex-direction: row; + align-items: flex-start; + gap: 1.5rem; + } + .sheet-main-column { + flex: 2; + min-width: 0; + } + .sheet-side-column { + flex: 1; + min-width: 0; + } } .techniques-list-sheet { diff --git a/frontend/src/components/Card.svelte b/frontend/src/components/Card.svelte index 665809c..1b4dde2 100644 --- a/frontend/src/components/Card.svelte +++ b/frontend/src/components/Card.svelte @@ -48,7 +48,7 @@ {#if techName}
-
{cardValue(card)}: "{techName}"
+
{cardValue(card)}: "{techName}"
{/if}
diff --git a/frontend/src/components/scene/ChallengePanel.svelte b/frontend/src/components/scene/ChallengePanel.svelte index fedaadb..b2c714b 100644 --- a/frontend/src/components/scene/ChallengePanel.svelte +++ b/frontend/src/components/scene/ChallengePanel.svelte @@ -123,7 +123,7 @@ {/if} {#if ch.challenge_type === 'pvp'}

- Temporary Obstacle: {getCardDisplay(ch.temp_card)} — {playerName(ch.acting_player_id)} must answer it! + Temporary Obstacle: {getCardDisplay(ch.temp_card)} — {playerName(ch.acting_player_id)} must answer it!

{:else}
@@ -173,7 +173,7 @@

Defend yourself! Pick a card:

{#each hand.filter(c => !isJoker(c)) as card} - + {/each}
diff --git a/frontend/src/components/scene/CharacterSheet.svelte b/frontend/src/components/scene/CharacterSheet.svelte index 6c6b4a2..70ade62 100644 --- a/frontend/src/components/scene/CharacterSheet.svelte +++ b/frontend/src/components/scene/CharacterSheet.svelte @@ -1,7 +1,7 @@