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

Add R Configuration step UI to Project Wizard #2766

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

sharon-wang
Copy link
Member

Intent

Adds the R Configuration step and fixes some issues with project config data not being persisted properly.

r_config_step.mp4

Approach

  • make PythonInterpreterEntry --> InterpreterEntry, so it can be used for both Python and R interpreter dropdowns
  • reorganize interpreter dropdown utils so that language-agnostic functions can be shared between Python and R via interpreterDropDownUtils.ts, and language-specific utils can be used via pythonEnvironmentStepUtils.ts and rConfigurationStepUtils.ts
  • add some missing properties to the new project configuration (useRenv, instalIpykernel)
  • create the component for the R Configuration step and the corresponding enum entry NewProjectWizardStep.RConfiguration
  • some cleanup and formatting in pythonEnvironmentStep.tsx (mostly non-functional changes)

QA Notes

Selecting R Project on the project type step should result in step 3 being the R Configuration step. The R Configuration step should pre-select the user's preferred interpreter.

- creates the component for the R config step
- directs the user to the R config step if the R Project type is selected
- use a single component for interpreter dropdown items, regardless of project type
- share the interpreter dropdown entry filtering between R and Python
`setProjectConfig` was getting called, but the wizard accept callback read the project config from the wizard state before the render loop had a chance to update the project config. As a result, project interpreter and environment information was missing from the project config.

Saving the data in the project config at the time that they're updated and within `useEffect` ensures that the project config is up to date when the wizard accept callback is called.

Also:
- added installIpykernel property to the project config (not currently used)
- removed unused code in newProjectWizardStepContainer.tsx
- made the retrieval of the selected interpreter into a general function for any languageId
@petetronic
Copy link
Collaborator

Nice! I tried out the branch and was able to create an "R" project, and just to check, git and renv checkboxes are known to be not yet functional?

@sharon-wang
Copy link
Member Author

Nice! I tried out the branch and was able to create an "R" project, and just to check, git and renv checkboxes are known to be not yet functional?

Yes, the checkboxes should be clickable to check/uncheck them, but currently the user selection doesn't result in actual functionality

@sharon-wang sharon-wang merged commit 79fc6c4 into main Apr 15, 2024
1 check passed
@sharon-wang sharon-wang deleted the feature/project-wizard-project-config branch April 15, 2024 19:31
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.

2 participants