feat(ui): external dictionary lookup link on the word-check tool
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 48s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 56s

When a checked word is found, show a 'look it up' text link beside the
complaint button that opens an external reference dictionary in a new tab:
gramota.ru for the Russian variants, scrabblewordfinder.org for English
(word lower-cased and percent-encoded). The link hides for a word that is
not found. Inside Telegram it routes through the Mini App SDK's openLink, so
Telegram opens it directly instead of the WebView's 'open this link?'
confirmation; in a browser the anchor's own target=_blank handles it.

Relabel the complaint button to 'Возражаю' (ru); English stays 'Disagree'.
This commit is contained in:
Ilia Denisov
2026-06-15 18:14:19 +02:00
parent 4d6df4bd8b
commit 8e0d7f9e17
10 changed files with 113 additions and 8 deletions
+7
View File
@@ -221,6 +221,13 @@ test('check-word sanitises input and shows a verdict', async ({ page }) => {
await page.locator('.check button').click(); // Check (enabled: length 3)
await expect(page.locator('.ok, .bad')).toBeVisible();
// A found word offers an external dictionary lookup link that opens in a new tab; the
// verdict still carries the complaint button.
const lookup = page.getByRole('link', { name: 'Look it up' });
await expect(lookup).toBeVisible();
await expect(lookup).toHaveAttribute('target', '_blank');
await expect(lookup).toHaveAttribute('href', /qza$/);
});
test('dropping the game ends it and shows the result', async ({ page }) => {