Skip to content

Commit 71453fa

Browse files
committed
fix dashboard UI: restricted row styling + replays empty state
- User detail page: restyle the Restricted row so it matches the EditableInput appearance used by sibling fields (rounded border, ring, shadow, h-8). Previously it was a bare button with rounded-md hover styling that looked visually inconsistent with the rest of the user details grid. - Analytics > Replays: replace the bare "No session replays yet" empty state with a short description of what session replays do and a docs link to https://docs.stack-auth.com/docs/apps/analytics so new users can discover how to enable them.
1 parent f89b97b commit 71453fa

2 files changed

Lines changed: 26 additions & 14 deletions

File tree

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/replays/page-client.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,11 +1955,21 @@ export default function PageClient() {
19551955
</Typography>
19561956
</div>
19571957
) : (
1958-
<div className="text-center p-6">
1958+
<div className="text-center p-6 max-w-md mx-auto">
19591959
<MonitorPlayIcon className="h-12 w-12 text-muted-foreground/40 mx-auto" />
1960-
<Typography className="mt-3 text-sm font-medium text-muted-foreground">
1960+
<Typography className="mt-3 text-sm font-medium">
19611961
No session replays yet
19621962
</Typography>
1963+
<Typography className="mt-2 text-sm text-muted-foreground">
1964+
Session replays let you watch how users interact with your app to debug issues and understand user behavior. Install the analytics SDK in your app to start capturing replays.
1965+
</Typography>
1966+
<StyledLink
1967+
href="https://docs.stack-auth.com/docs/apps/analytics"
1968+
target="_blank"
1969+
className="mt-3 inline-block text-sm"
1970+
>
1971+
Learn more in the docs
1972+
</StyledLink>
19631973
</div>
19641974
)}
19651975
</div>

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/users/[userId]/page-client.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -321,18 +321,20 @@ function RestrictedStatusRow({ user }: { user: ServerUser }) {
321321
return (
322322
<>
323323
<UserInfo icon={<ProhibitIcon size={16}/>} name="Restricted">
324-
<button
325-
type="button"
326-
onClick={() => setDialogOpen(true)}
327-
className={cn(
328-
"w-full text-left px-1 py-0 rounded-md text-sm",
329-
"hover:ring-1 hover:ring-slate-300 dark:hover:ring-gray-500 hover:bg-slate-50 dark:hover:bg-gray-800 hover:cursor-pointer",
330-
"focus:outline-none focus-visible:ring-1 focus-visible:ring-slate-500 dark:focus-visible:ring-gray-50 focus-visible:bg-slate-100 dark:focus-visible:bg-gray-800",
331-
"transition-colors hover:transition-none",
332-
)}
333-
>
334-
{displayValue}
335-
</button>
324+
<div className="flex items-center relative w-full">
325+
<button
326+
type="button"
327+
onClick={() => setDialogOpen(true)}
328+
className={cn(
329+
"stack-scope flex w-full items-center rounded-xl border border-black/[0.08] dark:border-white/[0.06] bg-white/80 dark:bg-foreground/[0.03] shadow-sm ring-1 ring-black/[0.08] dark:ring-white/[0.06]",
330+
"h-8 px-3 text-sm text-left text-muted-foreground",
331+
"transition-all duration-150 hover:transition-none hover:bg-white dark:hover:bg-foreground/[0.06] hover:cursor-pointer",
332+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-foreground/[0.1]",
333+
)}
334+
>
335+
<span className="truncate">{displayValue}</span>
336+
</button>
337+
</div>
336338
</UserInfo>
337339
<RestrictionDialog
338340
user={user}

0 commit comments

Comments
 (0)