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

Prompt the user to select a project #3847

Merged

Conversation

datho7561
Copy link
Collaborator

When trying to run "Start Dev", "Manually Start Dev", "Create" (to create resources from a YAML file), or "Delete" (to delete resources from a YAML file), if the current project doesn't exist, display a notification initicating that a project needs to be selected or created, with a button that opens the wizard to do this.

Fixes #2581

Signed-off-by: David Thompson davthomp@redhat.com

@datho7561
Copy link
Collaborator Author

Here is a demo of the workflow:

create-or-select-project-prompt.mp4

vrubezhny
vrubezhny previously approved these changes Jan 29, 2024
Copy link
Contributor

@vrubezhny vrubezhny left a 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. Thanks!

Copy link
Collaborator

@msivasubramaniaan msivasubramaniaan left a comment

Choose a reason for hiding this comment

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

LGTM

@datho7561
Copy link
Collaborator Author

Checking the test failure before merging...

@vrubezhny
Copy link
Contributor

@datho7561 It only looks like the following test failure is related to the change:

  1 failing
  1) Oc
       errors when there is no active project:
     AssertionError: expected undefined to be null
      at Context.<anonymous> (test/unit/oc.test.ts:134:48)
      at Generator.next (<anonymous>)
      at fulfilled (out/test/unit/oc.test.js:9:58)

When trying to run "Start Dev", "Manually Start Dev",
"Create" (to create resources from a YAML file),
or "Delete" (to delete resources from a YAML file),
if the current project doesn't exist,
display a notification initicating that a project needs to be selected
or created,
with a button that opens the wizard to do this.

Fixes redhat-developer#2581

Signed-off-by: David Thompson <davthomp@redhat.com>
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (976e968) 32.47% compared to head (4df77b0) 32.58%.

Files Patch % Lines
src/openshift/openshiftItem.ts 70.83% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3847      +/-   ##
==========================================
+ Coverage   32.47%   32.58%   +0.11%     
==========================================
  Files          85       85              
  Lines        6418     6441      +23     
  Branches     1333     1337       +4     
==========================================
+ Hits         2084     2099      +15     
- Misses       4334     4342       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@datho7561
Copy link
Collaborator Author

I rewrote the test to reflect the new behaviour. Are you okay if I merge this @vrubezhny @msivasubramaniaan ?

@vrubezhny
Copy link
Contributor

@datho7561 +1 for merging the PR - All the tests successfully passed now

@datho7561 datho7561 merged commit b361edc into redhat-developer:main Jan 29, 2024
6 checks passed
@datho7561 datho7561 deleted the 2581-start-dev-requires-project branch January 29, 2024 15:49
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.

Cannot Start Dev action on quarkus component until an OpenShift Project is created
3 participants