Skip to content
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

Align new project skip link behaviour with new project button #10382

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

microbit-robert
Copy link
Contributor

@microbit-robert microbit-robert commented Feb 12, 2025

The new project skip link on the home page launches a new project without showing the "Create a Project" dialog (if available depending on the appTheme settings) where as the "New Project" button does. This PR aligns these behaviours.

@microbit-matt-hillsdon

@@ -2914,6 +2914,18 @@ export class ProjectView
});
}

newProjectMaybeWithProjectCreationOptions(firstProject: boolean) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd absolutely welcome a better name for this method. An alternative could be just to duplicate this code in both accessibility.tsx and projects.tsx in their own newProject methods that then call this.props.parent.newProject. The latter approach does make it more likely that this bug will reoccur if a new entry point (button) to create a new project is introduced in the app.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah, that one's a mouthful... perhaps newUserCreatedProject? would also be nice to convert this into async/await while you're here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good. Both changes made here aea20a3.

@abchatra abchatra merged commit 3e1b7e1 into microsoft:master Feb 14, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants