Commit 415f9d6
authored
feat(showcase/shell-dashboard): add iframe link preview on hover (CopilotKit#4864)
## Summary
- Adds hover-triggered iframe preview popups to Demo and Code links in
the showcase dashboard grid
- Hovering a link for 300ms shows a 400×300 popup with a scaled-down
(thumbnail) view of the target page
- Clicking the popup opens the URL in a new tab; moving away dismisses
it after 200ms
- Includes loading state (pulsing indicator), fade-in on load, and
"Preview unavailable" fallback after 8s timeout
- Only one popup visible at a time (singleton); touch devices skip
previews entirely
## Test plan
- [ ] 16 unit tests covering: hover delay, dismiss timing, bridge gap,
iframe src, click overlay, portal rendering, viewport flip, singleton,
touch device exclusion, loading/loaded/unavailable states
- [ ] `vitest run` — 533 tests pass, 0 failures
- [ ] `tsc --noEmit` — no new type errors
- [ ] `next build` — builds successfully
- [ ] Manual smoke test: hover delay, dismiss, bridge gap,
click-through, singleton, loading states all verified in browser
🤖 Generated with [Claude Code](https://claude.com/claude-code)7 files changed
Lines changed: 751 additions & 18 deletions
File tree
- showcase/shell-dashboard
- src
- app
- components
- __tests__
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
37 | 48 | | |
38 | 49 | | |
39 | 50 | | |
| |||
311 | 322 | | |
312 | 323 | | |
313 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
314 | 341 | | |
315 | 342 | | |
316 | 343 | | |
| |||
0 commit comments