-
- Downloads
[Bug Fix] Items can be dragged from the Trash into the Trash (#46389)
* prevents users from moving items to the trash if they are in the trash already and archives instead of moves in cases where item is moved to or from the trash
* reverts detecting if dragging in or out of the trash not setting the collection id, this will be prevented on the BE instead
* adds test coverage for dragging and dropping items to/from/within the trash (one of which is failing until we can make a BE change)
* Throw away `collection_id` when marking archived
This is a hack around a frontend issue. Apparently, the undo
functionality depends on calculating a diff between the current state
and the previous state. Sometimes this results in the frontend telling
us to *both* mark an item as archived *and* "move" it to the Trash.
Let's just say that if you're marking something as archived, we throw
away any `collection_id` you passed in along with it.
---------
Co-authored-by:
John Swanson <john.swanson@metabase.com>
Showing
- e2e/test/scenarios/collections/trash.cy.spec.js 79 additions, 0 deletionse2e/test/scenarios/collections/trash.cy.spec.js
- frontend/src/metabase/containers/dnd/CollectionDropTarget.jsx 11 additions, 2 deletions...tend/src/metabase/containers/dnd/CollectionDropTarget.jsx
- src/metabase/api/common.clj 11 additions, 1 deletionsrc/metabase/api/common.clj
Please register or sign in to comment