feat(ui): external dictionary lookup link on the word-check tool #67
Reference in New Issue
Block a user
Delete Branch "feat/dict-lookup-link"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When a checked word is found, a
Look it up/Поискать в словареtext link appears beside the complaint button and opens an external reference dictionary in a new tab:scrabble_ru/erudit_ru->https://gramota.ru/poisk?query=<word>scrabble_en->https://scrabblewordfinder.org/dictionary/<word>Word is lower-cased and percent-encoded. The link hides for a word that is not found. Inside Telegram the click routes through the Mini App SDK's
openLink(newtelegramOpenExternalLink), so Telegram opens it directly instead of the WebView's "open this link?" confirmation; in a browser the anchor's owntarget=_blankhandles it.The complaint button is relabelled to Возражаю (ru); English stays
Disagree.URL composition is a pure
dictionaryLookupUrl()incheckword.ts(unit-tested).FUNCTIONAL.md(+_ru) updated.Verified locally:
pnpm check0 errors,test:unit238/238,buildok,test:e2e136/136 (Chromium + WebKit).Note: the openLink dialog removal can only be confirmed in real Telegram on the contour.
Extend the openLink routing from the dictionary lookup to every external link shown inside the Mini App, so none triggers the WebView's 'open this link?' confirmation. A shared onExternalLinkClick handler resolves the anchor via closest() (so it also works delegated on {@html} content), backed by a pure routeExternalLinkInTelegram decision: only inside Telegram, only an external http(s) target=_blank link, excluding same-origin/in-app and t.me links (t.me keeps openTelegramLink). Applied to the word-check lookup, the About rules link, the Feedback operator-reply links, and the feature-gated announcement banner. Outside Telegram every anchor keeps its native target=_blank.