whole-tale / dashboard

Whole Tale Dashboard
http://wholetale.org
MIT License
7 stars 2 forks source link

Fixed multiple files being removed from view on delete #621

Closed bodom0015 closed 4 years ago

bodom0015 commented 4 years ago

Problem

While fixing #610, an overzealous change was added to remove(file) that was not necessary. Ember-Data apparently will automatically remove the model from view when calling destroyRecord(), so there was no need to add additional handling in the .then() clause to remove this from view.

Fixes #620

Approach

Remove the .then() clause from the promise

How to Test

  1. Checkout and run this branch locally, rebuild the dashboard
  2. Login to the WholeTale Dashboard
  3. Create a Tale, if you haven't already
  4. Navigate to Run > Files > Home or Run > Files > Tale Workspace
  5. Upload a few files (5 or so)
  6. Remove the second to last file from the list
    • You should see that only the file that you chose to Remove disappears
  7. Refresh the page
    • You should see the same list of files appear, and the file you just removed should now be missing