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

Confirm the deletion details, #10185, #10186 #10194

Merged
merged 34 commits into from
Nov 7, 2023
Merged

Conversation

njkim
Copy link
Collaborator

@njkim njkim commented Oct 25, 2023

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

  1. Confirm the user to choose resource or tile deletion, Deletion UI shouldn't show node dropdown unless user is deleting tiles #10185
  2. Confirm the number of resource or tiles to be deleted, Bulk Deletion UI should show the number of resources/tiles that will be deleted. #10186

Issues Solved

#10185
#10186

Checklist

  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Ticket Background

  • Sponsored by:
  • Found by: @
  • Tested by: @
  • Designed by: @

Further comments

except ValidationError:
return {
"success": False,
"data": {"title": _("Invalid Search Url"), "message": "Please, enter a valid search url "}
Copy link
Member

Choose a reason for hiding this comment

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

Could you make the message localizable as well?

except TypeError:
return {
"success": False,
"data": {"title": _("Invalid Search Url"), "message": "Please, enter a valid search url "}
Copy link
Member

Choose a reason for hiding this comment

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

Message also needs to be translatable here too.

for resourceid in smaple_resource_ids:
resource = Resource.objects.get(pk=resourceid)
resource.tiles = list(TileModel.objects.filter(resourceinstance=resourceid).filter(nodegroup_id=nodegroup_id))
lbg = LabelBasedGraph.from_resource(
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to use LabelBasedGraphV2 here? The LabelBasedGraph may be replaced with V2, so it's best to avoid using it.

delete-resource-count='(resource) => {return {% trans "${resource} resources will be deleted" as deleteResourceCount %} `{{ deleteResourceCount|escapejs }}` }'
delete-tiles='{% trans "Delete Tiles" as deleteTiles %} "{{ deleteTiles|escapejs }}"'
delete-resources='{% trans "Delete Resources" as deleteResources %} "{{ deleteResources|escapejs }}"'
to-be-deleted-tiles='{% trans "To Be Deleted Tiles" as toBeDeletedTiles %} "{{ toBeDeletedTiles|escapejs }}"'
Copy link
Member

Choose a reason for hiding this comment

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

The variable names are okay, but could the text be changed to "Tiles to Be Deleted"?

@njkim njkim requested a review from chiatt November 4, 2023 22:08
@chiatt chiatt merged commit 41e8a11 into dev/7.5.x Nov 7, 2023
1 check passed
@chiatt chiatt deleted the 10186_confirm_deletion branch November 7, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants