Skip to content

feat(playground): canonical /playgrounds/:id URL for One-linked playgrounds - #839

Merged
johnleider merged 2 commits into
masterfrom
cursor/canonical-playground-routes-d7f9
Aug 12, 2026
Merged

feat(playground): canonical /playgrounds/:id URL for One-linked playgrounds#839
johnleider merged 2 commits into
masterfrom
cursor/canonical-playground-routes-d7f9

Conversation

@johnleider

Copy link
Copy Markdown
Member

Summary

Implements canonical URL routing for Vuetify One playgrounds, making /playgrounds/:id the canonical URL for One-linked playgrounds (parity with play.vuetifyjs.com).

Changes

New Route: /playgrounds/:id

  • Added pages/playgrounds/[id].vue for the canonical playground route using vue-router/auto-routes file-based routing
  • Route-provided ID is injected via providePlaygroundRoute for consumption by usePlaygroundFiles

URL Navigation

  • Updated useOnePlaygrounds to use vue-router for URL synchronization instead of history.replaceState
  • Open dialog uses router.push for explicit navigation (creates history entry)
  • Save operations use router.replace for seamless URL updates

Backwards Compatibility

  • Legacy /?playground=<id> URLs redirect to /playgrounds/<id> with hash preserved
  • Local/untitled playgrounds remain on / with hash-only share links unchanged

Documentation

  • Added brief note about canonical URLs and sharing in intro.md

Acceptance Criteria

  • Route /playgrounds/:id loads that One playground
  • Open/Save navigations use router.push/replace to /playgrounds/:id, preserving hash
  • Local/untitled playgrounds stay on / (existing hash-only share links unchanged)
  • Reverse compat redirect: /?playground=<id>/playgrounds/<id> (preserve hash)
  • Brief docs note on canonical URL

Fixes #838

Open in Web Open in Cursor 

…rounds

Implements canonical URL routing for Vuetify One playgrounds:

- Add pages/playgrounds/[id].vue for the canonical /playgrounds/:id route
- Update useOnePlaygrounds to use vue-router for URL sync
- Navigate to /playgrounds/:id when opening One playgrounds via push
- Use replace for save operations (create/update)
- Add redirect from legacy /?playground=<id> to /playgrounds/<id>
- Preserve hash in all URL transitions

Local/untitled playgrounds remain on / with hash-only share links.

Fixes #838
@johnleider johnleider added the enhancement New feature or request label Aug 12, 2026 — with Cursor
@johnleider johnleider added this to the v1.0.x milestone Aug 12, 2026
@johnleider
johnleider marked this pull request as ready for review August 12, 2026 21:50
@johnleider
johnleider merged commit be7b8b5 into master Aug 12, 2026
22 checks passed
@johnleider
johnleider deleted the cursor/canonical-playground-routes-d7f9 branch August 12, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

playground: path-based /playgrounds/:id as canonical URL (cutover)

2 participants