Skip to content

Commit 6461305

Browse files
atrakhConvex, Inc.
authored andcommitted
dashboard: improvements to isDisconnected state (#34614)
- Make sure the disconnected overlay shows below the header (by hardcoding the height and margin-top to make space for the header) - Reduce the interval for checking if disconnected from the dev deployment from 5s to 2.5s for a more responsive feel GitOrigin-RevId: 5cdf161caaf0f6bd842c3f0b2bc02fdd8bb74a82
1 parent 3505a6b commit 6461305

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

npm-packages/dashboard-common/src/lib/deploymentContext.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ function DeploymentWithConnectionState({
392392
setConnectionState(
393393
nextConnectionState.isWebSocketConnected ? "Connected" : "Disconnected",
394394
);
395-
}, 5000);
395+
}, 2500);
396396
return () => clearInterval(checkConnection);
397397
});
398398
useEffect(() => {
@@ -426,7 +426,7 @@ function DeploymentWithConnectionState({
426426
function LocalDeploymentDisconnectOverlay() {
427427
return (
428428
<div
429-
className="absolute z-50 flex h-full w-full items-center justify-center"
429+
className="absolute z-50 mt-[3.5rem] flex h-[calc(100vh-3.5rem)] w-full items-center justify-center"
430430
style={{
431431
backdropFilter: "blur(0.5rem)",
432432
}}
@@ -454,7 +454,7 @@ function SelfHostedDisconnectOverlay({
454454
}) {
455455
return (
456456
<div
457-
className="absolute z-50 flex h-full w-full items-center justify-center"
457+
className="absolute z-50 mt-[3.5rem] flex h-[calc(100vh-3.5rem)] w-full items-center justify-center"
458458
style={{
459459
backdropFilter: "blur(0.5rem)",
460460
}}

0 commit comments

Comments
 (0)