-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: Add support for p5.js version check #580
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
Conversation
@catarak Can you please look into this issue? After fetching p5 version from api, I'm setting in into files reducer and the state gets updated (check screenshot: redux dev tools section). The issue is that the html file markup inside editor is not getting updated. p5.js-web-editor/client/modules/IDE/components/Editor.jsx Lines 147 to 156 in ea02d76
Also, a note that I'm setting default one to 0.5.0 in the initial state so that we can see the updated one (0.6.0) from the API. |
i think the code you've pieced out is probably the issue—it's somewhat hacky code i wrote to figure out if there are any changes the the files, which is obviously not robust. would be awesome to update it! |
i also just had an idea—since the p5 version isn't changing that often, maybe it would make sense to store it in mongo or something, and add a script that checks that URL every day or every hour or something? or maybe add a CI task that every time there's a tagged release in the p5 repo the editor gets updated? what do you think? and then i guess the p5 version would get passed to the client when rendered from |
I think it will take a while to investigate it. We should certainly fix the hack but is this version check a priority? Fixing the hack is a priority for sure.
Makes complete sense to do it. I also thought to cache it somewhere as this API call takes up at least 200 ms to complete which directly impacts our startup time/new project creation time. We should definitely deploy a cron job at server or setup CI based on tagged release but things will ultimately boil down to where we're stuck in the component lifecycle. |
i don't know if there are any other issues, but yeah, it would be great to make the code more robust and clean. to your second point, one thing i've been thinking about is stuff that can be done server side. it would be cool if certain data could be bootstrapped (something like this: https://medium.com/@baphemot/understanding-reactjs-data-hydration-initialization-bacbb790c7cb) |
closeed this PR since it seems to be stale. feel free to reopen if you're still working on it! |
This PR is initial WIP to add support p5.js version check as described in #144
Server: ☁️
/api/p5version/
Client: 💻
TODO 👷
Fixes #144 🐛
Thank you!