feat(web): delete all assets associated with stack on asset delete #14618
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An attempt to fix this for the web: #13113
This change deletes both the stack, as well as all the asset ids for a given stack when deleted from either the asset screen, or the photos page.
I went with deleting the stack as I wasn't sure how to get show the stack in the trash page, and thought this was a workable solution. It does have the tradeoff that the user has to restack the images again.
I don't believe this is fully fleshed out yet, but I think the main idea is there.
It would be nice to have some pointers as for what other implications to consider for this PR as I'm not too familiar with the codebase.
I do believe that a query to grab all stack should be added, as opposed to how I have it now (fetch each stack).
I'm also wrapping around the deleteAssets as I'm not sure if this change should be propagated to other parts. The error handling can be improved.