UI: taller tg-fullscreen header + labelled hub tabs
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 38s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 56s

- tg-fullscreen: +20px header height — without the (removed) hamburger the
  title bar lost its bulk and sat flush on Telegram's native nav band.
- Settings/Comms hub tabs gain text labels under the icons (Settings /
  Profile / Friends / Info and Chat / Dictionary); the icon is aria-hidden
  so the label names the button. New i18n keys about.tab, game.dictionary.
This commit is contained in:
Ilia Denisov
2026-06-11 15:12:40 +02:00
parent fc1261e078
commit ad91bc728b
8 changed files with 29 additions and 24 deletions
+5 -5
View File
@@ -105,14 +105,14 @@
is unchanged) and centres the title within it, BELOW the notch — lining it up vertically
with Telegram's own back/menu controls, which sit in the band's corners. */
:global(html.tg-fullscreen) .bar {
min-height: var(--tg-content-top);
/* The bar spans the Telegram nav band and then **+20px** past --tg-content-top, so the
native controls aren't flush against our content. Without the (removed) hamburger the
title alone left the bar sitting right on the band; the extra height restores the gap.
padding-top clears the notch; the title centres in the band. (Owner-tunable height.) */
min-height: calc(var(--tg-content-top) + 20px);
box-sizing: border-box;
align-items: center;
justify-content: center;
/* +12px of vertical breathing room (6 above / 6 below the centred content, on top of the
notch) so Telegram's native controls aren't flush against our header. Applied as
padding because the bar is sized by its content here, not by min-height (owner review
tweaks). */
padding-top: calc(var(--tg-safe-top) + 6px);
padding-bottom: 6px;
}
+4 -4
View File
@@ -38,12 +38,12 @@
{#snippet tabbar()}
<TabBar>
<button class="tab" class:active={tab === 'chat'} onclick={() => (tab = 'chat')} aria-label={t('game.chat')}>
<span class="sq">💬</span>
<button class="tab" class:active={tab === 'chat'} onclick={() => (tab = 'chat')}>
<span class="sq" aria-hidden="true">💬</span><span class="lbl">{t('game.chat')}</span>
</button>
{#if active}
<button class="tab" class:active={tab === 'dictionary'} onclick={() => (tab = 'dictionary')} aria-label={t('game.checkWord')}>
<span class="sq">🔎</span>
<button class="tab" class:active={tab === 'dictionary'} onclick={() => (tab = 'dictionary')}>
<span class="sq" aria-hidden="true">🔎</span><span class="lbl">{t('game.dictionary')}</span>
</button>
{/if}
</TabBar>
+2
View File
@@ -65,6 +65,7 @@ export const en = {
'game.hint': 'Hint',
'game.chat': 'Chat',
'game.checkWord': 'Check word',
'game.dictionary': 'Dictionary',
'game.dropGame': 'Drop game',
'game.preview': 'Scores {n}',
'game.previewIllegal': 'Not a legal move',
@@ -149,6 +150,7 @@ export const en = {
'settings.reduceMotion': 'Reduce motion',
'about.title': 'About',
'about.tab': 'Info',
'about.description': 'A multiplatform Scrabble game.',
'about.version': 'Version {v}',
+2
View File
@@ -66,6 +66,7 @@ export const ru: Record<MessageKey, string> = {
'game.hint': 'Подсказка',
'game.chat': 'Чат',
'game.checkWord': 'Проверить слово',
'game.dictionary': 'Словарь',
'game.dropGame': 'Покинуть игру',
'game.preview': 'Очков: {n}',
'game.previewIllegal': 'Недопустимый ход',
@@ -150,6 +151,7 @@ export const ru: Record<MessageKey, string> = {
'settings.reduceMotion': 'Меньше анимаций',
'about.title': 'О программе',
'about.tab': 'Инфо',
'about.description': 'Мультиплатформенная игра в скрабл.',
'about.version': 'Версия {v}',
+8 -8
View File
@@ -45,19 +45,19 @@
{#snippet tabbar()}
<TabBar>
<button class="tab" class:active={tab === 'settings'} onclick={() => (tab = 'settings')} aria-label={t('settings.title')}>
<span class="sq">⚙️</span>
<button class="tab" class:active={tab === 'settings'} onclick={() => (tab = 'settings')}>
<span class="sq" aria-hidden="true">⚙️</span><span class="lbl">{t('settings.title')}</span>
</button>
<button class="tab" class:active={tab === 'profile'} onclick={() => (tab = 'profile')} aria-label={t('profile.title')}>
<span class="sq">👤</span>
<button class="tab" class:active={tab === 'profile'} onclick={() => (tab = 'profile')}>
<span class="sq" aria-hidden="true">👤</span><span class="lbl">{t('profile.title')}</span>
</button>
{#if !guest}
<button class="tab" class:active={tab === 'friends'} onclick={() => (tab = 'friends')} aria-label={t('friends.title')}>
<span class="sq">🤝{#if app.notifications > 0}<span class="badge">{app.notifications}</span>{/if}</span>
<button class="tab" class:active={tab === 'friends'} onclick={() => (tab = 'friends')}>
<span class="sq" aria-hidden="true">🤝{#if app.notifications > 0}<span class="badge">{app.notifications}</span>{/if}</span><span class="lbl">{t('friends.title')}</span>
</button>
{/if}
<button class="tab" class:active={tab === 'about'} onclick={() => (tab = 'about')} aria-label={t('about.title')}>
<span class="sq"></span>
<button class="tab" class:active={tab === 'about'} onclick={() => (tab = 'about')}>
<span class="sq" aria-hidden="true"></span><span class="lbl">{t('about.tab')}</span>
</button>
</TabBar>
{/snippet}