Skip to content

New project fails earlier when directory already exist - #11191

Merged
kevinushey merged 5 commits into
rstudio:mainfrom
romainfrancois:bugfix/new_quarto_project_10570
May 13, 2022
Merged

kevinushey merged 5 commits into
rstudio:mainfrom
romainfrancois:bugfix/new_quarto_project_10570

Conversation

@romainfrancois

@romainfrancois romainfrancois commented May 12, 2022 •

Copy link
Copy Markdown
Contributor

Intent

addresses #10570

Approach

Moving the bulk of validateAsync() method to NewDirectoryPage so that emptiness of the directory is checked upfront for all projects. i.e. before we get into quartoCreateProject on the quarto case.

Automated Tests

Indicate whether this change includes unit tests or integration tests, or link a work item or pull request to add those tests to another repo. If the change cannot or will not be covered by a test, indicate why.

QA Notes

Add additional information for QA on how to validate the change, paying special attention to the level of risk, adjacent areas that could be affected by the change, and any important contextual information not present in the linked issues.

Checklist

  • If this PR adds a new feature, or fixes a bug in a previously released version, it includes an entry in NEWS.md
  • If this PR adds or changes UI, the updated UI meets accessibility standards
  • A reviewer is assigned to this PR (if unsure who to assign, check Area Owners list)
  • This PR passes all local unit tests

@romainfrancois

Copy link
Copy Markdown
Contributor Author

Now getting:

image

which brings back to the wizard when "ok":

image

@romainfrancois

This comment was marked as resolved.

@romainfrancois romainfrancois changed the title New Quarto project fails earlier New Quarto project fails earlier when directory already exist May 12, 2022
@romainfrancois romainfrancois changed the title New Quarto project fails earlier when directory already exist New project fails earlier when directory already exist May 12, 2022
@romainfrancois

Copy link
Copy Markdown
Contributor Author

Same with shiny app:

image

and other types (project template), e.g. for distill cc @cderv for reference.

image

@kevinushey

Copy link
Copy Markdown
Collaborator

Looks good to me!

While we're in this code, we could potentially tweak the warning text:

  • Change title to "Error Creating Project"
  • Give a 'solution' to the user, e.g. "The directory 'xyz' already exists and is not empty. Please enter a new directory name."

@romainfrancois
romainfrancois force-pushed the bugfix/new_quarto_project_10570 branch from 6e575eb to 9a03737 Compare May 12, 2022 18:08
@kevinushey
kevinushey merged commit b856dde into rstudio:main May 13, 2022
@romainfrancois
romainfrancois deleted the bugfix/new_quarto_project_10570 branch May 13, 2022 06:20
@cderv

cderv commented May 13, 2022

Copy link
Copy Markdown
Collaborator

Thank you @romainfrancois !

matheustavaresdev added a commit that referenced this pull request May 17, 2022
…on-auto-select

* 'main' of github.com:rstudio/rstudio: (40 commits)
  update to Electron 18.2.3
  ensure new instance is created when opening remote session file
  Update NEWS.md
  Fix flags not being passed through constructor in R version selectors
  remove unnecessary package
  install gpg1 for signing
  skip adding compiler definitions
  find jdk on my Intel Mac
  produce builds for fedora36
  use ucrtbase.dll with R 4.2.0 or newer (#11207)
  Outline uses quarto style labels, `#| label: <name>` (#11192)
  Allow fallback unknown text file types to open in Desktop same as in server
  update embedded libclang to 13.0.1 (#11186)
  Addresses handling of native pipe args with no placeholder (#11194)
  New project fails earlier when directory already exist (#11191)
  remove unused gwt class replacements (#11193)
  update Electron NEWS
  make message box API aware of this option
  whitespace tweak
  naming tweaks from PR feedback
  ...
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