8000 fix(dashboard): resolve Leaflet zero-height rendering in TraceView by tamzrod · Pull Request #87 · tamzrod/Librarian · GitHub
[go: up one dir, main page]

Skip to content

fix(dashboard): resolve Leaflet zero-height rendering in TraceView - #87

Merged
tamzrod merged 1 commit into
mainfrom
fix/trace-view-leaflet-zero-height
Jul 2, 2026
Merged

tamzrod merged 1 commit into
mainfrom
fix/trace-view-leaflet-zero-height

Conversation

@tamzrod
@tamzrod tamzrod commented Jul 2, 2026
Copy link
Copy Markdown
Owner

Summary

Fix Leaflet map container collapsing to 0px height by simplifying the Trace layout hierarchy and making height ownership explicit.

Root Cause

The leaflet-container was rendering with height: 0px because flex height propagation was breaking due to:

  1. Excessive nesting depth (6 levels for map path)
  2. overflow-y: auto on .content causing nested scroll containers
  3. Conflicting flex properties across multiple wrapper elements

Changes

Layout.css

  • Changed .content from overflow-y: auto to overflow: hidden
  • Added display: flex and flex-direction: column for proper height propagation

TraceView.tsx

  • Added trace-workspace wrapper around map and event stream
  • Removed unnecessary nesting (.trace-content, .trace-canvas)
  • Added map-area wrapper for consistent sizing

TraceView.css

  • Simplified to flat flex hierarchy with explicit height ownership
  • trace-view uses height: 100vh directly
  • trace-main uses horizontal flex with filter-palette and trace-workspace
  • trace-workspace uses flex-direction: column with flex: 1 and min-height: 0
  • map-area has flex: 1 and min-height: 0 for Leaflet container

MapCanvas.css

  • Removed unnecessary flex properties from .map-canvas
  • Uses simple width: 100%; height: 100% for proper container sizing

New Layout Hierarchy

trace-view (height: 100vh)
├── trace-views (flex: 0 0 auto)
└── trace-main (flex: 1, min-height: 0)
    ├── filter-palette (width: 280px)
    └── trace-workspace (flex: 1, flex-direction: column)
        ├── map-area (flex: 1, min-height: 0)
        │   └── MapCanvas → leaflet-container (height: 100%)
        └── event-stream (flex-shrink: 0, height: 200px)

Success Criteria

  • leaflet-container height > 500px
  • Map visible
  • Markers visible
  • Event stream docked at bottom (200px fixed)
  • No unused blank space
  • No fixed map height hacks (uses flex sizing)

Testing

Build verified successfully with no TypeScript or Vite errors.


This PR was created by an AI agent (OpenHands) on behalf of the user.

@tamzrod can click here to continue refining the PR

Simplify the Trace layout hierarchy to fix Leaflet map container
collapsing to 0px height. The root cause was flex height propagation
breaking due to excessive nesting and conflicting overflow properties.

Changes:
- Layout.css: Change .content from overflow-y:auto to overflow:hidden
  and add display:flex/flex-direction:column for proper height propagation
- TraceView.tsx: Add trace-workspace wrapper, remove unnecessary nesting
- TraceView.css: Simplify to flat flex hierarchy with explicit height
  ownership (trace-view -> trace-main -> trace-workspace -> map-area)
- MapCanvas.css: Remove flex properties from .map-canvas, use simple
  width/height 100% for proper container sizing

New layout hierarchy:
trace-view (height:100vh)
├── trace-views (flex:0 0 auto)
└── trace-main (flex:1, min-height:0)
    ├── filter-palette (width:280px)
    └── trace-workspace (flex:1, flex-dir:column)
        ├── map-area (flex:1, min-height:0)
        └── event-stream (height:200px)

The event stream remains docked at bottom with fixed 200px height.
Leaflet container now receives proper height from parent chain.
@tamzrod
tamzrod marked this pull request as ready for review July 2, 2026 10:56
@tamzrod
tamzrod merged commit 8a23159 into main Jul 2, 2026
3 of 7 checks passed
@tamzrod
tamzrod deleted the fix/trace-view-leaflet-zero-height branch July 6, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0