Skip to content

Commit f362650

Browse files
authored
Update setup loading screen (#926)
1 parent c38301b commit f362650

2 files changed

Lines changed: 58 additions & 12 deletions

File tree

‎desktop/src/app/App.tsx‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,24 @@ import { createSproutQueryClient } from "@/shared/api/queryClient";
2020
import { isSharedIdentity as isSharedIdentityCmd } from "@/shared/api/tauri";
2121
import { listenForDeepLinks } from "@/shared/deep-link";
2222

23+
const LOADING_TEXT = "Setting up your workspace...";
24+
2325
function AppLoadingGate() {
2426
return (
25-
<div className="flex min-h-dvh items-center justify-center bg-[radial-gradient(circle_at_top,hsl(var(--primary)/0.14),transparent_48%),linear-gradient(180deg,hsl(var(--background)),hsl(var(--muted)/0.55))] px-4 py-8">
26-
<div className="w-full max-w-sm rounded-[28px] border border-border/70 bg-background/92 p-8 shadow-2xl backdrop-blur-sm">
27-
<p className="text-xs font-medium uppercase tracking-[0.2em] text-muted-foreground">
28-
Sprout
29-
</p>
30-
<h1 className="mt-3 text-2xl font-semibold tracking-tight text-foreground">
31-
Checking your setup
32-
</h1>
33-
<p className="mt-2 text-sm leading-6 text-muted-foreground">
34-
One sec while we load your profile.
35-
</p>
36-
</div>
27+
<div
28+
className="sprout-setup-loading-shell flex min-h-dvh flex-col items-center justify-center overflow-hidden px-6 py-10"
29+
data-testid="app-loading-gate"
30+
role="status"
31+
>
32+
<h1
33+
aria-live="polite"
34+
className="mt-6 text-center text-3xl font-semibold tracking-tight text-foreground"
35+
>
36+
<span className="sr-only">{LOADING_TEXT}</span>
37+
<span aria-hidden="true" className="sprout-setup-loading-text">
38+
{LOADING_TEXT}
39+
</span>
40+
</h1>
3741
</div>
3842
);
3943
}

‎desktop/src/shared/styles/globals.css‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,48 @@
8080
transform-origin: center;
8181
}
8282

83+
.sprout-setup-loading-shell {
84+
background-image:
85+
radial-gradient(circle at top, hsl(var(--primary) / 0.18), transparent 46%),
86+
radial-gradient(
87+
circle at 50% 72%,
88+
hsl(var(--foreground) / 0.08),
89+
transparent 34%
90+
),
91+
linear-gradient(180deg, hsl(var(--background)), hsl(var(--muted) / 0.55));
92+
}
93+
94+
.sprout-setup-loading-text {
95+
animation: sprout-setup-character-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1)
96+
both;
97+
backface-visibility: hidden;
98+
display: inline-block;
99+
opacity: 0;
100+
transform: translate3d(0, 32px, 0);
101+
transform-origin: 50% 55%;
102+
will-change: transform, opacity;
103+
}
104+
105+
@keyframes sprout-setup-character-rise {
106+
from {
107+
opacity: 0;
108+
transform: translate3d(0, 32px, 0);
109+
}
110+
111+
to {
112+
opacity: 1;
113+
transform: translate3d(0, 0, 0);
114+
}
115+
}
116+
117+
@media (prefers-reduced-motion: reduce) {
118+
.sprout-setup-loading-text {
119+
animation: none;
120+
opacity: 1;
121+
transform: none;
122+
}
123+
}
124+
83125
.sprout-avatar-hue-scrubber {
84126
background: linear-gradient(
85127
90deg,

0 commit comments

Comments
 (0)