|
@@ -144,18 +144,18 @@ export function OverviewTimeline({monitorList}: Props) {
|
|
|
return (
|
|
|
<MonitorListPanel>
|
|
|
<TimelineWidthTracker ref={elementRef} />
|
|
|
- <HeaderControls>
|
|
|
- <ResolutionSelector />
|
|
|
- <SortSelector />
|
|
|
- </HeaderControls>
|
|
|
- <StickyGridLineTimeLabels>
|
|
|
- <BorderlessGridLineTimeLabels
|
|
|
+ <Header>
|
|
|
+ <HeaderControls>
|
|
|
+ <ResolutionSelector />
|
|
|
+ <SortSelector />
|
|
|
+ </HeaderControls>
|
|
|
+ <GridLineTimeLabels
|
|
|
timeWindowConfig={timeWindowConfig}
|
|
|
start={start}
|
|
|
end={nowRef.current}
|
|
|
width={timelineWidth}
|
|
|
/>
|
|
|
- </StickyGridLineTimeLabels>
|
|
|
+ </Header>
|
|
|
<GridLineOverlay
|
|
|
stickyCursor
|
|
|
showCursor={!isLoading}
|
|
@@ -190,42 +190,30 @@ const MonitorListPanel = styled(Panel)`
|
|
|
grid-template-columns: 350px 135px 1fr;
|
|
|
`;
|
|
|
|
|
|
-const HeaderControls = styled(Sticky)`
|
|
|
- display: flex;
|
|
|
- gap: ${space(0.5)};
|
|
|
+const Header = styled(Sticky)`
|
|
|
+ display: grid;
|
|
|
+ grid-column: 1/-1;
|
|
|
+ grid-template-columns: subgrid;
|
|
|
+
|
|
|
z-index: 1;
|
|
|
- padding: ${space(1.5)} ${space(2)};
|
|
|
- grid-column: 1/3;
|
|
|
background: ${p => p.theme.background};
|
|
|
border-top-left-radius: ${p => p.theme.panelBorderRadius};
|
|
|
+ border-top-right-radius: ${p => p.theme.panelBorderRadius};
|
|
|
box-shadow: 0 1px ${p => p.theme.translucentBorder};
|
|
|
|
|
|
&[data-stuck] {
|
|
|
border-radius: 0;
|
|
|
border-left: 1px solid ${p => p.theme.border};
|
|
|
- margin-left: -1px;
|
|
|
+ border-right: 1px solid ${p => p.theme.border};
|
|
|
+ margin: 0 -1px;
|
|
|
}
|
|
|
`;
|
|
|
|
|
|
-// We don't need border here because it is already accomplished via box-shadow below
|
|
|
-const BorderlessGridLineTimeLabels = styled(GridLineTimeLabels)`
|
|
|
- border: none;
|
|
|
-`;
|
|
|
-
|
|
|
-const StickyGridLineTimeLabels = styled(Sticky)`
|
|
|
- > * {
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- z-index: 1;
|
|
|
- background: ${p => p.theme.background};
|
|
|
- border-top-right-radius: ${p => p.theme.panelBorderRadius};
|
|
|
- box-shadow: 0 1px ${p => p.theme.translucentBorder};
|
|
|
-
|
|
|
- &[data-stuck] {
|
|
|
- border-radius: 0;
|
|
|
- border-right: 1px solid ${p => p.theme.border};
|
|
|
- margin-right: -1px;
|
|
|
- }
|
|
|
+const HeaderControls = styled('div')`
|
|
|
+ grid-column: 1/3;
|
|
|
+ display: flex;
|
|
|
+ gap: ${space(0.5)};
|
|
|
+ padding: ${space(1.5)} ${space(2)};
|
|
|
`;
|
|
|
|
|
|
const TimelineWidthTracker = styled('div')`
|