Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

PRD-9599: Make loading skeletons visible on base16 themes (#6851)

Andrew Mikofalvyc507479796f2
diff --git a/.changeset/loading-placeholders-every-theme.md b/.changeset/loading-placeholders-every-theme.md
new file mode 100644
index 000000000..6e60e0cfd
--- /dev/null
+++ b/.changeset/loading-placeholders-every-theme.md
@@ -0,0 +1,5 @@
+---
+'@inkeep/open-knowledge': patch
+---
+
+Loading placeholders are now visible on every color theme.
diff --git a/packages/app/src/components/CreatedItemsList.tsx b/packages/app/src/components/CreatedItemsList.tsx
index 0dbe1c078..01588dcd4 100644
--- a/packages/app/src/components/CreatedItemsList.tsx
+++ b/packages/app/src/components/CreatedItemsList.tsx
@@ -4,6 +4,7 @@ import { Trans, useLingui } from '@lingui/react/macro';
import { File, Folder, Hexagon, type LucideIcon, Puzzle } from 'lucide-react';
import { Fragment } from 'react';
import { LINT_PLUGIN_META } from '@/components/settings/lint-plugin-meta';
+import { Skeleton } from '@/components/ui/skeleton';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import type { OkScaffoldPlan, OkSeedPackInfo } from '@/lib/desktop-bridge-types';
import { skillDisplayName } from '@/lib/skill-scope';
@@ -19,10 +20,10 @@ export function CreatedItemsSkeleton({ rowCount }: { rowCount: number }) {
<ul className="space-y-2">
{Array.from({ length: rowCount }, (_, i) => i).map((i) => (
<li key={`seed-skeleton-${i}`} aria-hidden="true" className="flex items-center gap-3">
- <div className="size-8 shrink-0 animate-pulse rounded-lg bg-muted" />
+ <Skeleton className="size-8 shrink-0 rounded-lg" />
<div className="min-w-0 flex-1 py-0.5">
- <span className="block h-3.5 w-28 animate-pulse rounded bg-muted" />
- <span className="mt-2 block h-3 w-4/5 animate-pulse rounded bg-muted" />
+ <Skeleton className="h-3.5 w-28 rounded" />
+ <Skeleton className="mt-2 h-3 w-4/5 rounded" />
</div>
</li>
))}
diff --git a/packages/app/src/components/PackCardGrid.tsx b/packages/app/src/components/PackCardGrid.tsx
index 84d03d27c..170d5f974 100644
--- a/packages/app/src/components/PackCardGrid.tsx
+++ b/packages/app/src/components/PackCardGrid.tsx
@@ -15,6 +15,7 @@ import {
import { useEffect, useState } from 'react';
import { Button } from '@/components/ui/button';
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';
+import { Skeleton } from '@/components/ui/skeleton';
import { Spinner } from '@/components/ui/spinner';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import type { OkPackId, OkSeedPackInfo } from '@/lib/desktop-bridge-types';
@@ -245,13 +246,13 @@ function PackCard({ pack, onSelect }: PackCardProps) {
function PackCardSkeleton() {
return (
<div className="flex h-full min-h-[200px] flex-col items-start gap-4 rounded-xl border border-border/60 bg-card p-6">
- <span className="size-10 animate-pulse rounded-lg bg-muted" aria-hidden="true">
+ <Skeleton className="size-10 rounded-lg" aria-hidden="true">
<Spinner aria-hidden="true" className="size-5 text-muted-foreground opacity-0" />
- </span>
+ </Skeleton>
<div className="flex w-full flex-col gap-2">
- <div className="h-4 w-1/2 animate-pulse rounded bg-muted" />
- <div className="h-3 w-full animate-pulse rounded bg-muted" />
- <div className="h-3 w-4/5 animate-pulse rounded bg-muted" />
+ <Skeleton className="h-4 w-1/2 rounded" />
+ <Skeleton className="h-3 w-full rounded" />
+ <Skeleton className="h-3 w-4/5 rounded" />
</div>
</div>
);
diff --git a/packages/app/src/components/SkillBundlePreview.tsx b/packages/app/src/components/SkillBundlePreview.tsx
index 6dbf56eae..3c6a72096 100644
--- a/packages/app/src/components/SkillBundlePreview.tsx
+++ b/packages/app/src/components/SkillBundlePreview.tsx
@@ -15,6 +15,7 @@ import { ProseFindBar } from '@/components/ProseFindBar';
import { SkillCostValue } from '@/components/SkillCostValue';
import { SkillMarkdownViewer } from '@/components/SkillMarkdownViewer';
import { SkillModeBanner } from '@/components/SkillModeBanner';
+import { Skeleton } from '@/components/ui/skeleton';
import { useFindInViewer } from '@/hooks/use-find-in-viewer';
import { subscribeToSkillsChanged } from '@/lib/documents-events';
import { skillTint } from '@/lib/skill-tint';
@@ -200,9 +201,9 @@ export function SkillBundlePreview({
<div className="editor-doc-scroll min-h-0 flex-1 overflow-auto subtle-scrollbar scroll-fade-mask">
<div className="editor-content-aligned pt-6">
<div className="space-y-3">
- <div className="h-6 w-2/3 animate-pulse rounded bg-muted" />
+ <Skeleton className="h-6 w-2/3 rounded" />
{['a', 'b', 'c', 'd', 'e'].map((id) => (
- <div key={id} className="h-4 w-11/12 animate-pulse rounded bg-muted" />
+ <Skeleton key={id} className="h-4 w-11/12 rounded" />
))}
</div>
</div>
diff --git a/packages/app/src/components/ui/loading-image.tsx b/packages/app/src/components/ui/loading-image.tsx
index 510ae313e..3308dcb79 100644
--- a/packages/app/src/components/ui/loading-image.tsx
+++ b/packages/app/src/components/ui/loading-image.tsx
@@ -126,7 +126,7 @@ export function LoadingImage({
role="status"
aria-busy="true"
aria-label={t`Loading image`}
- className="absolute inset-0 animate-pulse rounded-md bg-muted motion-reduce:animate-none"
+ className="absolute inset-0 animate-pulse rounded-md bg-foreground/10 motion-reduce:animate-none"
/>
)}
<img
diff --git a/packages/app/src/components/ui/skeleton.tsx b/packages/app/src/components/ui/skeleton.tsx
index 69c99b8d7..c86e1f231 100644
--- a/packages/app/src/components/ui/skeleton.tsx
+++ b/packages/app/src/components/ui/skeleton.tsx
@@ -4,7 +4,7 @@ function Skeleton({ className, ...props }: React.ComponentProps<'div'>) {
return (
<div
data-slot="skeleton"
- className={cn('animate-pulse rounded-md bg-muted', className)}
+ className={cn('animate-pulse rounded-md bg-foreground/10', className)}
{...props}
/>
);
diff --git a/packages/app/src/editor/components/ExcalidrawEmbed.tsx b/packages/app/src/editor/components/ExcalidrawEmbed.tsx
index f71852d5d..d54864894 100644
--- a/packages/app/src/editor/components/ExcalidrawEmbed.tsx
+++ b/packages/app/src/editor/components/ExcalidrawEmbed.tsx
@@ -5,6 +5,7 @@ import { AlertTriangle, ExternalLink } from 'lucide-react';
import { useEffect, useRef, useState } from 'react';
import { Button } from '@/components/ui/button';
import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog';
+import { Skeleton } from '@/components/ui/skeleton';
import { hashFromDocName } from '@/lib/doc-hash';
import '@/lib/excalidraw-env';
import { type ExcalidrawScene, restoreScene } from '@/lib/excalidraw-scene.ts';
@@ -348,9 +349,7 @@ export function ExcalidrawEmbed({
/>
</div>
) : null}
- {isLoading ? (
- <div className="m-3 min-h-16 animate-pulse rounded-md bg-muted/40" aria-hidden="true" />
- ) : null}
+ {isLoading ? <Skeleton className="m-3 min-h-16" aria-hidden="true" /> : null}
{boardDocName && !showError ? (
<Button
asChild
diff --git a/packages/app/src/editor/image-upload/index.ts b/packages/app/src/editor/image-upload/index.ts
index 8af777057..d44ad17cf 100644
--- a/packages/app/src/editor/image-upload/index.ts
+++ b/packages/app/src/editor/image-upload/index.ts
@@ -37,7 +37,7 @@ interface UploadPluginState {
function createSkeletonWidget(file?: File): HTMLElement {
const el = document.createElement('div');
el.className =
- 'image-upload-skeleton w-full h-40 rounded-md bg-muted animate-pulse motion-reduce:animate-none my-2';
+ 'image-upload-skeleton w-full h-40 rounded-md bg-foreground/10 animate-pulse motion-reduce:animate-none my-2';
el.setAttribute('data-upload-widget', 'loading');
el.setAttribute('role', 'status');
const fileName = file?.name;