ACM-23852: Add repository selected validation and fix delete button in argo create application wizard. - #5015
Conversation
Signed-off-by: Nitin Dhevar <nitin.dhanabalan@gmail.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
KevinFCormier
left a comment
There was a problem hiding this comment.
Hey Nitin,
I don't think we should change the default behaviour of WizArrayInput to require there to be at least one entry. This affected the EditPolicy wizard, and then you had to update the test.
I also don't think we should change the Argo wizard to have Git initially selected. The user can get around this easily by editing the YAML.
I've opened a PR. What I propose is:
- Marking this particular WizArrayInput as required and only removing the Delete button for cases where at least 1 is required
- Adding a custom validation function to check if the only thing present is the placeholder empty object (from disallowEmpty)
What would still need to be done is to visually indicate when this field is required. For example, in this screenshot, you see that I cannot click Next, but there is no indication of what the validation error is. Perhaps we could indicate that where I've circled in blue?

This would be similar to when you've selected Git but not entered the URL. When collapsed, there is a validation error shown.


Alternatively, perhaps you could look into making WizTiles required.
Validation idea
Signed-off-by: Nitin Dhevar <nitin.dhanabalan@gmail.com>
| <Title headingLevel="h6">{t('Repository type')}</Title> | ||
| </WizHidden> | ||
| <WizTiles path="repositoryType"> | ||
| <WizTiles path="repositoryType" required> |
There was a problem hiding this comment.
Oh wow! This worked. I assumed you would need to implement this support, but glad to see it's already there.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KevinFCormier, nitin-dhevar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|



📝 Summary
Ticket Summary (Title):
ACM-23852: Add repository selected validation and fix delete button in argo create application wizard.
Ticket Link:
https://issues.redhat.com/browse/ACM-23852
Type of Change:
✅ Checklist
General
ACM-12340 Fix bug with...)If Feature
If Bugfix
🗒️ Notes for Reviewers