Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mydictionary/static/miniapp.css
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion mydictionary/templates/miniapp.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="color-scheme" content="light dark">
<title>Lexi — языковой тренер</title>
<link rel="icon" href="{{ url_for('static', filename='mascot/lexi-telegram-avatar-v1.jpg') }}">
<link rel="stylesheet" href="{{ url_for('miniapp_static', filename='miniapp.css') }}?v=20260917-card-modes-v1">
<link rel="stylesheet" href="{{ url_for('miniapp_static', filename='miniapp.css') }}?v=20260921-words-banner-v1">
{% for section in ('profile', 'words', 'credits', 'languages', 'settings') %}
<link rel="preload" as="image" type="image/webp" href="{{ url_for('static', filename='miniapp/lexi-section-' ~ section ~ '-v1.webp') }}" fetchpriority="{{ 'high' if section == 'profile' else 'low' }}">
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_miniapp_brand_controls_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down
8 changes: 7 additions & 1 deletion tests/test_miniapp_unified_section_headers_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down
2 changes: 1 addition & 1 deletion tests/test_miniapp_words_clarity_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading