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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dashboard/src/components/Layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@

.content {
flex: 1;
overflow-y: auto;
overflow: hidden;
padding: 0;
display: flex;
flex-direction: column;
}
9 changes: 2 additions & 7 deletions dashboard/src/components/MapCanvas.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
/* MapCanvas - Leaflet map with photo markers */

.map-canvas {
flex: 1 1 auto; /* Grow to fill available space */
width: 100%;
height: 100%;
position: relative;
background: var(--bg-primary, #1a1a1a);
display: flex;
flex-direction: column;
min-height: 0; /* Critical for Leaflet */
}

.map-container {
flex: 1;
width: 100%;
height: 100%;
min-height: 0; /* Allow shrinking */
}

/* Leaflet customizations */
.leaflet-container {
width: 100%;
height: 100%;
min-height: 0;
background: var(--bg-primary, #1a1a1a);
font-family: inherit;
}
Expand Down
39 changes: 20 additions & 19 deletions dashboard/src/pages/TraceView.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,40 @@
.trace-view {
display: flex;
flex-direction: column;
height: calc(100vh - 60px); /* Subtract header height */
height: 100vh;
overflow: hidden;
}

.trace-main {
display: flex;
flex: 1;
flex-direction: column; /* Stack content vertically */
min-height: 0; /* Allow flex child to shrink */
min-height: 0;
overflow: hidden;
position: relative; /* For FilterPalette positioning */
}

.trace-content {
.trace-workspace {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
min-height: 0; /* Allow flex child to shrink */
overflow: hidden;
}

.trace-canvas {
flex: 1 1 auto; /* Grow to fill available space */
.map-area {
flex: 1;
min-height: 0;
position: relative;
overflow: hidden;
min-height: 0; /* Critical for Leaflet map */
height: 100%; /* Ensure height propagates to map container */
}

/* Event stream docked at bottom */
.event-stream {
flex-shrink: 0; /* Don't shrink - fixed height */
.placeholder-view {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted, #666);
font-size: 14px;
background: var(--bg-primary, #1a1a1a);
}

/* View mode tabs */
Expand All @@ -45,6 +47,7 @@
padding: 12px 16px;
background: var(--bg-secondary, #242424);
border-bottom: 1px solid var(--border-color, #333);
flex: 0 0 auto;
}

.trace-view-tab {
Expand Down Expand Up @@ -93,12 +96,6 @@
}

/* Responsive */
@media (max-width: 1024px) {
.filter-palette {
width: 240px;
}
}

@media (max-width: 768px) {
.trace-main {
flex-direction: column;
Expand All @@ -111,4 +108,8 @@
border-right: none;
border-bottom: 1px solid var(--border-color, #333);
}

.trace-workspace {
flex-direction: column;
}
}
39 changes: 13 additions & 26 deletions dashboard/src/pages/TraceView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ export default function TraceView() {
{/* Filter palette */}
<FilterPalette />

{/* Content area */}
<div className="trace-content">
<div className="trace-canvas">
{/* Workspace - contains map and event stream */}
<div className="trace-workspace">
{/* Map area */}
<div className="map-area">
{viewMode === 'map' && (
<MapCanvas
filters={filters}
Expand All @@ -122,38 +123,24 @@ export default function TraceView() {
/>
)}
{viewMode === 'timeline' && (
<div style={{
flex: 1,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
color: 'var(--text-muted, #666)',
fontSize: '14px'
}}>
<div className="placeholder-view">
Timeline view coming soon...
</div>
)}
{viewMode === 'grid' && (
<div style={{
flex: 1,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
color: 'var(--text-muted, #666)',
fontSize: '14px'
}}>
<div className="placeholder-view">
Grid view coming soon...
</div>
)}
</div>
</div>

{/* Event stream - docked to bottom */}
<EventStream
filters={filters}
>
selectedEventId={selectedDocumentId || undefined}
/>
{/* Event stream - docked at bottom */}
<EventStream
filters={filters}
>
selectedEventId={selectedDocumentId || undefined}
/>
</div>
</div>

{/* Photo popup */}
Expand Down
Loading
0