From ee155c9002e553e1119281ab006cfe15ee2f755c Mon Sep 17 00:00:00 2001 From: Light1YT Date: Sun, 21 Jun 2026 00:45:24 +0500 Subject: [PATCH] fix(ptica): restore left-rail to 7 icon+label items with working nav MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cockpit rail had 6 text-only items whose scrollToAnchor targeted non-existent IDs (clicks did nothing) and diverged from the reference. Replace with the prototype's 7 icon+label items (Участок/Потенциал/Продукт/ Экономика/Риски/Сравнение/Отчёты, icons ported from the kit). Discriminated union RailItem {kind:'scroll'|'tab'}: scroll items activate the analysis tab then scrollIntoView the matching section on the next frame; tab items switch the top tab. Add ptica-hero/-potential/-product/-economy/-risks section IDs; port the .nav-item active state (cyan accent + glow + left bar). --- .../analysis/[cad]/ptica/ptica.module.css | 19 ++ .../site-finder/ptica/DevelopmentScan.tsx | 16 +- .../site-finder/ptica/PticaHero.tsx | 4 +- .../site-finder/ptica/PticaShell.tsx | 230 ++++++++++++++++-- .../ptica/cockpit/PticaBottomGrid.tsx | 2 +- .../ptica/cockpit/PticaLowerGrid.tsx | 2 +- .../ptica/cockpit/RecommendedProductCard.tsx | 2 +- 7 files changed, 240 insertions(+), 35 deletions(-) diff --git a/frontend/src/app/site-finder/analysis/[cad]/ptica/ptica.module.css b/frontend/src/app/site-finder/analysis/[cad]/ptica/ptica.module.css index 157f0a78..c3672e2c 100644 --- a/frontend/src/app/site-finder/analysis/[cad]/ptica/ptica.module.css +++ b/frontend/src/app/site-finder/analysis/[cad]/ptica/ptica.module.css @@ -169,6 +169,25 @@ color: var(--text-muted); background: var(--surface); } +/* Active rail item — cyan accent + inset glow + left accent bar (prototype + .nav-item.active / .nav-item.active::before). */ +.navItemActive, +.navItem.navItemActive { + color: var(--accent-cyan); + background: var(--surface); + border-color: var(--border); + box-shadow: inset 0 0 22px var(--glow); +} +.navItemActive::before { + content: ""; + position: absolute; + left: -10px; + top: 14px; + bottom: 14px; + width: 2px; + background: var(--accent-cyan); + box-shadow: 0 0 10px var(--accent-cyan); +} .navFoot { margin-top: auto; display: grid; diff --git a/frontend/src/components/site-finder/ptica/DevelopmentScan.tsx b/frontend/src/components/site-finder/ptica/DevelopmentScan.tsx index be2c4a4f..1f7aac47 100644 --- a/frontend/src/components/site-finder/ptica/DevelopmentScan.tsx +++ b/frontend/src/components/site-finder/ptica/DevelopmentScan.tsx @@ -36,7 +36,7 @@ export function DevelopmentScan({ analysis, onOpenDrawer }: Props) { return ( <> -
+
Development Scan · градостроительный анализ
@@ -60,16 +60,14 @@ export function DevelopmentScan({ analysis, onOpenDrawer }: Props) { drawerKey="market" onOpen={onOpenDrawer} /> -
- -
+

Риски

diff --git a/frontend/src/components/site-finder/ptica/PticaHero.tsx b/frontend/src/components/site-finder/ptica/PticaHero.tsx index 5647d2d7..71411c38 100644 --- a/frontend/src/components/site-finder/ptica/PticaHero.tsx +++ b/frontend/src/components/site-finder/ptica/PticaHero.tsx @@ -30,12 +30,12 @@ export function PticaHero({ analysis, forecastReport, onOpenDrawer }: Props) { const buildGauge = adaptBuildabilityGauge(analysis); return ( -
+
-
+
))} diff --git a/frontend/src/components/site-finder/ptica/cockpit/PticaBottomGrid.tsx b/frontend/src/components/site-finder/ptica/cockpit/PticaBottomGrid.tsx index f1b9951b..262b407a 100644 --- a/frontend/src/components/site-finder/ptica/cockpit/PticaBottomGrid.tsx +++ b/frontend/src/components/site-finder/ptica/cockpit/PticaBottomGrid.tsx @@ -27,7 +27,7 @@ export function PticaBottomGrid({ onOpenDrawer, }: Props) { return ( -
+
diff --git a/frontend/src/components/site-finder/ptica/cockpit/PticaLowerGrid.tsx b/frontend/src/components/site-finder/ptica/cockpit/PticaLowerGrid.tsx index 253af901..64801dea 100644 --- a/frontend/src/components/site-finder/ptica/cockpit/PticaLowerGrid.tsx +++ b/frontend/src/components/site-finder/ptica/cockpit/PticaLowerGrid.tsx @@ -28,7 +28,7 @@ export function PticaLowerGrid({ onOpenDrawer, }: Props) { return ( -
+
+

Recommended Product