Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: playground diff code #1766

Merged
merged 6 commits into from
Dec 6, 2023
Merged

Conversation

anubra266
Copy link
Collaborator

@anubra266 anubra266 commented Dec 4, 2023

  • Allow default editor tab by appending tab to url. E.g. /playgroundID?tab=css loads the playground in css tab when opened
  • Update the syntax highlighter; Changed to a simpler package, that also supports typescript and has better DX.
  • Add Diff mode to Playground:
    This allows us to share links that compare two playgrounds, especially useful when creating a playground that corrects errors in another playground.
    Flow:

Say you have a saved playground
CleanShot 2023-12-04 at 23 18 59@2x

This Icon comes up after you make changes
CleanShot 2023-12-04 at 23 19 48@2x

Clicking that icon saves the changes to a new playground, then opens a diff between the old playground and the new one.

Diff editor looks like this:
CleanShot 2023-12-04 at 23 13 48@2x

User can click this link if they want to open the updated playground
CleanShot 2023-12-04 at 23 14 24@2x

Copy link

vercel bot commented Dec 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
panda-docs ✅ Ready (Inspect) Visit Preview Dec 5, 2023 0:59am
panda-playground ✅ Ready (Inspect) Visit Preview Dec 5, 2023 0:59am
panda-studio ✅ Ready (Inspect) Visit Preview Dec 5, 2023 0:59am

Copy link

changeset-bot bot commented Dec 4, 2023

⚠️ No Changeset found

Latest commit: 9244f8c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@anubra266 anubra266 marked this pull request as ready for review December 4, 2023 22:48
@segunadebayo segunadebayo changed the title Playground improvements feat: playground diff code Dec 6, 2023
@segunadebayo segunadebayo merged commit 8dde71a into main Dec 6, 2023
7 checks passed
@segunadebayo segunadebayo deleted the playground/editor-improvements branch December 6, 2023 00:44
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.

3 participants