feat(dashboard): tokenized org-chart connector offsets + viewport scroll
Add the connector pseudo-elements and CSS custom properties expected by AgentsView tests: --org-chart-first-child-center-offset and --org-chart-last-child-center-offset (with 50% defaults), the .org-chart-children::before horizontal bar, and a per-child vertical stub via .org-chart-children > .org-chart-node::before. The vertical variant uses --space-sm. Mobile viewport switches overflow from hidden to auto so it owns scroll. Unskip the two tests that asserted on these. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1073,6 +1073,41 @@
|
||||
gap: var(--org-chart-sibling-gap);
|
||||
padding-top: var(--org-chart-children-offset);
|
||||
margin-top: var(--org-chart-connector-gap);
|
||||
--org-chart-first-child-center-offset: 50%;
|
||||
--org-chart-last-child-center-offset: 50%;
|
||||
}
|
||||
|
||||
.org-chart-children::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: var(--org-chart-children-offset, var(--space-md));
|
||||
left: var(--org-chart-first-child-center-offset);
|
||||
right: var(--org-chart-last-child-center-offset);
|
||||
border-top: 1px solid var(--border-color, currentColor);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.org-chart-children > .org-chart-node::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: calc(-1 * var(--org-chart-children-offset));
|
||||
left: 50%;
|
||||
width: 1px;
|
||||
height: var(--org-chart-children-offset);
|
||||
border-left: 1px solid var(--border-color, currentColor);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.agent-org-chart--vertical .org-chart-children::before {
|
||||
top: 0;
|
||||
left: var(--space-sm);
|
||||
right: auto;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
height: auto;
|
||||
border-top: none;
|
||||
border-left: 1px solid var(--border-color, currentColor);
|
||||
}
|
||||
|
||||
.agent-org-chart--vertical {
|
||||
@@ -1230,7 +1265,7 @@
|
||||
min-height: calc(var(--space-2xl) * 4);
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
overflow: auto;
|
||||
overscroll-behavior: contain;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user