Skip to content

feat(playground): share the framework choice with the docs framework tabs - #4894

Draft
thetaPC wants to merge 1 commit into
mainfrom
playground-framework-sync
Draft

thetaPC wants to merge 1 commit into
mainfrom
playground-framework-sync

Conversation

@thetaPC

@thetaPC thetaPC commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Issue URL: N/A

What is the current behavior?

  • Picking React in a page's framework tabs doesn't change the playgrounds on that page, and picking React in a playground doesn't change the tabs. Each keeps its own saved choice.
  • The framework values and labels are written out separately in the playground and on each page.

What is the new behavior?

  • Playgrounds read and write the same saved choice as <Tabs groupId="framework">, through Docusaurus's useStorageSlot. Picking a framework in either one selects it in the other, and the choice is kept after a refresh.
  • Angular (Standalone) in the tabs shows Angular in playgrounds, and picking Angular in a playground keeps the tabs on Angular (Standalone).
  • A reader's saved choice now wins over a playground's defaultFramework, as the Playground README already describes. defaultFramework applies until the reader picks a framework.
  • src/utils/frameworks.ts holds the framework group id, values and labels. The playground uses it, and the docs tabs will switch to it in a follow-up.
  • The playground's own framework event and playground_usage_target storage key are removed, so a reader's earlier playground choice is not carried over.

Does this introduce a breaking change?

  • Yes
  • No

Other information

How to test

  1. Open the preview's Managing Focus page and pick React in the Routing tabs. The Basic Usage playground switches to React.
  2. Pick Vue in the playground. The tabs switch to Vue.
  3. Refresh the page. Both still show Vue.
  4. Open the preview's Config page and pick Angular (Standalone), then open Button. Its playgrounds show Angular.

@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-docs Ready Ready Preview Nov 24, 2026 12:40am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — a0705742 Deployed Nov 24, 2026 by vercel[bot]
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.

1 participant