Skip to content

Commit 8290fee

Browse files
authored
fix: remove accidental scrollbar from deployment banner (#10616)
* chore: clean up DeploymentBannerView markup * fix: remove extra scrollbar * refactor: remove needless calc call
1 parent 61fac2d commit 8290fee

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

site/src/components/Dashboard/DeploymentBanner/DeploymentBannerView.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@ export interface DeploymentBannerViewProps {
7575
export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
7676
const { health, stats, fetchStats } = props;
7777
const theme = useTheme();
78+
7879
const aggregatedMinutes = useMemo(() => {
7980
if (!stats) {
8081
return;
8182
}
8283
return dayjs(stats.collected_at).diff(stats.aggregated_from, "minutes");
8384
}, [stats]);
84-
const displayLatency = stats?.workspaces.connection_latency_ms.P50 || -1;
85+
8586
const [timeUntilRefresh, setTimeUntilRefresh] = useState(0);
8687
useEffect(() => {
8788
if (!stats || !fetchStats) {
@@ -130,7 +131,7 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
130131
justify-content: center;
131132
background-color: ${unhealthy ? colors.red[10] : undefined};
132133
padding: 0 12px;
133-
height: ${bannerHeight}px;
134+
height: 100%;
134135
color: #fff;
135136
136137
& svg {
@@ -151,10 +152,13 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
151152
pointer-events: none;
152153
`;
153154

155+
const displayLatency = stats?.workspaces.connection_latency_ms.P50 || -1;
156+
154157
return (
155158
<div
156159
css={{
157160
position: "sticky",
161+
lineHeight: 1,
158162
height: bannerHeight,
159163
bottom: 0,
160164
zIndex: 1,
@@ -216,6 +220,7 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
216220
</div>
217221
)}
218222
</Tooltip>
223+
219224
<div css={styles.group}>
220225
<div css={styles.category}>Workspaces</div>
221226
<div css={styles.values}>
@@ -245,6 +250,7 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
245250
/>
246251
</div>
247252
</div>
253+
248254
<div css={styles.group}>
249255
<Tooltip title={`Activity in the last ~${aggregatedMinutes} minutes`}>
250256
<div css={styles.category}>Transmission</div>
@@ -279,6 +285,7 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
279285
</Tooltip>
280286
</div>
281287
</div>
288+
282289
<div css={styles.group}>
283290
<div css={styles.category}>Active Connections</div>
284291

@@ -317,6 +324,7 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
317324
</Tooltip>
318325
</div>
319326
</div>
327+
320328
<div
321329
css={{
322330
color: theme.palette.text.primary,

0 commit comments

Comments
 (0)