Skip to content

Add smart zoom visibility for dense map layers#2

Merged
koala73 merged 1 commit intomainfrom
codex/add-smart-zoom-dependent-layer-visibility
Jan 10, 2026
Merged

Add smart zoom visibility for dense map layers#2
koala73 merged 1 commit intomainfrom
codex/add-smart-zoom-dependent-layer-visibility

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Jan 9, 2026

Motivation

  • Dense global layers (military bases, nuclear sites, conflict zones, economic centers, earthquakes) create visual clutter at low zoom and need progressive disclosure.
  • The intent is to auto-hide or fade layers and labels by zoom level while preserving user manual toggles as overrides.
  • Provide subtle UI indicators when a layer is being auto-hidden so users understand why items disappear.

Description

  • Add LAYER_ZOOM_THRESHOLDS and layerZoomOverrides to MapComponent and evaluate layer visibility on zoom via a new updateZoomLayerVisibility() method called from applyTransform().
  • Respect manual toggles by setting an override when a user enables a layer below its minZoom, and toggle an auto-hidden class on the layer toggle button for visual feedback (logic in toggleLayer and enableLayer).
  • Emit data-layer-hidden-<layer> and data-labels-hidden-<layer> attributes on the .map-wrapper to control marker and label visibility, and add CSS transitions and .layer-toggle.auto-hidden styling in src/styles/main.css to fade/hide elements smoothly.
  • Keep existing label overlap logic (updateLabelVisibility) and integrate zoom-driven label/show-label thresholds (showLabels) for progressive disclosure.

Testing

  • Started the development server with npm run dev and Vite reported ready (server running); proxy network errors were logged but the server remained responsive. (succeeded)
  • Ran a headless Playwright script that navigated to the local dev site and saved a screenshot to verify visual behavior (navigation and screenshot completed successfully). (succeeded)

Codex Task

@vercel
Copy link

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
worldmonitor Ready Ready Preview, Comment Jan 9, 2026 7:59pm

@koala73 koala73 merged commit e8328ad into main Jan 10, 2026
2 checks passed
@koala73 koala73 deleted the codex/add-smart-zoom-dependent-layer-visibility branch January 12, 2026 18:47
koala73 added a commit that referenced this pull request Jan 18, 2026
… freshness

Assessment & Documentation:
- Add docs/GEOPOLITICAL_ASSESSMENT.md with full platform analysis
- Strategic improvement roadmap with prioritized recommendations

Quick Win #1 - Data Freshness (intelligence gaps):
- Add getIntelligenceGaps() and getIntelligenceGapSummary() to data-freshness.ts
- Add human-readable messages explaining what analysts CAN'T see
- Add hasCriticalGaps() for alert integration

Quick Win #2 - Escalation Scores:
- Add escalationScore (1-5), escalationTrend, escalationIndicators to Hotspot type
- Update 11 major hotspots with scores (Sahel, Haiti, Horn of Africa, Moscow,
  Beijing, Kyiv, Taipei, Tehran, Tel Aviv, Pyongyang, Sana'a)

Quick Win #3 - Signal Context ("Why It Matters"):
- Add SIGNAL_CONTEXT with whyItMatters, actionableInsight, confidenceNote
- Add getSignalContext() helper for all 10 signal types
- Explains analytical significance of each signal type

Quick Win #4 - Historical Context:
- Add HistoricalContext interface with lastMajorEvent, precedentCount,
  cyclicalRisk fields
- Add whyItMatters field to Hotspot type
- Update major hotspots with historical precedents and geopolitical significance

Quick Win #5 - Propaganda Risk Flags:
- Add PropagandaRisk type and SourceRiskProfile interface
- Add SOURCE_PROPAGANDA_RISK mapping for state media (Xinhua, TASS, RT, CGTN)
- Add getSourcePropagandaRisk() and isStateAffiliatedSource() helpers
- Flag medium-risk state-affiliated sources (Al Jazeera, France 24, DW, etc.)
koala73 added a commit that referenced this pull request Feb 15, 2026
PopulationExposure: replace truncated 4-column table with two-line
card layout (full event name + population/radius meta row).
UCDP: move deaths to column #2 (Country → Deaths → Date → Actors).
@SebastienMelki SebastienMelki added area: map Map, globe, DeckGL visualization performance Performance optimization labels Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: map Map, globe, DeckGL visualization codex performance Performance optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants