-
Notifications
You must be signed in to change notification settings - Fork 93
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
Initial New Project Wizard scaffolding #2534
Conversation
Functionality is a duplication of New Folder.
Can't use keyboard 'Enter' key to create the project.
re-rendering the combo box with the detected python runtimes isn't working yet. Currently, you need to go back a step and come back to the python env step to see the populated combo box.
While the new project feature is under development, include precondition `IsDevelopmentContext`
If the button should be hidden, the config corresponding to the button should be supplied to the OKCancelBackNextActionBar.
Resolves the issue where the Enter key can't be used to accept the modal.
...unless the project type has changed.
category: workspacesCategory, | ||
f1: true, | ||
// TODO: remove feature flag IsDevelopmentContext when the feature is ready | ||
precondition: ContextKeyExpr.and(EnterMultiRootWorkspaceSupportContext, IsDevelopmentContext), |
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.
IsDevelopmentContext
feature flag here -- this means the Create New Project action won't show up in a release build.
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.
Looks good. Some localization missing where I mentioned it and elsewhere. 😀
src/vs/workbench/browser/positronModalDialogs/newProjectWizard/newProjectWizardState.tsx
Outdated
Show resolved
Hide resolved
src/vs/workbench/browser/positronModalDialogs/newProjectWizard/steps/pythonEnvironmentStep.tsx
Outdated
Show resolved
Hide resolved
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.
Looks good to me!
I had some React style comments.
One thing I'm curious about is the file organization. it seems like most of the code is in a subfolder of workbench/browser/positronModalDialogs
, is there a reason for this rather than having it in its own folder such as workbench/browser/newProjectWizard
?
src/vs/workbench/browser/positronComponents/positronModalDialog/components/checkbox.tsx
Outdated
Show resolved
Hide resolved
...ench/browser/positronComponents/positronModalDialog/components/okCancelBackNextActionBar.tsx
Outdated
Show resolved
Hide resolved
src/vs/workbench/browser/positronModalDialogs/newProjectWizard/newProjectModalDialog.css
Outdated
Show resolved
Hide resolved
src/vs/workbench/browser/positronModalDialogs/newProjectWizard/newProjectModalDialog.tsx
Outdated
Show resolved
Hide resolved
src/vs/workbench/browser/positronModalDialogs/newProjectWizard/newProjectWizardContext.tsx
Outdated
Show resolved
Hide resolved
{/* <div style={{ marginBottom: '16px' }}> | ||
Your project will be created at: | ||
<span style={{ fontFamily: 'monospace', color: '#D7BA7D' }}> | ||
{newProjectResult.parentFolder + '/' + newProjectResult.projectName} | ||
</span> | ||
</div> */} |
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.
Will these chunks be uncommented in the future?
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.
Yes, either uncommented or probably replaced.
I have a few spots where I want to display a mixture of regular text and code
, but I don't yet have a good way to do that without adding these div+span elements.
There seems to be some sort of string localization support with markdown rendering in other areas (such as Settings), but I haven't figured out how to make that work yet.
src/vs/workbench/browser/positronModalDialogs/newProjectWizard/steps/pythonEnvironmentStep.tsx
Outdated
Show resolved
Hide resolved
...instead of using the && operator, to avoid hitting unexpected behaviour when the object (left operand) being checked is falsy (e.g. 0, NaN), but when returned ends up being rendered as a string.
I added the new project wizard as a subfolder of |
Thank you both for the reviews and React insight! |
Intent
This PR mainly includes scaffolding and initial setup/components for the New Project flow, currently only allowing for the creation of a new folder based on the user's project name and directory selections. At this moment, the usable functionality of the New Project wizard is equivalent to the New Folder modal.
This video shows the "happy path" flow:
newprojectwizard.mp4
This video shows the different ways to trigger the New Project Wizard, as well as what's stored in the
projectConfig
data structure upon "accepting" the wizard modal.newprojectwizard_projectconfig.mp4
UI Notes
Dev Notes
IsDevelopmentContext
to the precondition for the New Project Wizard actionApproach
useContext
, so the project config can be accessed from any steplanguageRuntimeService.registeredRuntimes
Here's a visualization of the component hierarchy:

CurrentStep
is replaced with the appropriate step each time the user navigates in the wizard (using Back/Next buttons)QA Notes
At this point, this work is not meant to be QA'd.