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

Refreshing the editor page with an unsaved template snippet loads the wrong template on refresh #195

Open
seveibar opened this issue Nov 13, 2024 · 2 comments

Comments

@seveibar
Copy link
Contributor

This annoys the hell out of me. If you refresh the page it should re-use the same template. One way to resolve this is to make sure when we open an unsaved snippet we keep the template type in the url

Kapture.2024-11-12.at.18.38.58.mp4

/bounty $8

Copy link

algora-pbc bot commented Nov 13, 2024

💎 $8 bounty • tscircuit

Steps to solve:

  1. Start working: Comment /attempt #195 with your implementation plan
  2. Submit work: Create a pull request including /claim #195 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to tscircuit/snippets!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @developerfred Nov 13, 2024, 3:18:36 AM WIP

@developerfred
Copy link

developerfred commented Nov 13, 2024

/attempt #195

I will update CodeEditor

  • Adding template state tracking using a URL query parameter
  • Preserving the template type across page refreshes
  • Loading the correct template content based on the URL parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants