codesandbox / codesandbox/codesandbox-client
Vanilla Javascript template preview is empty on save
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 2.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 2
Description
🐛 bug report
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project
adheres to. - I have searched the issue tracker for an issue that matches the one I want
to file, without success.
Description of the problem
When you create a new sandbox using the "Vanilla Javascript" template, the preview is updated as expected when you change something in the file but it is empty when you save it.
This is easily reproducible without making any change to the template.
How has this issue affected you? What are you trying to accomplish?
I was planning to use codesandbox for a course but with this bug in place, I don't fell like asking the student to work with this tool.
To Reproduce
- create a sandbox from the "Vanilla Javascript" template or open this one: https://codesandbox.io/s/cold-brook-ojn3q?file=/src/index.js
- press
ctrl + sor save the file by any other way - see that the preview is now empty
- make a change to the file and wait for a few seconds
- see that the preview is no longer empty
- save again
- see that the preview is empty again
- ...
Here's a video demonstrating the issue: https://www.loom.com/share/0605603ab7d143d1820b124d5b983481
Link to sandbox: [link (optional)](https://codesandbox.io/s/cold-brook-ojn3q?file=/src/index.js)
Your Environment
| Software | Name/Version |
|---|---|
| Сodesandbox | (I don't know how to get the version) |
| Browser | Google Chrome 96.0.4664.45 |
| Operating System | Windows 10 |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the linked Vanilla Javascript sandbox: save without changing the template, then edit and save again. Trace the template preview and save flow from that reproduction. Done means the preview remains populated after saving and continues to update after subsequent edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100