From b308115fcf7a99dd1e5421870bae6936a9b9dcd5 Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Mon, 25 May 2026 19:31:45 -0400 Subject: [PATCH] =?UTF-8?q?A.7.5-polish-6=20FLIP=20btn=20everywhere=20?= =?UTF-8?q?=E2=80=94=20applet=20gate=20dropped=20+=20sea=5Fstage=20modal?= =?UTF-8?q?=20gets=20FLIP.=20User-spec=202026-05-25=20PM=20("If=20it's=20i?= =?UTF-8?q?nterfering=20to=20have=20bespoke=20rules,=20just=20allow=20the?= =?UTF-8?q?=20FLIP=20btn=20everywhere,=20including=20in=20my=5Fsea.html")?= =?UTF-8?q?=20follow-up=20to=20polish-5=20(1e2041e).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **(1) `_applet-my-sign.html`** — FLIP btn moved OUTSIDE the `{% if card.deck_variant.has_card_images %}` + nested `{% if not card.deck_variant.is_polarized %}` gates. Now renders as a direct child of `.my-sign-applet-card` for ALL cards regardless of mode/polarity. Back-img element stays gated (back-img is meaningless for polarized decks or text-mode — would render an empty src). JS handler in the same template ungated too (was wrapped in matching `{% if %}` blocks); now always wires + gracefully no-ops on click when no `.sig-stage-card-back-img` sibling exists. Card-element selector broadened from `.my-sign-applet-card--image` (image-mode only) to `.my-sign-applet-card` (any mode). **(2) `_sea_stage.html`** — added `` (gated on `request.user.equipped_deck.has_card_images and not is_polarized` — same condition as my_sign.html's main page back-img) + ` {% endif %} {% else %}
@@ -42,15 +45,17 @@ {% if card.suit_icon %}{% endif %}
- {# `request.user.sig_face` is the rendering payload from #} - {# `TarotCard.applet_face()` — mirrors `populateCard` in #} - {# `stage-card.js:135-144`: #} - {# • Polarity-split (cards 48-49, trumps 19-21): #} - {# single-line title, qualifier blank. #} - {# • Major + qualifier: title carries a trailing #} - {# comma + qualifier renders BELOW. #} - {# • Non-Major (middle court, Schizo / Nomad w. no #} - {# qualifier): qualifier renders ABOVE the title. #} + {% comment %} + `request.user.sig_face` is the rendering payload from + `TarotCard.applet_face()` — mirrors `populateCard` in + `stage-card.js:135-144`: + • Polarity-split (cards 48-49, trumps 19-21): + single-line title, qualifier blank. + • Major + qualifier: title carries a trailing + comma + qualifier renders BELOW. + • Non-Major (middle court, Schizo / Nomad w. no + qualifier): qualifier renders ABOVE the title. + {% endcomment %} {% with face=request.user.sig_face %} {% if face.qualifier_first %}

{{ face.qualifier }}

@@ -67,6 +72,16 @@ {% if card.suit_icon %}{% endif %}
{% endif %} + {% comment %} + Polish-6 — FLIP btn rendered UNCONDITIONALLY (was gated on + `has_card_images and not is_polarized`). Per user-spec + 2026-05-25 PM "just allow the FLIP btn everywhere". JS + handler below picks behavior by sibling existence: back-img + present → flip-to-back animation; absent → no-op. + {% endcomment %} + {# Stat block — same shape as my_sign.html's `.sig-stat-block` #} {# (Emanation face label + keyword list) but no SPIN/FYI btns #} @@ -82,25 +97,28 @@ {% endcomment %} {% include "core/_partials/_stat_face.html" with face_modifier="upright" label_text="Emanation" card=card %} - {# Sprint A.6 — applet FLIP btn handler. Mirrors my_sign.html's #} - {# `_flipToBackAnimated()` shape (rotateY 0→90→0 over 500ms, class #} - {# toggle at halfway, `data-flipping` attr for SCSS to hide the #} - {# btn). Self-contained inline script — no shared module needed #} - {# since the applet is the only consumer outside the main page #} - {# (which has its own copy). Script wrapped inside the sig-present #} - {# branch AND inside `{% with card %}` scope so `card` references #} - {# resolve + the JS selector strings don't leak into the no-sig #} - {# DOM (which would trip substring-matching tests). #} - {% if card.deck_variant.has_card_images and not card.deck_variant.is_polarized %} + {% comment %} + Polish-6 — applet FLIP btn handler. Mirrors my_sign.html's + `_flipToBackAnimated()` (rotateY 0→90→0 over 500ms, class + toggle at halfway, `data-flipping` attr for SCSS to hide the + btn during animation). Script is now UNGATED (was conditional + on `has_card_images and not is_polarized` like the FLIP btn + itself); per user-spec "allow the FLIP btn everywhere", the + handler always wires + gracefully no-ops when there's no + `.sig-stage-card-back-img` sibling to toggle. + {% endcomment %} - {% endif %} {% endwith %} {% else %}

No sign chosen yet.

diff --git a/src/templates/apps/gameboard/_partials/_sea_stage.html b/src/templates/apps/gameboard/_partials/_sea_stage.html index 56b3093..001ac69 100644 --- a/src/templates/apps/gameboard/_partials/_sea_stage.html +++ b/src/templates/apps/gameboard/_partials/_sea_stage.html @@ -41,6 +41,24 @@ + {% comment %} + Polish-6 — back-img + FLIP btn. The back-img mirrors the + my_sign.html / _applet-my-sign.html pattern: only renders + for non-polarized image-equipped decks (since back-img is + meaningless otherwise; src derives from user's equipped + deck). FLIP btn renders UNCONDITIONALLY per user-spec "allow + the FLIP btn everywhere"; sea.js's click handler no-ops + when no back-img sibling exists. Multi-user gameroom is a + known limitation here — the back-img src is the room + viewer's deck-back, not the drawing gamer's, which is wrong + when different gamers' decks have different backs. Parked + for a future multi-user polish pass. + {% endcomment %} + {% if request.user.is_authenticated and request.user.equipped_deck.has_card_images and not request.user.equipped_deck.is_polarized %} + + {% endif %} +