diff --git a/src/functional_tests/test_bill_my_sign.py b/src/functional_tests/test_bill_my_sign.py index f9fa09c..e8fb303 100644 --- a/src/functional_tests/test_bill_my_sign.py +++ b/src/functional_tests/test_bill_my_sign.py @@ -280,21 +280,20 @@ class MySignPickerTest(FunctionalTest): # ── Test 6 ─────────────────────────────────────────────────────────────── def test_landing_previews_saved_sig_on_stage(self): - """If user already has a saved significator, the landing-phase stage - frame should preview the saved card (above/behind the hex).""" + """If user already has a saved significator, the landing collapses to + a read-only stage: the saved card preview + its stat block (no SCAN + SIGN btn, no hex — user must DEL the saved sig to re-enter picker).""" # Pre-save a sig in the DB self.gamer.significator = self.target_card self.gamer.save(update_fields=["significator"]) self.create_pre_authenticated_session(self.email) self.browser.get(self.live_server_url + "/billboard/my-sign/") - # Landing phase still shows hex w. SCAN SIGN - self.wait_for( - lambda: self.browser.find_element(By.ID, "id_scan_sign_btn") - ) # Stage card is visible w. the saved card populated (corner-rank + # name pinned by data-card-id on the stage card wrapper) - stage_card = self.browser.find_element( - By.CSS_SELECTOR, ".my-sign-stage .sig-stage-card" + stage_card = self.wait_for( + lambda: self.browser.find_element( + By.CSS_SELECTOR, ".my-sign-stage .sig-stage-card" + ) ) self.assertTrue( stage_card.is_displayed(), @@ -304,6 +303,28 @@ class MySignPickerTest(FunctionalTest): stage_card.get_attribute("data-card-id"), str(self.target_card.id), ) + # Stage is frozen → stat block visible next to the card + stage = self.browser.find_element(By.CSS_SELECTOR, ".my-sign-stage") + self.assertIn("sig-stage--frozen", stage.get_attribute("class")) + self.assertTrue( + self.browser.find_element( + By.CSS_SELECTOR, ".my-sign-stage .sig-stat-block" + ).is_displayed(), + "Stat block should be visible alongside the saved sig", + ) + # Hex + SCAN SIGN gone — user must DEL to re-enter picker + self.assertEqual( + len(self.browser.find_elements(By.ID, "id_scan_sign_btn")), + 0, + "SCAN SIGN btn should not render when a sig is already saved", + ) + self.assertEqual( + len(self.browser.find_elements( + By.CSS_SELECTOR, ".my-sign-page .table-hex" + )), + 0, + "Table hex should not render when a sig is already saved", + ) # ── Test 3 ─────────────────────────────────────────────────────────────── diff --git a/src/static_src/scss/_billboard.scss b/src/static_src/scss/_billboard.scss index 622f11e..1db9624 100644 --- a/src/static_src/scss/_billboard.scss +++ b/src/static_src/scss/_billboard.scss @@ -431,3 +431,83 @@ body.page-billposts { // My Scrolls now rides the shared `.applet-list` rule above (lifted out of // `.applet-list-page .applet-scroll`). Old `.scroll-list` styling removed. + +// ── My Sign applet (billboard) ──────────────────────────────────────────── +// Saved-sig preview thumbnail. Same 5:8 card shell + corner/name layout as +// `.sig-stage-card` (see `_card-deck.scss`) but scaled down to fit the 4×6 +// applet aperture. Without these rules the markup collapses bg-less to the +// applet's top-left corner. `--applet-card-w` drives all child font sizing +// off a single knob (same calc-fractions as `.sig-stage-card` w. --sig-card-w). +#id_applet_my_sign { + display: flex; + flex-direction: column; + + .my-sign-applet-body { + flex: 1; + min-height: 0; + display: flex; + align-items: center; + justify-content: center; + padding: 0.5rem; + } + + .my-sign-applet-card { + --applet-card-w: 5rem; + width: var(--applet-card-w); + aspect-ratio: 5 / 8; + border-radius: 0.4rem; + background: rgba(var(--priUser), 1); + border: 0.12rem solid rgba(var(--secUser), 0.6); + color: rgba(var(--secUser), 1); + padding: 0.25rem; + position: relative; + display: flex; + flex-direction: column; + overflow: hidden; + transition: transform 0.4s ease; + + .fan-card-corner--tl { + display: flex; + flex-direction: column; + align-items: center; + line-height: 1.1; + gap: 0.05rem; + position: absolute; + top: 0.2rem; + left: 0.2rem; + + .fan-corner-rank { + font-size: calc(var(--applet-card-w) * 0.18); + font-weight: 700; + } + i { font-size: calc(var(--applet-card-w) * 0.14); } + } + + .fan-card-name { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + margin: 0; + text-align: center; + font-size: calc(var(--applet-card-w) * 0.13); + font-weight: 600; + text-wrap: balance; + padding: 0 0.15rem; + color: rgba(var(--quiUser), 1); + } + + &.stage-card--reversed { transform: rotate(180deg); } + } + + .my-sign-applet-empty { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + text-align: center; + opacity: 0.6; + font-style: italic; + margin: 0; + } +} diff --git a/src/static_src/scss/_card-deck.scss b/src/static_src/scss/_card-deck.scss index 568456b..4d597a4 100644 --- a/src/static_src/scss/_card-deck.scss +++ b/src/static_src/scss/_card-deck.scss @@ -675,8 +675,6 @@ html:has(.sig-backdrop) { // bumps it down a notch so the 2-line "SCAN/SIGN" label sits cleanly // inside the 4rem circle without crowding the border. #id_scan_sign_btn { - font-size: 0.75rem; - line-height: 1.1; white-space: normal; } diff --git a/src/static_src/scss/_gameboard.scss b/src/static_src/scss/_gameboard.scss index fe5e5e8..b5fcdda 100644 --- a/src/static_src/scss/_gameboard.scss +++ b/src/static_src/scss/_gameboard.scss @@ -65,8 +65,7 @@ body.page-gameboard { flex-direction: row; flex-wrap: wrap; align-items: center; - justify-content: center; - gap: 0.75rem; + justify-content: space-evenly; overflow-x: visible; scrollbar-width: none; &::-webkit-scrollbar { display: none; } diff --git a/src/static_src/scss/_palette-picker.scss b/src/static_src/scss/_palette-picker.scss index 69814b1..c73d3a6 100644 --- a/src/static_src/scss/_palette-picker.scss +++ b/src/static_src/scss/_palette-picker.scss @@ -86,8 +86,15 @@ // ── Palette tooltip portal ──────────────────────────────────────────────────── #id_tooltip_portal { - // Override .tt { display: none } — portal content is shown/hidden by JS - .tt-title, + // Override .tt { display: none } — portal content is shown/hidden by JS. + // `.tt-title` deliberately NOT listed here: the shared `.token-tooltip h4 + // { display: flex }` rule in _tooltips.scss must win so wallet-shop's + // `