Skip to content

Playground: include CSS editor in shareable URLs and URL parsing#4693

Merged
liannacasper merged 6 commits intomasterfrom
codex/add-css-parameter-to-sharing-functionality
Apr 3, 2026
Merged

Playground: include CSS editor in shareable URLs and URL parsing#4693
liannacasper merged 6 commits intomasterfrom
codex/add-css-parameter-to-sharing-functionality

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Motivation

  • Enable sharing both the Java script and the CSS editor content via playground URLs so users can reproduce full examples.
  • Ensure the playground initializes from a shared URL that may contain both code and css query parameters.

Description

  • Updated the README to document that shareable URLs include a css query parameter and described the URL-safe Base64 encoding for code and css values.
  • Added resolveInitialCss() and cssFromUrl() to parse and decode a css parameter from the browser URL using the existing decodeSharedScript() logic.
  • Changed initial state loading to call resolveInitialCss() and persist the CSS when a shared code URL is detected.
  • Updated copyCurrentSourceUrl() to append an encoded css parameter when currentCss is non-empty so clipboard URLs include both editors.

Testing

  • Ran the playground module tests with ./gradlew :scripts:cn1playground:common:test and the test suite completed successfully.
  • Executed ./gradlew check to run the project verification tasks and they passed without errors.

Codex Task

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Cloudflare Preview

@liannacasper liannacasper linked an issue Apr 3, 2026 that may be closed by this pull request
@liannacasper liannacasper merged commit 8e22347 into master Apr 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link shared by Playground doesn't include CSS code

1 participant