fix(ui): terrain-popup закрывается при открытии bottom-sheet (ET-014) #28

Merged
admin merged 6 commits from feature/ET-014-ui-z-index into main 2026-06-04 14:29:16 +03:00
Owner

Summary

  • Реализует ADR-019 (Вариант A) для ET-014: при открытии любого .bottom-sheet через openSheet() принудительно закрывается #terrain-popup и снимается .active с #terrain-toggle.
  • Устраняет z-index конфликт (popup z=500 над sheet z=400) и anti-pattern «два меню одновременно» на desktop без правки CSS-стека — нулевой риск регрессии для #marker-dialog, #search-panel, #ruler-info (REQ-NF-03).
  • Изменён один продакшен-файл: src/web/app.js (+1 helper closeTerrainPopup, +1 вызов в openSheet). 17 строк, обрамлены маркерами // >>> ET-014 sheet-popup yield block.

Test plan

  • tests/unit/sheet_popup.test.js — 8 behavioral JS unit-тестов (node --test):
    • TC-U-02: openSheet('sheet-gps-filters') закрывает открытый popup, снимает .active.
    • REQ-F-04: повторное openSheet() стабильно (sheet остаётся open, без артефактов).
    • REQ-F-06: openSheet() для sheet-route и др. — popup не страдает (no-op когда не открыт).
    • closeTerrainPopup(): no-op при скрытом popup, отписка closeTerrainOnOutside при открытом, защита от null popup.
    • openSheet: ранний выход при отсутствии sheet (popup НЕ трогается); closeSheet зовётся для других открытых sheets.
  • tests/unit/test_sheet_popup.py — pytest-обёртка (9 тестов): статические проверки (маркеры блока, порядок вызовов в openSheet, ровно один вызов closeTerrainPopup()), охранные тесты что z-stack .bottom-sheet/#sheet-backdrop/#marker-dialog/.terrain-popup не тронут, что gps_tracks.js/index.html не правились (ADR §Что НЕ меняется).
  • Все 88 относящихся к фронту тестов (test_base_layer, test_terrain_paint, test_unit_toggle, test_poi_toggle, test_gps_tracks, test_track_download, test_sheet_popup) зелёные локально.
  • e2e (Playwright TC-E-01..TC-E-06, TC-UI-01..TC-UI-08) — в репозитории нет Playwright-инфры, прогон выполняется тестером на test-стенде https://openclaw.mva154.duckdns.org/enduro/ после деплоя.
  • Owner: визуальная приёмка скриншотов AC-01 (mobile 390×844), AC-02 (desktop 1440×900), AC-14 (Москва z12).

ADR

  • docs/work-items/ET-014/06-adr/ADR-019-terrain-popup-yields-to-sheet.md

Refs: ET-014

## Summary - Реализует ADR-019 (Вариант A) для ET-014: при открытии любого `.bottom-sheet` через `openSheet()` принудительно закрывается `#terrain-popup` и снимается `.active` с `#terrain-toggle`. - Устраняет z-index конфликт (popup z=500 над sheet z=400) и anti-pattern «два меню одновременно» на desktop **без правки CSS-стека** — нулевой риск регрессии для `#marker-dialog`, `#search-panel`, `#ruler-info` (REQ-NF-03). - Изменён один продакшен-файл: `src/web/app.js` (+1 helper `closeTerrainPopup`, +1 вызов в `openSheet`). 17 строк, обрамлены маркерами `// >>> ET-014 sheet-popup yield block`. ## Test plan - [x] `tests/unit/sheet_popup.test.js` — 8 behavioral JS unit-тестов (`node --test`): - TC-U-02: `openSheet('sheet-gps-filters')` закрывает открытый popup, снимает `.active`. - REQ-F-04: повторное `openSheet()` стабильно (sheet остаётся `open`, без артефактов). - REQ-F-06: `openSheet()` для `sheet-route` и др. — popup не страдает (no-op когда не открыт). - `closeTerrainPopup()`: no-op при скрытом popup, отписка `closeTerrainOnOutside` при открытом, защита от `null` popup. - `openSheet`: ранний выход при отсутствии sheet (popup НЕ трогается); `closeSheet` зовётся для других открытых sheets. - [x] `tests/unit/test_sheet_popup.py` — pytest-обёртка (9 тестов): статические проверки (маркеры блока, порядок вызовов в `openSheet`, ровно один вызов `closeTerrainPopup()`), охранные тесты что z-stack `.bottom-sheet/#sheet-backdrop/#marker-dialog/.terrain-popup` не тронут, что `gps_tracks.js`/`index.html` не правились (ADR §Что НЕ меняется). - [x] Все 88 относящихся к фронту тестов (`test_base_layer`, `test_terrain_paint`, `test_unit_toggle`, `test_poi_toggle`, `test_gps_tracks`, `test_track_download`, `test_sheet_popup`) зелёные локально. - [ ] e2e (Playwright TC-E-01..TC-E-06, TC-UI-01..TC-UI-08) — в репозитории нет Playwright-инфры, прогон выполняется тестером на test-стенде https://openclaw.mva154.duckdns.org/enduro/ после деплоя. - [ ] Owner: визуальная приёмка скриншотов AC-01 (mobile 390×844), AC-02 (desktop 1440×900), AC-14 (Москва z12). ## ADR - `docs/work-items/ET-014/06-adr/ADR-019-terrain-popup-yields-to-sheet.md` Refs: ET-014
admin added 4 commits 2026-06-04 14:21:31 +03:00
docs: init ET-014 business request
All checks were successful
CI / lint (push) Successful in 5s
CI / test (push) Successful in 9s
CI / build (push) Successful in 2s
bf2c93021d
analyst(ET): auto-commit from analyst run_id=87
All checks were successful
CI / lint (push) Successful in 5s
CI / test (push) Successful in 10s
CI / build (push) Successful in 2s
e796a6cb03
architect(ET): auto-commit from architect run_id=88
All checks were successful
CI / lint (push) Successful in 5s
CI / test (push) Successful in 10s
CI / build (push) Successful in 2s
bc63122221
fix(ui): terrain-popup закрывается при открытии bottom-sheet (ET-014)
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 10s
CI / build (push) Successful in 3s
CI / lint (pull_request) Successful in 4s
CI / test (pull_request) Successful in 9s
CI / build (pull_request) Successful in 2s
39348f6781
При открытии любого .bottom-sheet через openSheet() теперь принудительно
скрывается #terrain-popup и снимается .active с #terrain-toggle. Это
устраняет z-index конфликт (popup z=500 над sheet z=400) и убирает
anti-pattern «два меню одновременно» на desktop без правки CSS-стека
(marker-dialog z=500, search-panel, ruler-info — без регрессий).

Реализация — Вариант A из ADR-019: helper closeTerrainPopup() + один
вызов первой строкой в openSheet() после null-check. Для других sheets
(sheet-route, sheet-recon, sheet-scenic, sheet-link, sheet-gpx) вызов
безопасный no-op, REQ-F-06 выполняется автоматически.

Тесты:
- tests/unit/sheet_popup.test.js — 8 behavioral JS unit-тестов
  (TC-U-02, REQ-F-04, REQ-F-06 + ребра closeTerrainPopup).
- tests/unit/test_sheet_popup.py — pytest-обёртка: статические проверки
  app.js (порядок вызовов в openSheet, маркеры блока), охранные тесты
  что z-stack не тронут и что gps_tracks.js/index.html не правились.

Refs: ET-014
ADR: docs/work-items/ET-014/06-adr/ADR-019-terrain-popup-yields-to-sheet.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
admin added 1 commit 2026-06-04 14:24:57 +03:00
reviewer(ET): auto-commit from reviewer run_id=90
All checks were successful
CI / lint (push) Successful in 4s
CI / lint (pull_request) Successful in 4s
CI / test (push) Successful in 10s
CI / build (push) Successful in 2s
CI / test (pull_request) Successful in 10s
CI / build (pull_request) Successful in 2s
da289233c9
admin added 1 commit 2026-06-04 14:28:36 +03:00
tester(ET): auto-commit from tester run_id=91
All checks were successful
CI / lint (push) Successful in 5s
CI / lint (pull_request) Successful in 4s
CI / test (push) Successful in 12s
CI / build (push) Successful in 2s
CI / test (pull_request) Successful in 9s
CI / build (pull_request) Successful in 2s
59477d8699
admin merged commit 864181e0b1 into main 2026-06-04 14:29:16 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/enduro-trails#28