Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Delete Image #1150

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

asuresh-code
Copy link
Contributor

@asuresh-code asuresh-code commented Dec 10, 2024

Description

#1074

Testing instructions

Checkout **add-delete-endpoint-for-image-#38** on the Object Storage API repo to test with the api.

  • Review code
  • Check Actions build
  • Review changes to test coverage
  • {more steps here}

Agile board tracking

closes #1074

@asuresh-code asuresh-code self-assigned this Dec 10, 2024
@asuresh-code asuresh-code marked this pull request as draft December 10, 2024 12:02
@asuresh-code asuresh-code changed the title Implement Delete Image Add Delete Image Dec 10, 2024
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.24%. Comparing base (718d659) to head (f4999a4).

Additional details and impacted files
@@            Coverage Diff            @@
##           develop    #1150    +/-   ##
=========================================
  Coverage    99.23%   99.24%            
=========================================
  Files           88       89     +1     
  Lines        17876    17982   +106     
  Branches      2123     2966   +843     
=========================================
+ Hits         17740    17846   +106     
+ Misses         135      132     -3     
- Partials         1        4     +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asuresh-code asuresh-code marked this pull request as ready for review December 12, 2024 09:40
Copy link
Collaborator

@joshuadkitenge joshuadkitenge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete.error.mp4

@@ -1,6 +1,6 @@
{
"imsApiUrl": "http://127.0.0.1:8000",
"osApiUrl": "",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't need to be change. This should be changed when the object-storage-api is added into the CI

Comment on lines 27 to 28
const [error, setError] = React.useState(false);
const [errorMessage, setErrorMessage] = React.useState<string | undefined>(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You on need to use the errorMessage to manage the state as the its false when it undefined , otherwise its true

@asuresh-code
Copy link
Contributor Author

asuresh-code commented Dec 13, 2024

delete.error.mp4

I'm not sure if the error I recreated and addressed was exactly what you found; I believe the issue is that after you delete an image in the lightbox, it tries to GET the image, only to get this error since it does not exist anymore. I've fixed it by simply closing the lightbox if you delete an image.

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.

Delete images
2 participants