feat(client): unified EmptyState across all pages and table empties

- New EmptyState + EmptyStateIllustration components: stacked-cards SVG
  with grid background, theme-aware light/dark palette.
- Variants: default (centered with title + description), compact
  (horizontal, in-section), fullscreen (vertically centers in viewport).
- Wired into Checks, Incidents, Logs (Logs+Queue tabs), Notifications,
  Maintenance, Status pages, and Team tab — each with i18n title +
  description and a fullscreen layout when truly empty.
- Table.EmptyView now wraps the EmptyState in a divider-bordered card
  so short messages no longer look orphaned.
- Incidents Option-A short-circuit: when summary.total === 0, replace
  the whole page chrome with EmptyState; otherwise keep filters + cards.
- Fallback.tsx (BaseFallback / EmptyFallback / EmptyMonitorFallback /
  ErrorFallback) refactored to delegate to EmptyState.
This commit is contained in:
gorkem-bwl committed 2026-04-25 23:26:34 -04:00
1 parent ff208710d7
commit 031a6fdf3c
12 files changed
+188 -145

No files matched your search

@@ -32,32 +32,29 @@ export const ErrorFallback = ({
}) => {
return (
<EmptyState
fullscreen
title={title}
description={subtitle}
/>
);
};
const bulletsToDescription = (bullets: unknown): string | undefined => {
if (!Array.isArray(bullets) || bullets.length === 0) return undefined;
return bullets.join(" • ");
};
export const EmptyFallback = ({
title,
bullets,
description,
actionButtonText,
actionLink,
}: {
title: string;
bullets: unknown;
description?: string;
actionButtonText: string;
actionLink: string;
}) => {
return (
<EmptyState
fullscreen
title={title}
description={bulletsToDescription(bullets)}
description={description}
actionText={actionButtonText}
actionTo={actionLink}
/>
@@ -66,20 +63,21 @@ export const EmptyFallback = ({
export const EmptyMonitorFallback = ({
title,
bullets,
description,
actionButtonText,
actionLink,
}: {
page: string;
title: string;
bullets: unknown;
description?: string;
actionButtonText: string;
actionLink: string;
}) => {
return (
<EmptyState
fullscreen
title={title}
description={bulletsToDescription(bullets)}
description={description}
actionText={actionButtonText}
actionTo={actionLink}
/>