Skip to content

Commit

Permalink
dashboard: improvements to isDisconnected state (#34614)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
atrakh authored and Convex, Inc. committed Feb 24, 2025
1 parent 3505a6b commit 6461305
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions npm-packages/dashboard-common/src/lib/deploymentContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ function DeploymentWithConnectionState({
setConnectionState(
nextConnectionState.isWebSocketConnected ? "Connected" : "Disconnected",
);
}, 5000);
}, 2500);
return () => clearInterval(checkConnection);
});
useEffect(() => {
Expand Down Expand Up @@ -426,7 +426,7 @@ function DeploymentWithConnectionState({
function LocalDeploymentDisconnectOverlay() {
return (
<div
className="absolute z-50 flex h-full w-full items-center justify-center"
className="absolute z-50 mt-[3.5rem] flex h-[calc(100vh-3.5rem)] w-full items-center justify-center"
style={{
backdropFilter: "blur(0.5rem)",
}}
Expand Down Expand Up @@ -454,7 +454,7 @@ function SelfHostedDisconnectOverlay({
}) {
return (
<div
className="absolute z-50 flex h-full w-full items-center justify-center"
className="absolute z-50 mt-[3.5rem] flex h-[calc(100vh-3.5rem)] w-full items-center justify-center"
style={{
backdropFilter: "blur(0.5rem)",
}}
Expand Down

0 comments on commit 6461305

Please sign in to comment.