whole-tale / dashboard

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

Allow user to delete a file after copying without a refresh #610

Closed bodom0015 closed 4 years ago

bodom0015 commented 4 years ago

Problems

After copying a file/folder, deleting it does not update the view as it should. The deleted file stays in the view and, if the user chooses "Remove" again, an error is thrown that can break their UI.

Fixes #608

Approach

Due to how we perform the copy, Ember isn't smart enough to refresh the view when the object is deleted from the backend/cache. Adjust how we perform deletes from the directory-browser to make sure the item is removed from the view every time.

How to Test

  1. Checkout and run this branch locally, rebuild the dashboard
  2. Login to the WholeTale Dashboard
  3. Navigate to Manage > Home and upload a test file if you haven't already
  4. Copy your test file, then delete it (without refreshing)
    • The file should appear in the view after being copied
    • The file should be removed from the view deleted
  5. Create a Tale, if you haven't already (no need to launch)
    • You should be brought to the Run view
  6. Navigate to Run > Files > Home for the Tale
  7. Copy your test file, then delete it (without refreshing)
    • The file should appear in the view after being copied
    • The file should be removed from the view deleted
  8. Navigate to Run > Files > Tale Workspace for the Tale
  9. Copy your test file, then delete it (without refreshing)
    • The file should appear in the view after being copied
    • The file should be removed from the view deleted
  10. Optional: Repeat the above for folders