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

✨ Show the name of objects to be deleted in the confirm delete modals #1347

Merged
merged 4 commits into from
Sep 11, 2023

Conversation

mturley
Copy link
Collaborator

@mturley mturley commented Sep 11, 2023

Applies the pattern from #1333 to the rest of our entity delete confirmation modals.

Note that in order to do this, I needed to refactor away an inconsistent pattern: Some of our delete modals were kept track of with thingIdToDelete as a number in state and isConfirmDialogOpen as a boolean. In order to show the name in the confirm modal, this PR refactors these incidences to store a reference to the whole object thingToDelete instead of just the id. The isConfirmDialogOpen state was also redundant because the confirm modal is always closed when thingToDelete is falsy and open when it's truthy, so this PR also removes those booleans from state and uses thingToDelete as the source of truth.

Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
…name

Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
@mturley mturley changed the title ✨ Show the name of an object to be deleted in the confirm delete modal ✨ Show the name of objects to be deleted in the confirm delete modals Sep 11, 2023
@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (3e7ede2) 42.39% compared to head (497efe3) 42.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1347   +/-   ##
=======================================
  Coverage   42.39%   42.39%           
=======================================
  Files         137      137           
  Lines        4291     4291           
  Branches     1007     1007           
=======================================
  Hits         1819     1819           
  Misses       2460     2460           
  Partials       12       12           
Flag Coverage Δ
client 42.39% <ø> (ø)
server ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants