Skip to content

fix: remove sketch file reference when deleting assets#4161

Open
yugalkaushik wants to merge 1 commit into
processing:developfrom
yugalkaushik:asset-fix
Open

fix: remove sketch file reference when deleting assets#4161
yugalkaushik wants to merge 1 commit into
processing:developfrom
yugalkaushik:asset-fix

Conversation

@yugalkaushik

Copy link
Copy Markdown
Contributor

Issue:

Fixes #4160

Asset deletion now uses the same file delete endpoint as the sketch files sidebar, so both the storage object and the project file reference are removed together.

Before

issue-editor.mp4

After

pr-preview.mp4

Changes:

  1. Include fileId and parentId in the asset list API response when matching assets to sketch files
  2. Update asset deletion to call /projects/:sketchId/files/:fileId instead of /S3/delete
  3. Sync Redux state when the currently open sketch matches the deleted asset

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • has no typecheck errors (npm run typecheck)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

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.

Deleting an asset leaves a broken file reference in sketch files

1 participant