tray: Tray.placeSig analogue of placeCard for SIG SELECT exit; rename arc-in → fade-in — TDD
After all 3 gamers in a polarity room confirm TAKE SIG and the 12s countdown
expires, sig-select.js's room:polarity_room_done handler now plays the same
tray-open / fade-in / tray-close sequence the role-select uses, then
dismisses the sig overlay & shows the waiting msg ("Gravity settling…" /
"Levity appraising…") on Tray.placeSig's completion callback. Visual order:
sig stage → tray slides in → sig fades into the second tray cell → tray
slides out → table hex w. waiting msg. Cross-polarity events (other room
finishing while we're still in our overlay) are no-op as before.
- tray.js: new Tray.placeSig(sourceEl, onComplete). Mutates the SECOND
.tray-cell in place (sig slot), copies aria-label / data-energies /
data-operations / corner-rank + suit-icon markup from the source
.sig-stage-card, then runs the shared open → fade-in → close sequence.
Extracted _runFadeInSequence helper so placeCard + placeSig share the
same animation glue. reset() now also clears .tray-sig-card from cells.
- _tray.scss: .tray-sig-card.fade-in > .sig-stage-card animates via the
existing tray-role-fade-in keyframes.
- sig-select.js polarity_room_done handler: Tray.placeSig(stageCard,
_settle); _settle runs the existing _dismissSigOverlay + _showWaitingMsg.
Falls back to immediate dismiss when Tray is undefined (test environments
without the tray).
- arc-in → fade-in rename across tray.js, role-select.js, _tray.scss
(incl. @keyframes tray-role-arc-in → tray-role-fade-in), TraySpec.js
spec descriptions + assertions, & test_room_role_select.py docstrings.
The original "arc-in" name suggested a curved-path animation; the actual
behaviour is a 1s opacity fade, so fade-in is the accurate label.
- TraySpec: 10 new placeSig specs mirroring placeCard (second-cell mutation,
data + markup copy, tabIndex, fade-in class, animationend-triggered close,
onComplete callback, landscape parity, reset cleanup).
- SigSelectSpec: 3 new specs (Tray.placeSig called w. stageCard on own
polarity; not called on other polarity; overlay dismiss deferred to the
Tray.placeSig completion callback).
344 specs / 4 pending green; RoleSelectTrayTest FT still green.
Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -564,7 +564,7 @@ class RoleSelectTest(FunctionalTest):
|
||||
self.wait_for(
|
||||
lambda: self.assertFalse(
|
||||
self.browser.execute_script("return Tray.isOpen()"),
|
||||
"Tray should close after arc-in sequence",
|
||||
"Tray should close after fade-in sequence",
|
||||
)
|
||||
)
|
||||
|
||||
@@ -636,7 +636,7 @@ class RoleSelectTrayTest(FunctionalTest):
|
||||
def test_portrait_role_card_enters_topmost_grid_square(self):
|
||||
"""Portrait: after confirming a role the first .tray-cell gets
|
||||
.tray-role-card; the grid still has exactly 8 cells; and the tray
|
||||
opens briefly then closes once the arc-in animation completes."""
|
||||
opens briefly then closes once the fade-in animation completes."""
|
||||
self.browser.set_window_size(390, 844)
|
||||
room = self._make_room()
|
||||
self.create_pre_authenticated_session("slot1@test.io")
|
||||
@@ -669,7 +669,7 @@ class RoleSelectTrayTest(FunctionalTest):
|
||||
self.wait_for(
|
||||
lambda: self.assertFalse(
|
||||
self.browser.execute_script("return Tray.isOpen()"),
|
||||
"Tray should close after the arc-in sequence"
|
||||
"Tray should close after the fade-in sequence"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -709,7 +709,7 @@ class RoleSelectTrayTest(FunctionalTest):
|
||||
self.wait_for(
|
||||
lambda: self.assertFalse(
|
||||
self.browser.execute_script("return Tray.isOpen()"),
|
||||
"Tray should close after the arc-in sequence"
|
||||
"Tray should close after the fade-in sequence"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user