-
Notifications
You must be signed in to change notification settings - Fork 0
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
New session setup page when opening microbit.org project #394
base: main
Are you sure you want to change the base?
Conversation
microbit-grace
commented
Oct 16, 2024
•
edited
Loading
edited
- If no resource can be fetched from microbit.org, it start a new empty session.
- Project name validation and default project name have been factored out so that it can be shared between edit project name dialog and new session set up page.
https://review-createai.microbit.org/import-confirm-page/import/ Haven't been tested with with resource info yet, due to CORS issues. But hopefully this works in staging |
Hey sorry, picked the wrong order for merge and made another conflict. I can fix later! |
Just need to apply the change in #399 to every use of navigate in the ImportPage file I think. |
Is "Back" the right button text to use here? I'm not sure I'd expect it to take me to the app homepage. It's less clear that the navigation should replace state now that import is actually a page that doesn't just redirect immediately. Maybe we just take the current changes and re-review the window.history changes after this is in? |
No worries! I think it's a simple conflict fix anyway.
Not sure either, I was trying to mimic the "Open in classroom" experience.
Sounds good |
|
||
useEffect(() => { | ||
const updateAsync = async () => { | ||
if (!resource || !activitiesBaseUrl) { | ||
return; | ||
} | ||
const code = await fetchMicrobitOrgResourceTargetCode( | ||
project.current = await fetchMicrobitOrgResourceProjectCode( |
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.
I think we should discuss whether we should have a loading state here rather than what's going to be UI that does something different depending on the delay in the fetch.
There are still things to discuss, so have put it to draft for now till ready for review again. |