Sea Select: spread center significator supplies the card-face image — TDD

The felt cross's CENTER significator was hardcoded to the corner-rank + suit-icon
text thumbnail, so an image deck (RWS / Minchiate) showed a bare "0"+icon card
instead of its face. Mirror my_sea: render the `.sig-stage-card-img` (image mode)
when the sig's deck has card images, else fall through to the text thumbnail. The
tray sig stays the simple thumbnail (user-spec). The sig's `deck_variant` is the
card's OWN deck — the Sig Select pick is drawn from the Role Select contributed
deck (`_room_deck_variant`), so this is the correct image source (no equipped_deck
bug, unlike the earlier FLIP back-img).

- IT: an image-deck significator renders the center `sea-sig-card sig-stage-card--image`
- 949+ epic ITs green

; FLIP tint tweak (parallel edit): flipped-back overlay alpha 0.6 → 0.3

[[project-deck-segment-model]]
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-06-07 22:47:54 -04:00
parent d09dca56c0
commit 0f57cae50d
3 changed files with 34 additions and 5 deletions

View File

@@ -4180,6 +4180,25 @@ class PickSeaUnifiedFeltTest(TestCase):
content = self.client.get(self.url).content.decode()
self.assertNotIn("sig-stage-card-back-img", content)
def test_center_sig_renders_image_for_image_deck_sig(self):
"""The spread's CENTER significator supplies the card-face image when its
deck has one (mirrors my_sea); the tray sig stays a simple thumbnail. The
sig's deck_variant is the card's OWN deck — the Sig Select pick comes from
the Role Select contributed deck, so this is the right source (no
equipped_deck bug, unlike the FLIP back-img). User-spec 2026-06-07."""
minch = DeckVariant.objects.get(slug="minchiate-fiorentine-1860-1890")
il_matto = TarotCard.objects.filter(deck_variant=minch).first()
self.pc_seat.significator = il_matto
self.pc_seat.save(update_fields=["significator"])
# my_tray_sig = confirmed_char.significator OR seat.significator → keep both.
char = Character.objects.get(seat=self.pc_seat, confirmed_at__isnull=False)
char.significator = il_matto
char.save(update_fields=["significator"])
content = self.client.get(self.url).content.decode()
# Image-mode marker is unique to the felt cross center (the tray + preview
# sigs stay text-only).
self.assertIn("sea-sig-card sig-stage-card--image", content)
def test_always_two_deck_stacks_gravity_and_levity(self):
"""Unlike my_sea / Sig Select, the room Sea Select ALWAYS shows BOTH the
Gravity + Levity stacks — the gamer draws from either populated half

View File

@@ -2348,10 +2348,10 @@ $_sea-title-els: '.fan-card-name, .sig-qualifier-above, .sig-qualifier-below, .f
}
}
.sea-stage--gravity .sea-stage-card.is-flipped-to-back {
&::after { background: rgba(var(--quiUser), 0.6); }
&::after { background: rgba(var(--quiUser), 0.3); }
}
.sea-stage--levity .sea-stage-card.is-flipped-to-back {
&::after { background: rgba(var(--terUser), 0.6); }
&::after { background: rgba(var(--terUser), 0.3); }
}
// Sea stat block — reuses sig-select stat-block sizing, scoped to sea-stage.

View File

@@ -33,10 +33,20 @@ Each draw persists onto the seat's Character.celtic_cross via epic:sea_save.
{% include "apps/gameboard/_partials/_my_sea_slot.html" with position="leave" saved=saved_by_position.leave crossing=False %}
</div>
<div class="sea-crucifix-cell sea-pos-core">
<div class="sig-stage-card sea-sig-card" style="--sig-card-w: 4rem">
{# Center significator — supply the card-FACE image when the sig's #}
{# deck has one (mirrors my_sea); else fall through to the corner- #}
{# rank + suit-icon text thumbnail (the tray sig stays text-only). #}
{# my_tray_sig's deck_variant is the card's OWN deck (the Sig #}
{# Select pick comes from the Role Select contributed deck via #}
{# _room_deck_variant), so this is the right image source. #}
<div class="sig-stage-card sea-sig-card{% if my_tray_sig.deck_variant.has_card_images %} sig-stage-card--image{% endif %}" style="--sig-card-w: 4rem"{% if my_tray_sig %} data-card-id="{{ my_tray_sig.id }}" data-arcana-key="{{ my_tray_sig.arcana }}"{% endif %}>
{% if my_tray_sig %}
<span class="fan-corner-rank">{{ my_tray_sig.corner_rank }}</span>
{% if my_tray_sig.suit_icon %}<i class="fa-solid {{ my_tray_sig.suit_icon }}"></i>{% endif %}
{% if my_tray_sig.deck_variant.has_card_images %}
<img class="sig-stage-card-img" src="{{ my_tray_sig.image_url }}" alt="{{ my_tray_sig.name }}">
{% else %}
<span class="fan-corner-rank">{{ my_tray_sig.corner_rank }}</span>
{% if my_tray_sig.suit_icon %}<i class="fa-solid {{ my_tray_sig.suit_icon }}"></i>{% endif %}
{% endif %}
{% endif %}
</div>
<div class="sea-pos-cover">