my-sea slot: render the 5+-char numeral squeeze (--rank-long) server-side so it survives a refresh — TDD

sea.js's _fillSlot adds .sea-card-slot--rank-long on draw (corner_rank length
>= 5) to squeeze long Roman numerals (XVIII, XLVIII, ...) into the slot, but
_my_sea_slot.html didn't — so a saved hand stretched the numeral back out on
refresh (server render). Add the same length>=5 class server-side. Fixes both
the owner picker + the spectator cross (shared partial). +3 ITs (long / short /
boundary).

Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-05-29 23:06:19 -04:00
parent 260c1c1325
commit a85f5b6f44
2 changed files with 34 additions and 1 deletions

View File

@@ -8,7 +8,11 @@
{# crossing — bool; pass True for the cross slot (gets the #}
{# `.sea-card-slot--crossing` modifier in iter-4a HTML) #}
{% if saved %}
<div class="sea-card-slot sea-card-slot--filled sea-card-slot--visible sea-card-slot--{{ saved.polarity }}{% if saved.reversed %} sea-card-slot--reversed{% endif %}{% if crossing %} sea-card-slot--crossing{% endif %}{% if saved.has_card_images %} sea-card-slot--image{% endif %}"
{# `--rank-long` squeezes 5+-char Roman numerals (XVIII, XLVIII, …) so they #}
{# fit the slot. Added server-side here to MATCH sea.js's `_fillSlot` #}
{# (length >= 5) — without it a saved hand stretched the numeral back out #}
{# on refresh (JS-only before, user-reported 2026-05-29). #}
<div class="sea-card-slot sea-card-slot--filled sea-card-slot--visible sea-card-slot--{{ saved.polarity }}{% if saved.reversed %} sea-card-slot--reversed{% endif %}{% if crossing %} sea-card-slot--crossing{% endif %}{% if saved.has_card_images %} sea-card-slot--image{% endif %}{% if saved.corner_rank|length >= 5 %} sea-card-slot--rank-long{% endif %}"
data-card-id="{{ saved.card_id }}"
data-pos-key="{{ position }}"
{% if saved.has_card_images %}data-arcana-key="{{ saved.arcana }}"{% endif %}>