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
feat(ui): list dependent resources in delete popup #18116
base: master
Are you sure you want to change the base?
feat(ui): list dependent resources in delete popup #18116
Conversation
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
…nto delete-pod-ui
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18116 +/- ##
==========================================
- Coverage 49.73% 45.13% -4.60%
==========================================
Files 274 352 +78
Lines 48948 57437 +8489
==========================================
+ Hits 24343 25925 +1582
- Misses 22230 28774 +6544
- Partials 2375 2738 +363 ☔ View full report in Codecov by Sentry. |
@agaudreault what happens when there are so many dependent resources that the window goes beyond the bottom of the screen? We might need a limit in the display to keep from the window getting broken. I glanced through the code and didn't see one. |
Also I love this idea :D |
@todaywasawesome I had the same thought, found it in the 2nd screenshot |
@todaywasawesome The maximum number of items is 5. I made sure it is not possible to have an item only for "and 1 more". The code might not be the sexiest, I did my best but I am not too familiar with the Typescript syntax 😅 |
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
@@ -360,6 +376,29 @@ export const deletePopup = async ( | |||
review the change first. | |||
</p> | |||
|
|||
{(childResources || []).length > 0 ? ( | |||
<p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to use <p>
to get the correct css. This will require another PR in https://github.com/argoproj/argo-ui ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need another PR in argo-ui?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might suggest making the "and X more" un-collapsible so that a user can get the full list if they wanted to.
Otherwise def a good feature!
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
When deleting a resource in the UI, the default option slected will delete the dependent resources. It can be easily missed by a user to delete a resource with all its dependents by mistake. For instance, if someone wants to clean up an old replicaSet that does not have pods anymore, and inadvertently selects the current replicaset, the UI popup will be very similar.
Adding the list of direct dependents reduce the risk of human error.
Checklist: