Skip to content

Entities: remove spinner from delete button #1567

@matthew-white

Description

@matthew-white

In each row of the entities table and in the entity map popup, there is a trash can icon that opens a modal confirming that the user wishes to delete the entity. While the entity deletion is in progress, we show a spinner above the trash can icon. However, that doesn't really make sense anymore, because the modal will always obscure the trash can icon. We already show a spinner within the modal during the request.

I think this pattern used to make sense before we introduced entity bulk deletion. It still makes sense for submissions, since for submissions, there's a checkbox in the delete modal to turn off future confirmation. If confirmation is turned off, then the modal isn't shown, and the user will be able to see the spinner in the submissions table or the submission map popup. However, we've removed that checkbox for entities, which means that the modal will always obscure the spinner below it.

That means that we have the opportunity to simplify a few entity components:

  • EntityMapView: don't pass awaitingResponses.
  • EntityMapPopup: don't pass awaitingResponse.
  • EntityActions: don't pass awaitingResponse.
  • EntityList: requestDelete() doesn't need to change awaitingResponses.

We should still keep awaitingResponses in EntityList in general, because it's still relevant to entity restore. However, I think we can reduce its usage and simplify a few things.

Metadata

Metadata

Assignees

Labels

frontendRequires a change to the UIrefactorImproves code without altering behavior

Type

No type

Projects

Status

🕒 backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions