Stage 17 #5: hide finished games from your own lobby list #27
@@ -107,6 +107,13 @@ test('lobby: hiding a finished game removes it (kebab → ❌), keeping the othe
|
|||||||
await expect(page.locator('.rowwrap', { hasText: 'Rick' })).toBeVisible();
|
await expect(page.locator('.rowwrap', { hasText: 'Rick' })).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('lobby: the active-row chevron opens the game (not a no-op)', async ({ page }) => {
|
||||||
|
await loginLobby(page);
|
||||||
|
// The inert-looking '>' on an active row is a tap target that opens the game, like the row.
|
||||||
|
await page.locator('.rowwrap', { hasText: 'Ann' }).locator('.chev').click();
|
||||||
|
await expect(page.locator('[data-cell]').first()).toBeVisible();
|
||||||
|
});
|
||||||
|
|
||||||
test('lobby hamburger shows the pending notification count', async ({ page }) => {
|
test('lobby hamburger shows the pending notification count', async ({ page }) => {
|
||||||
await loginLobby(page);
|
await loginLobby(page);
|
||||||
// One incoming friend request (Rick) + one invitation (Kaya) = 2.
|
// One incoming friend request (Rick) + one invitation (Kaya) = 2.
|
||||||
|
|||||||
@@ -79,9 +79,11 @@
|
|||||||
if (!drag) return;
|
if (!drag) return;
|
||||||
const dx = e.clientX - drag.x0;
|
const dx = e.clientX - drag.x0;
|
||||||
const dy = e.clientY - drag.y0;
|
const dy = e.clientY - drag.y0;
|
||||||
if (Math.abs(dx) > 40 && Math.abs(dx) > Math.abs(dy) * 1.4) {
|
// Only a finished row reveals on a horizontal swipe; that swipe then suppresses the tap so it
|
||||||
|
// does not also open the game. Active rows ignore swipes and stay plain tap-to-open.
|
||||||
|
if (finished && Math.abs(dx) > 40 && Math.abs(dx) > Math.abs(dy) * 1.4) {
|
||||||
swiped = true;
|
swiped = true;
|
||||||
revealedId = dx < 0 && finished ? drag.id : null;
|
revealedId = dx < 0 ? drag.id : null;
|
||||||
}
|
}
|
||||||
drag = null;
|
drag = null;
|
||||||
}
|
}
|
||||||
@@ -207,7 +209,9 @@
|
|||||||
{#if group.finished}
|
{#if group.finished}
|
||||||
<button class="kebab" onclick={() => toggleReveal(g.id)} aria-label={t('lobby.hideGame')}>⋮</button>
|
<button class="kebab" onclick={() => toggleReveal(g.id)} aria-label={t('lobby.hideGame')}>⋮</button>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="chev" aria-hidden="true">›</span>
|
<!-- A visual duplicate of the row's tap target: opens the game on tap, but kept out
|
||||||
|
of the tab order / a11y tree since the .open button already does the same. -->
|
||||||
|
<button class="chev" onclick={() => openGame(g)} tabindex={-1} aria-hidden="true">›</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -341,6 +345,9 @@
|
|||||||
.chev {
|
.chev {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
|
padding: 10px 0;
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user