A.5-polish FLIP-to-back for non-polarized image-equipped decks — TDD. User-spec'd feature 2026-05-25 PM after browser-verifying A.5: the FLIP button on my_sign.html cycles polarity for polarized decks (Earthman) — gravity/levity swap w. a 3D-spin animation, stat block updates to the new polarity's emanation/reversal qualifiers. For non-polarized decks (Minchiate today, future RWS-with-images, future classic-playing decks), polarity has no meaning — clicking FLIP just runs an animation that doesn't change anything content-wise. User wants FLIP repurposed for non-polarized decks: reveal the card-back image while leaving the stat block untouched, so the gesture has visible payoff w/o forcing a meaningless polarity-state change. Implementation thread: server-side page wrapper carries a new data-deck-polarized="{{ user.equipped_deck.is_polarized|yesno:'true,false' }}" attr so the in-page JS can branch on it without making an API call or guessing from card data; stage-card scaffold conditionally renders a hidden <img.sig-stage-card-back-img> element when equipped_deck.has_card_images AND NOT is_polarized (image-equipped polarized decks would still cycle polarity per existing flow — back-image element absent for them, no resource waste). JS branch in flipBtn.click: if (pageEl.dataset.deckPolarized === 'false') { stageCard.classList.toggle('is-flipped-to-back') } else { _flipPolarityAnimated() } — same .is-reversed class toggle on the btn itself so visual feedback is consistent across both modes (btn rotates to signal "flipped state on"). SCSS: .sig-stage-card-back-img joins the existing .sig-stage-card-img filter chain (same contour stroke + silhouette black shadow — back image gets identical visual treatment to the front so the flip reads as same-deck consistency); default display: none; .sig-stage-card.is-flipped-to-back flips visibility — hides front, shows back. Stat block + arcana-key stroke color stay put per user spec — FLIP for non-polarized is purely a visual reveal, no polarity-cycle or content swap. 3 new ITs in MySignViewTest: data-deck-polarized="true" for default Earthman; data-deck-polarized="false" + back-img element present w. correct v2-convention back asset URL when user switches to Minchiate; polarized deck omits the back-img element. No JS unit test (Jasmine spec) for the flipBtn branch — visual verify covers the hover/click interaction; the IT covers the server-side conditional render that determines whether the branch can fire. No FT (the existing my_sign FTs cover the polarized-flip flow already; non-polarized-flip is a CSS class toggle, low-risk for regression). Tests: 3 new green; 9/9 MySignViewTest class green; 1303/1303 IT+UT total green (71s; +3 from 82813e9's 1300). Out of scope: my_sea's central sig card doesn't have a FLIP btn (no analogous behavior to add there); room.html FLIP behavior will be covered in A.8 if applicable; Sea Stage modal FLIP behavior (if any) lands in the my-sea fetch-endpoint extension later in A.5
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -681,7 +681,8 @@ html:has(.sig-backdrop) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sig-stage-card-img {
|
||||
.sig-stage-card-img,
|
||||
.sig-stage-card-back-img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -707,6 +708,18 @@ html:has(.sig-backdrop) {
|
||||
drop-shadow( 0 -0.2rem 0 var(--img-stroke-color))
|
||||
drop-shadow( 1px 1px 2px rgba(0, 0, 0, 1));
|
||||
}
|
||||
.sig-stage-card-back-img { display: none; } // shown only when flipped
|
||||
|
||||
// Sprint A.5 — FLIP-to-back behavior for non-polarized image-equipped
|
||||
// decks (Minchiate today). When `.is-flipped-to-back` is toggled by
|
||||
// my_sign's flip-btn handler, the front face img hides + the deck
|
||||
// card-back img shows. Stat block + arcana-key stroke color stay put —
|
||||
// FLIP is purely a visual reveal of the card's back, no polarity-cycle
|
||||
// or content swap. User spec 2026-05-25 PM.
|
||||
&.is-flipped-to-back {
|
||||
.sig-stage-card-img { display: none; }
|
||||
.sig-stage-card-back-img { display: block; }
|
||||
}
|
||||
}
|
||||
|
||||
// ─── My Sign picker — sizing + state-gated reveal ────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user