Skip to content

VS-14 — Zone Selection + Ecological Detail Panel #60

Open

Description

@CherryClairette

What to build

Clicking an H3 zone opens a side panel showing the full ecological profile: global score, 5 sub-scores, and score history. One API call returns everything. Score-breakdown (V3, unconfirmed in Notion) is not in scope.

API
GET /v1/zones/{zone_id}?from={bucket_id}&to={bucket_id}
default: last 12 buckets
Response: zone_id, score_global, sub_scores (5 fields), history[] (bucket_id + scores)

Sub-score type (TypeScript)

human_pressure: number | null
vegetation: number | null
biodiversity: number | null
dynamic: number | null
protection: number | null

Acceptance criteria

Panel displays score_global prominently + territory context
All 5 sub-scores rendered null sub-scores show "données indisponibles" — never a fallback value
History rendered as line chart (score_global over time)
Panel closeable; map selection cleared on close
Fetch lives in src/map/hooks/useZoneDetail.ts — not directly in the component
Score-breakdown endpoint NOT included (V3 — unconfirmed in Notion)

Blocked by

VS-07 Map Core v1

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions