diff --git a/mydictionary/static/miniapp.css b/mydictionary/static/miniapp.css index 5b2c1a6..beef295 100644 --- a/mydictionary/static/miniapp.css +++ b/mydictionary/static/miniapp.css @@ -54,7 +54,6 @@ --words-accent-line: color-mix(in srgb, var(--words-accent) 38%, var(--dashboard-line)); --words-surface-raised: color-mix(in srgb, var(--words-accent) 5%, var(--dashboard-surface)); } -#panel-words > header[class~="section-hero"] { display: none; } .swipe-trainer { --surface: var(--dashboard-surface); --radius: var(--dashboard-radius); --danger: var(--dashboard-danger); --muted: var(--dashboard-muted); --line: var(--dashboard-line); min-width: 0; padding: 16px 0 22px; border-bottom: 1px solid var(--line); } .swipe-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .swipe-heading > div { min-width: 0; } diff --git a/mydictionary/templates/miniapp.html b/mydictionary/templates/miniapp.html index 5b01665..d063814 100644 --- a/mydictionary/templates/miniapp.html +++ b/mydictionary/templates/miniapp.html @@ -6,7 +6,7 @@ Lexi — языковой тренер - + {% for section in ('profile', 'words', 'credits', 'languages', 'settings') %} {% endfor %} diff --git a/tests/test_miniapp_brand_controls_v1.py b/tests/test_miniapp_brand_controls_v1.py index f229e53..b3abc02 100644 --- a/tests/test_miniapp_brand_controls_v1.py +++ b/tests/test_miniapp_brand_controls_v1.py @@ -48,7 +48,7 @@ def test_dictionary_shortcut_and_primary_actions_have_tactile_states(self) -> No self.assertIn("@media (prefers-reduced-motion: reduce)", CSS) def test_stylesheet_url_is_versioned_for_telegram_webview_cache(self) -> None: - self.assertIn("miniapp.css') }}?v=20260917-card-modes-v1", HTML) + self.assertIn("miniapp.css') }}?v=20260921-words-banner-v1", HTML) if __name__ == "__main__": diff --git a/tests/test_miniapp_unified_section_headers_v1.py b/tests/test_miniapp_unified_section_headers_v1.py index e0dd04c..c2faeab 100644 --- a/tests/test_miniapp_unified_section_headers_v1.py +++ b/tests/test_miniapp_unified_section_headers_v1.py @@ -60,12 +60,18 @@ def test_shared_header_uses_a_full_width_art_card_with_title_overlay(self) -> No self.assertNotRegex(CSS, r"\.profile-header\s*\{[^}]*min-height:\s*132px") self.assertNotRegex(CSS, r"\.section-art\s*\{[^}]*width:\s*(?:58|72)px") + def test_words_tab_keeps_its_shared_hero_visible(self) -> None: + self.assertNotRegex( + CSS, + r'#panel-words\s*>\s*header\[class~="section-hero"\]\s*\{[^}]*display:\s*none', + ) + def test_shared_hero_is_compact_and_uses_a_fresh_stylesheet_version(self) -> None: header = css_rule(".section-hero") self.assertIn("min-height: 148px", header) self.assertIn("height: clamp(148px, 38vw, 208px)", header) - self.assertIn("miniapp.css') }}?v=20260917-card-modes-v1", HTML) + self.assertIn("miniapp.css') }}?v=20260921-words-banner-v1", HTML) if __name__ == "__main__": diff --git a/tests/test_miniapp_words_clarity_v1.py b/tests/test_miniapp_words_clarity_v1.py index f099abb..6a0a1e0 100644 --- a/tests/test_miniapp_words_clarity_v1.py +++ b/tests/test_miniapp_words_clarity_v1.py @@ -19,7 +19,7 @@ def test_ac1_card_modes_are_the_first_words_task(self): self.assertIn('id="swipe-mode-label"', words) self.assertIn('aria-labelledby="swipe-mode-label"', words) self.assertIn('aria-describedby="swipe-mode-help"', words) - self.assertIn('#panel-words > header[class~="section-hero"] { display: none; }', CSS) + self.assertNotIn('#panel-words > header[class~="section-hero"] { display: none; }', CSS) self.assertIn("lexi-section-words-v1.webp') }}\" alt=\"\" loading=\"eager\"", words) def test_ac2_one_start_action_explains_the_selected_mode(self):