Skip to content

Commit 005cdce

Browse files
bloveclaude
andcommitted
fix(ag-ui): map occupies its own column beside the sidebar drawer (not full width)
In Sidebar mode the chat drawer is a solid right rail, but the full-bleed map extended under it, so fitBounds framed stops across the hidden width. Inset the map by the chat lib's published drawer footprint (--ngaf-chat-occupy-right) so it occupies its own column and markers center within the visible area; Popup mode mounts no drawer, so the var is 0 and the map stays full-bleed under the floating bubble. The descendant selector + width:auto beat the map component's own :host { width: 100% } (an over-constrained left/right/width otherwise keeps the full width and silently ignores the inset). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c0907ba commit 005cdce

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

examples/ag-ui/angular/src/app/shell/ag-ui-shell.component.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,18 @@
247247
position: relative;
248248
display: flex;
249249
}
250-
.ag-ui-shell__map {
250+
/* In Sidebar mode the chat drawer is a solid right rail; shrink the map out
251+
from under it so it occupies its own column (not the full browser width) and
252+
markers frame within the visible area. The chat lib publishes the open
253+
drawer's footprint as --ngaf-chat-occupy-right; in Popup mode no drawer
254+
mounts so the var is unset (0) and the map stays full-bleed under the
255+
floating bubble. The descendant selector + width:auto are required to beat
256+
the map component's own `:host { width: 100% }` — otherwise an over-
257+
constrained left/right/width keeps the full width and ignores the inset. */
258+
.ag-ui-shell__app-body .ag-ui-shell__map {
251259
position: absolute;
252-
inset: 0;
260+
inset: 0 var(--ngaf-chat-occupy-right, 0px) 0 0;
261+
width: auto;
253262
}
254263
.ag-ui-shell__itinerary-overlay {
255264
position: absolute;

0 commit comments

Comments
 (0)