Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep chat media at a stable size while it loads #9938

Mergedjuliusmarmingemerged 6 commits intomain fromrefs/pull/9938/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 3 additions and 1 deletion (loading 2).

x
0 of 3 viewed, 3 left
3 additions and 1 deletionapps/web/src/components/media/MediaVideoPlayer.tsxModified
View file
@@ -127,7 +127,9 @@
<span
role="alert"
className={cn(
- "flex min-h-28 flex-col items-center justify-center gap-3 rounded-lg border border-border/40 bg-muted/40 p-4 text-center text-sm text-muted-foreground",
+ // Same 16:9 slot as the loading and playing states, so a failed or
+ // retried video does not move the rows below it.
+ "flex aspect-video max-h-full min-h-28 w-full flex-col items-center justify-center gap-3 rounded-lg border border-border/40 bg-muted/40 p-4 text-center text-sm text-muted-foreground",
stateClassName,
apps/web/src/components/ChatMarkdown.tsxModified
View file
Loading the diff
apps/web/src/components/ChatMarkdown.workspace-images.test.tsxModified
View file
Loading the diff