Skip to content

Add shareable example links to the playground - #21

Merged
Y-Nak merged 1 commit into
new-syntaxfrom
playground-example-links
Aug 21, 2026
Merged

Add shareable example links to the playground#21
Y-Nak merged 1 commit into
new-syntaxfrom
playground-example-links

Conversation

@czepluch

@czepluch czepluch commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

A link like ?example=trait opens that bundled example directly
A button next to the example picker copies the link for the current selection
Links carry only the example id, so they always resolve against the deployed examples and never inject content.
Opening a link backs the previous workspace up under a one-slot localStorage key before replacing it, and the parameter is dropped afterwards so reloads keep later edits.

Fixes #15

A link like ?example=trait opens that bundled example directly; a button
next to the example picker copies the link for the current selection.
Links carry only the example id, so they always resolve against the
deployed examples and never inject content. Opening a link backs the
previous workspace up under a one-slot localStorage key before replacing
it, and the parameter is dropped afterwards so reloads keep later edits.

Based on a patch contributed from another session; applied with a
one-slot workspace backup, copy-failure feedback on the link button,
and refreshed test data.
@Y-Nak
Y-Nak merged commit 18fd9f7 into new-syntax Aug 21, 2026
24 checks passed
@Y-Nak
Y-Nak deleted the playground-example-links branch August 21, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants