Skip to content

Prompt the user to select a project#3847

Merged
datho7561 merged 1 commit intoredhat-developer:mainfrom
datho7561:2581-start-dev-requires-project
Jan 29, 2024
Merged

Prompt the user to select a project#3847
datho7561 merged 1 commit intoredhat-developer:mainfrom
datho7561:2581-start-dev-requires-project

Conversation

@datho7561
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Checking the test failure before merging...

@vrubezhny
Copy link
Copy Markdown
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>
@datho7561 datho7561 dismissed stale reviews from msivasubramaniaan and vrubezhny via 4df77b0 January 29, 2024 14:30
@datho7561 datho7561 force-pushed the 2581-start-dev-requires-project branch from c198d84 to 4df77b0 Compare January 29, 2024 14:30
@codecov
Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

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

@vrubezhny
Copy link
Copy Markdown
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
@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