Revert universal .btn-disabled → × pseudo-element overlay (iter-4c); restore case-by-case × rendering convention. My Sea DEL btn now swaps DEL× in lockstep w. its .btn-disabled toggle (matches game-kit tooltip + DON/DOFF pattern). User-spec 2026-05-20.
Some checks failed
ci/woodpecker/push/pyswiss Pipeline was successful
ci/woodpecker/push/main Pipeline failed

The iter-4c bundle added a universal `&::before { content: "\00d7"; ... }`
overlay on every `.btn-disabled` button + hid native text via
`> * { visibility: hidden }` + `color: transparent`. Visually flattened
every disabled state across the app (DEL, FLIP, DON/DOFF, palette
swatches, etc.) onto a single × glyph — user-rejected: "ruined the old
UX appearance".

Revert restores `_button-pad.scss` to its pre-iter-4c shape:
`color: rgba(--secUser, 0.25)` dims native text in place; no overlay,
no inner-content hiding. Templates that want a × on disabled buttons
render it explicitly in their own markup (game-kit tooltip `<button
class="btn-equip btn-disabled">×</button>`, my_notes DON/DOFF, etc.).

My Sea DEL btn picks up the case-by-case convention: template renders
`{% if hand_complete %}DEL{% else %}&times;{% endif %}`; the picker's
`_setComplete(on)` JS handler swaps `delBtn.innerHTML` between `DEL`
and `×` in lockstep w. the `.btn-disabled` class toggle so visual +
label always agree post-hand-completion.

FT `test_form_col_renders_decks_lock_hand_del_and_reversal_pct` now
asserts `delbtn.text == "×"` instead of relying on the (now-removed)
pseudo-element comment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-05-20 09:56:19 -04:00
parent 4417b8c972
commit db443b7533
3 changed files with 22 additions and 32 deletions

View File

@@ -229,12 +229,15 @@
{# DEL starts `.btn-disabled` until the hand is #}
{# complete — per Sprint-5-iter-4c spec, the 1/day #}
{# quota is committed at first-card-draw + can't be #}
{# refunded by an early DEL. #}
{# refunded by an early DEL. Case-by-case `&times;` #}
{# rendering matches game-kit tooltip + DON/DOFF #}
{# convention (user-spec 2026-05-20): a disabled btn #}
{# carries × in its own text node, not via a CSS #}
{# overlay. JS `_setComplete` swaps inner text in #}
{# lockstep with the `.btn-disabled` class toggle. #}
<button type="button"
id="id_sea_del"
class="btn btn-danger{% if not hand_complete %} btn-disabled{% endif %}">
DEL
</button>
class="btn btn-danger{% if not hand_complete %} btn-disabled{% endif %}">{% if hand_complete %}DEL{% else %}&times;{% endif %}</button>
</div>
</div>
{# Sea stage — portaled modal that opens on FLIP click via #}
@@ -439,9 +442,18 @@
// disabled when shown. The deck STACKS themselves stay
// click-responsive (so the user can see the disabled
// FLIP feedback) — `_locked` gates the actual draw.
//
// DEL btn text follows the game-kit tooltip convention
// (user-spec 2026-05-20): disabled state reads × (the
// template's initial render does the same), active
// state reads DEL. Lockstep w. the `.btn-disabled`
// class so the visual + label always agree.
_locked = on;
picker.classList.toggle('my-sea-picker--locked', on);
if (delBtn) delBtn.classList.toggle('btn-disabled', !on);
if (delBtn) {
delBtn.classList.toggle('btn-disabled', !on);
delBtn.innerHTML = on ? 'DEL' : '×';
}
if (actionBtn) {
actionBtn.dataset.state = on ? 'gate-view' : 'auto-draw';
actionBtn.innerHTML = on ? 'GATE<br>VIEW' : 'AUTO<br>DRAW';