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

Image Processing: No user friendly notice displayed when error occurs #686

Closed
1 task done
faisal-alvi opened this issue Feb 4, 2024 · 1 comment · Fixed by #688
Closed
1 task done

Image Processing: No user friendly notice displayed when error occurs #686

faisal-alvi opened this issue Feb 4, 2024 · 1 comment · Fixed by #688
Assignees
Milestone

Comments

@faisal-alvi
Copy link
Member

Describe the bug

While on the image editing screen, I attempted to generate the image title, but the spinner continued spinning, and no error message/information was displayed. Upon inspecting the console, I encountered a message indicating that I had exceeded the API quota. It is essential to have a user-friendly notification visibly present on the page to inform users about the actual cause. Also, the spinner should be stopped, and the "Generate titles" button should be displayed again.

Steps to Reproduce

  1. Upload new image in media
  2. Edit the image
  3. Click the "Generate titles" button

Screenshots, screen recording, code snippet

image

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dkotter
Copy link
Collaborator

dkotter commented Feb 4, 2024

Tested this out myself and can reproduce but does seem to only impact content using the Classic Editor. Verified that in the Block Editor, we do output an error message if needed.

I didn't test but I think this would also impact the generation of excerpts in the Classic Editor. Code for both of those lives here: https://github.com/10up/classifai/tree/develop/src/js/openai. We'll need to add error handling after we make the API request.

Might also be worth discussing on what post types we want to show these buttons. In this example, the Generate Titles button is showing when editing a media item, which probably doesn't make sense to have as there's usually not much text content associated with a media item to generate a title in the first place (or an excerpt). Doesn't hurt to have those options there but we may want to remove them.

@dkotter dkotter self-assigned this Feb 4, 2024
@dkotter dkotter added this to the 3.0.0 milestone Feb 4, 2024
@vikrampm1 vikrampm1 moved this from Incoming to In Review in Open Source Practice Feb 5, 2024
@github-project-automation github-project-automation bot moved this from In Review to Merged in Open Source Practice Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants