-
Notifications
You must be signed in to change notification settings - Fork 2
Open shared makecode project #614
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
base: main
Are you sure you want to change the base?
Conversation
We need to think about the URL handling. The key thing is that after the user has imported the project they no longer have the URL with the id in their history. So we need to do a replaceState-style URL update at some point. Otherwise you go back and start an import process again which isn't helpful. |
950e839
to
dcca968
Compare
element: <CodePage />, | ||
}, | ||
{ | ||
path: createImportSharedURLPageUrl(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We missed this rename. Needs to be createOpenSharedProjectPageUrl() now.
@@ -0,0 +1,51 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e2e file names also need aligning
This is currently set up to open a shared project if the URL path
For instance, running on localhost, this link should load a project with some samples: http://localhost:5173/_fDpWJaY67cgR
https://review-createai.microbit.org/open-shared-makecode-project/_fDpWJaY67cgR
Once loaded, the UI shows you a preview.
Note that this differs slightly from the Miro board, as some of the design leans on styling from Microbit Classroom, e.g. this page.
If there is an error while trying to fetch the preview, you will see
TODO: needs an e2e test.