You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of this, it might be good to revisit the url structure projects. There are currently a few ways to "view" projects.
/editor?sketch=projectID - editor window
/view?sketch=projectID - full page link to a saved project. Finds all the files related to the project, parses and builds the index.html page on the server-side.
/sketch/output.html - the iframe inside of /editor. All sketch code is injected client-side before (re)loading. Currently served static, but this may need to change (see notify if offline & allow sketches to keep running #99). This is similar to /preview (below), but adds a script to send messages from the iframe's console to the virtual debugging console.
/preview - for "preview in new window". Gets all file data from local storage, so we haven't been storing the projectID in the url.
I think the last 2 paths would need to include projectID in order to load assets with relative path (#100 (comment))
So maybe these could be the paths:
/editor/username/projectID
/view/username/projectID
/preview/projectID
/frameview/projectID
I think it's faster for MongoDB to find projects by ID than by name, though name is obviously friendlier.
we've been using hash to load sketches without refreshing the page like this:
http://p5ide.herokuapp.com/editor#?sketch=568d9514f60b940300d5f2fd
@antiboredom suggests we use HTML History API instead like this http://p5ide.herokuapp.com/editor/sketch/568d9514f60b940300d5f2fd
because
To accomplish this, we can incorporate the vue-router module which we have not started using yet (it may not have been finished when the project began): http://vuejs.github.io/vue-router/en/api/properties.html
The text was updated successfully, but these errors were encountered: