Commit c1ab3e1
feat(playground-ui): add view transitions to internal sidebar links (#12358)
Enables smooth view transitions when navigating between pages via the
sidebar.
Internal links (non-http URLs) now automatically get `viewTransition:
true` passed to React Router's Link component, while external links
continue to open in new tabs.
```tsx
// Before: internal links had no transition
const linkParams = link?.url?.startsWith('http') ? { target: '_blank', rel: 'noreferrer' } : {};
// After: internal links get view transitions
const isExternal = link?.url?.startsWith('http');
const linkParams = isExternal ? { target: '_blank', rel: 'noreferrer' } : { viewTransition: true };
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added smooth view transitions to sidebar navigation links for a more
polished, seamless experience during page navigation.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 6b38687 commit c1ab3e1
File tree
4 files changed
+9
-2
lines changed- .changeset
- packages
- playground-ui/src/ds/components/MainSidebar
- playground/src
- components/ui
- lib
4 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments