Create component new workflow#2844
Create component new workflow#2844msivasubramaniaan wants to merge 14 commits intoredhat-developer:mainfrom
Conversation
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2844 +/- ##
==========================================
- Coverage 33.47% 33.21% -0.27%
==========================================
Files 56 56
Lines 4116 4191 +75
Branches 779 805 +26
==========================================
+ Hits 1378 1392 +14
- Misses 2738 2799 +61
☔ View full report in Codecov by Sentry. |
|
A few things that I've noticed so far:
|
Yes I am working on those only. I have added the work-in-progress label already. Anyway thanks for the points added. |
Okay. Sorry about that. It's looking great so far! |
NP 😊 |
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
|
@datho7561 I have completed the full code flow. Please start reviewing now |
The name of the subfolder should be the component name
Maybe this only happens with light theme, let me double check...
Okay, I understand this, but we don't display the app name anywhere or ask for the app name anywhere else, so I don't think it's worth asking for it. If we use a default app name, I think it makes sense to go with the one |
datho7561
left a comment
There was a problem hiding this comment.
Alright. Here are some things I found while looking through the code
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Removed application name field |
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
datho7561
left a comment
There was a problem hiding this comment.
Okay, a few more things I noticed
| if (!validationMessage) validationMessage = OpenShiftItem.lengthName(`${event.name} should be between 2-63 characters`, event.name, 0); | ||
| panel?.webview.postMessage({ | ||
| action: event.action, | ||
| error: !validationMessage ? false : true, |
There was a problem hiding this comment.
Boolean(validationMessage)
|
|
||
| function validateComponentName(event: any) { | ||
| let validationMessage = OpenShiftItem.emptyName(`Required ${event.name}`, event.name.trim()); | ||
| if (!validationMessage) validationMessage = OpenShiftItem.validateMatches(`Not a valid ${event.name}. |
There was a problem hiding this comment.
I think it would be better to have ${event.name} is not a valid component name, since event.name represents the name that the user inputs for the component
| const folderDropDownItems: any[] = []; | ||
| folderDropDownItems.push('New Folder'); | ||
| folderDropDownItems.push(...wsFolderItems); | ||
| return ( |
There was a problem hiding this comment.
I think it would a good idea to turn this into an if statement instead of a ternary expression in the returned value. eg.
if (compDescriptions.length === 0) {
return <LoadScreen .../>
} else if (showLoadScreen) {
return <LoadScreen .../>
} else {
return <>
// the main form UI
</>;
}
I think it would be easier to read the code
|
We are going to work on new workflow, hence closing this PR. |




Signed-off-by: msivasubramaniaan msivasub@redhat.com
Fix: #2697