From ceaafa2d69305df7f58134c58a06b208d0b0d3e9 Mon Sep 17 00:00:00 2001 From: bot-backend Date: Sun, 26 Jul 2026 23:22:49 +0300 Subject: [PATCH] =?UTF-8?q?fix(tradein/v2):=20=D0=B2=D0=B5=D1=80=D0=BD?= =?UTF-8?q?=D1=83=D1=82=D1=8C=20=D0=B0=D0=B4=D1=80=D0=B5=D1=81=D0=BD=D1=83?= =?UTF-8?q?=D1=8E=20=D0=BA=D0=B0=D1=80=D1=82=D0=BE=D1=87=D0=BA=D1=83=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B2=D0=B5=D1=80=D1=85=20=D0=BA=D0=B0=D1=80=D1=82?= =?UTF-8?q?=D1=8B=20=D0=B8=20=D0=BA=D0=BE=D0=BE=D1=80=D0=B4=D0=B8=D0=BD?= =?UTF-8?q?=D0=B0=D1=82=D1=8B=20=D0=BF=D1=80=D0=B8=20restore-by-id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Две регрессии, найденные проверкой на проде после #2528/#2529. 1. Адрес и показатель локации исчезли из шапки. .leaflet-container имеет position:relative и z-index:auto, то есть НЕ создаёт контекст наложения — его внутренние панели (tiles 200 ... popup 700) конкурируют напрямую с соседями, и карточка с z-index:auto оказалась ПОД картой. Проставлен явный z-index: 750 карточке и 500 градиенту. Атрибуция Leaflet (800) стоит справа внизу и с левой карточкой не пересекается, ссылка остаётся кликабельной. 2. Карта в блоке 01 показывала заглушку «выберите адрес» на КАЖДОЙ оценке, восстановленной по ссылке, хотя поле адреса заполнено: карта работает от координат, а initialValues их не прокидывал — они приходили только через выбор подсказки геокодера. Добавлены lat/lon из estimate.target_lat/lon. Затрагивало все шаренные ссылки, историю и переход из PDF. --- tradein-mvp/frontend/src/app/v2/page.tsx | 7 +++++++ .../frontend/src/components/trade-in/v2/HeroBar.tsx | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/tradein-mvp/frontend/src/app/v2/page.tsx b/tradein-mvp/frontend/src/app/v2/page.tsx index 91f13305..834a1a85 100644 --- a/tradein-mvp/frontend/src/app/v2/page.tsx +++ b/tradein-mvp/frontend/src/app/v2/page.tsx @@ -681,6 +681,13 @@ export default function TradeInV2Page() { house_type: estimate.house_type ?? undefined, repair_state: estimate.repair_state ?? undefined, has_balcony: estimate.has_balcony ?? undefined, + // Without these the 01 map falls back to its "pick an address" + // placeholder on every restored estimate (shared link, history, + // PDF flow) even though the address field is populated — the map + // keys off coords, not the address string, and only the geocode + // suggestion path used to supply them. + lat: estimate.target_lat ?? undefined, + lon: estimate.target_lon ?? undefined, } : undefined, [estimate], diff --git a/tradein-mvp/frontend/src/components/trade-in/v2/HeroBar.tsx b/tradein-mvp/frontend/src/components/trade-in/v2/HeroBar.tsx index 069602b9..c1e77d35 100644 --- a/tradein-mvp/frontend/src/components/trade-in/v2/HeroBar.tsx +++ b/tradein-mvp/frontend/src/components/trade-in/v2/HeroBar.tsx @@ -476,6 +476,9 @@ export default function HeroBar({ background: "linear-gradient(90deg,rgba(238,244,250,.96) 0%,rgba(238,244,250,.5) 22%,transparent 40%)", pointerEvents: "none", + // Above Leaflet's tile pane (200) / overlay pane (400); below the + // marker (600) so the subject pin still reads through the fade. + zIndex: 500, }} /> @@ -487,6 +490,15 @@ export default function HeroBar({ top: "50%", transform: "translateY(-50%)", width: 182, + // MUST be set explicitly. .leaflet-container is position:relative + // with z-index:auto, so it does NOT open a stacking context — its + // internal panes (tiles 200 … popup 700) compete directly with + // these siblings, and an auto/0 card is painted UNDER the map. + // Shipped without this in #2529 and the address + location figure + // vanished from the hero on prod. 750 clears every pane; the + // attribution control (800) sits bottom-right and never overlaps + // this left-anchored card, so its link stays clickable. + zIndex: 750, background: tokens.surface.w72, backdropFilter: "blur(5px)", border: `1px solid ${tokens.line}`,