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

Closes #13690: List all objects to be deleted #14089

Merged

Conversation

ITJamie
Copy link
Contributor

@ITJamie ITJamie commented Oct 20, 2023

Fixes: #13690

List all objects to be deleted when deleting an item.

Currently, the list includes the original item being deleted. we can change that pretty easily but I would like feedback first as to whether the list should be exhaustive or just the additional items (see #13842 as to why including the original item in the list might make sense)

Screenshot 2023-10-20 at 07 52 22 Screenshot 2023-10-20 at 07 53 26

@abhi1693
Copy link
Member

I like the general idea but this will turn out to be a bad ux if the similar objects are listed in the new line because it may go beyond the actual page making a huge scroll. I'd prefer the similar objects be comma separated instead.

netbox/netbox/views/generic/object_views.py Outdated Show resolved Hide resolved
netbox/netbox/views/generic/object_views.py Outdated Show resolved Hide resolved
netbox/netbox/views/generic/object_views.py Outdated Show resolved Hide resolved
netbox/templates/htmx/delete_form.html Outdated Show resolved Hide resolved
@ITJamie
Copy link
Contributor Author

ITJamie commented Oct 20, 2023

I like the general idea but this will turn out to be a bad ux if the similar objects are listed in the new line because it may go beyond the actual page making a huge scroll. I'd prefer the similar objects be comma separated instead.

I can absolutely refactor for that. For switches it makes a lot of sense as there can be a lot of ports and make the list long.

The one advantage to that is that it really reinforces just how much impact the current deletion will have by having to scroll to the delete button 😂

@abhi1693
Copy link
Member

I just noticed this is to be released in v3.7, so it should go into the feature branch instead.

@ITJamie ITJamie changed the base branch from develop to feature October 20, 2023 11:05
@ITJamie
Copy link
Contributor Author

ITJamie commented Oct 20, 2023

Screenshot 2023-10-20 at 12 04 29 @abhi1693 something more like this?

@jeremystretch jeremystretch added the beta Concerns a bug/feature in a beta release label Oct 20, 2023
@ITJamie
Copy link
Contributor Author

ITJamie commented Oct 22, 2023

@kkthxbye-code re the upvotes and downvotes. Is there anything specific you would like me to adjust regards the ui view change from the first screenshots to the adjusted screenshots based on @abhi1693 feedback?

@kkthxbye-code
Copy link
Contributor

@kkthxbye-code re the upvotes and downvotes. Is there anything specific you would like me to adjust regards the ui view change from the first screenshots to the adjusted screenshots based on @abhi1693 feedback?

I think your initial version was much more readble than the version abhi suggested. Showing a large number of varying length list items as comma seperated tends to look very messy.

If the page size is an issue (I personally don't think it is), maybe a scrolling container could solve it, or truncating the output with a "show more" button that extends it.

Also the trailing comma should be removed if the second version is chosen.

@ITJamie ITJamie requested a review from abhi1693 October 22, 2023 14:28
@jeremystretch jeremystretch removed the beta Concerns a bug/feature in a beta release label Oct 23, 2023
@jeremystretch jeremystretch added this to the v3.7 milestone Oct 23, 2023
netbox/netbox/views/generic/object_views.py Outdated Show resolved Hide resolved
netbox/netbox/views/generic/object_views.py Outdated Show resolved Hide resolved
netbox/templates/htmx/delete_form.html Outdated Show resolved Hide resolved
@ITJamie
Copy link
Contributor Author

ITJamie commented Oct 31, 2023

Current version:

  • using bootstrap accordian
  • titles are now being passed in + using plurals
  • added _get_dependent_objects to ObjectDeleteView class
  • using
Screenshot 2023-10-31 at 21 50 47 Screenshot 2023-10-31 at 21 50 58

@jeremystretch jeremystretch changed the title List all objects to be deleted Closes #13690: List all objects to be deleted Nov 1, 2023
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

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

Nice work @ITJamie!

@jeremystretch jeremystretch merged commit f6338ab into netbox-community:feature Nov 1, 2023
4 checks passed
@ITJamie ITJamie deleted the list_all_objects_to_be_deleted branch November 2, 2023 09:27
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

when deleteing an object in webui. list the related objects that would also be deleted
4 participants