Commit 30e45fa
authored
fix(Giphy): use fixed height for giphy preview to prevent layout shifts (#3095)
## Summary
- Set a fixed height (`--str-chat__gif-height`: 200px) on the giphy
container during the preview/shuffle state
- Prevents layout jumps when shuffling between portrait and landscape
giphies
- Keeps the Shuffle/Send/Cancel action buttons visible without scrolling
- Add fixed dimensions to the giphy image placeholder so the layout is
stable when a giphy fails to load
- Removed stale TODO comment that this change resolves
## Test plan
- [ ] Type `/giphy <query>` to trigger a giphy preview
- [ ] Click Shuffle repeatedly — verify the container height stays
stable and action buttons remain visible
- [ ] Verify both portrait and landscape giphies render properly within
the fixed height via `object-fit: contain`
- [ ] After sending, verify the giphy renders at full dynamic height (no
fixed constraint)
- [ ] Simulate a giphy image load failure — verify the placeholder has
correct dimensions1 parent b5cb01f commit 30e45fa
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
| |||
0 commit comments