Stage 17 round 6 (cluster 1): profile, tap flash, variant naming, chat/nudge by turn
CI / changes (pull_request) Successful in 1s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 11s
CI / ui (pull_request) Successful in 30s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m3s

- Profile: drop the hint-balance line.
- Board: no mobile tap flash on a cell tap (-webkit-tap-highlight-color: transparent),
  matching the web click; the only intentional cell animation stays the last-word flash.
- Variant names keyed by the game's alphabet, not the UI language: english -> Scrabble
  always, russian_scrabble -> Скрэббл always (unlocalized, never collide), erudit localized.
- Chat/nudge are mutually exclusive by turn: the message field + Send show on your turn,
  the nudge replaces them on the opponent's turn; while the nudge cooldown is active the
  button is disabled with a grey 'awaiting reply' caption to its left.
This commit is contained in:
Ilia Denisov
2026-06-07 11:18:25 +02:00
parent a420d6a2cd
commit 512ad4dfb9
8 changed files with 47 additions and 34 deletions
+28 -12
View File
@@ -6,16 +6,20 @@
messages,
myId,
busy,
canNudge = true,
myTurn = false,
nudgeOnCooldown = false,
onsend,
onnudge,
}: {
messages: ChatMessage[];
myId: string;
busy: boolean;
// Nudging only makes sense while waiting on the opponent; it is disabled on the
// player's own turn (there is no one to hurry along).
canNudge?: boolean;
// Chat and nudge are mutually exclusive by turn (Stage 17): on the player's own turn the
// message field + send are shown (and nudging makes no sense — there is no one to
// hurry); on the opponent's turn only the nudge button shows. While the hourly nudge
// cooldown is active the nudge is disabled with an "awaiting reply" caption.
myTurn?: boolean;
nudgeOnCooldown?: boolean;
onsend: (text: string) => void;
onnudge: () => void;
} = $props();
@@ -44,14 +48,18 @@
{/each}
</div>
<div class="input">
<input
maxlength="60"
placeholder={t('chat.placeholder')}
bind:value={text}
onkeydown={(e) => e.key === 'Enter' && send()}
/>
<button class="iconbtn" onclick={send} disabled={busy} aria-label={t('chat.send')}>⬆️</button>
<button class="iconbtn" onclick={onnudge} disabled={busy || !canNudge} aria-label={t('chat.nudgeAction')}>🛎</button>
{#if myTurn}
<input
maxlength="60"
placeholder={t('chat.placeholder')}
bind:value={text}
onkeydown={(e) => e.key === 'Enter' && send()}
/>
<button class="iconbtn" onclick={send} disabled={busy} aria-label={t('chat.send')}></button>
{:else}
{#if nudgeOnCooldown}<span class="cooldown">{t('chat.awaitingReply')}</span>{/if}
<button class="iconbtn" onclick={onnudge} disabled={busy || nudgeOnCooldown} aria-label={t('chat.nudgeAction')}>🛎️</button>
{/if}
</div>
</div>
@@ -99,6 +107,14 @@
.input {
display: flex;
gap: 6px;
align-items: center;
}
/* The cooldown caption sits to the left of the disabled nudge button. */
.cooldown {
flex: 1;
text-align: right;
color: var(--text-muted);
font-size: 0.85rem;
}
.input input {
flex: 1;