Skip to content

Remove duplicate error display in generate Alt text#255

Merged
gziolo merged 9 commits intoWordPress:developfrom
juanfra:tweak/generate-alt-remove-duplicate-error
Mar 17, 2026
Merged

Remove duplicate error display in generate Alt text#255
gziolo merged 9 commits intoWordPress:developfrom
juanfra:tweak/generate-alt-remove-duplicate-error

Conversation

@juanfra
Copy link
Copy Markdown
Member

@juanfra juanfra commented Feb 24, 2026

What?

Removes the error message from the controls area when AI summary generation fails.

Why?

Errors were being displayed twice. Once in the top notice bar and again right above the button. This redundancy was confusing and you had to dismiss the two independently.

How?

Removed the error display from the controls area

Testing Instructions

  1. Be sure that you don't have any AI provider with text generation capabilities configured (maybe just try without any configured)
  2. Go to a page or post.
  3. Add an image.
  4. In the image controls, head over "Settings" and click "Generate Alt text"
  5. Confirm the error notice is showing only once on the top bar.

Screenshots or screencast

Before

generate-alt-duplicated-error.mp4

After

Screenshot 2026-02-24 at 15-57-48 Edit Page “WordPress in the AI era ” ‹ Stories® — WordPress Open WordPress Playground Preview

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 24, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: juanfra <juanfra@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.03%. Comparing base (f2b29e6) to head (6dbea05).
⚠️ Report is 17 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #255   +/-   ##
==========================================
  Coverage      58.03%   58.03%           
  Complexity       576      576           
==========================================
  Files             37       37           
  Lines           2955     2955           
==========================================
  Hits            1715     1715           
  Misses          1240     1240           
Flag Coverage Δ
unit 58.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jeffpaul
Copy link
Copy Markdown
Member

@karmatosed is there a standard approach within Gutenberg for this sort of error in terms of showing it at the top of the canvas or contextually within the sidebar? Which is the most optimal approach?

@jeffpaul
Copy link
Copy Markdown
Member

jeffpaul commented Mar 3, 2026

@juanfra per input from @karmatosed in Slack, let's remove the error from the top of the canvas and keep the one in the sidebar.

@jeffpaul jeffpaul mentioned this pull request Mar 3, 2026
20 tasks
@dkotter dkotter modified the milestones: 0.4.0, 0.5.0 Mar 5, 2026
@jeffpaul jeffpaul modified the milestones: 0.4.1, 0.5.0 Mar 6, 2026
@juanfra
Copy link
Copy Markdown
Member Author

juanfra commented Mar 10, 2026

Thanks @jeffpaul! I shared my thoughts on that thread but maybe it's worth to centralize the conversation here.

I don't think we have a precedent for showing errors in the sidebar. If we set one here, it might mean revisiting how other experiments with sidebar controls handle errors too. Errors at the top feel more consistent with existing block editor patterns, and how we're doing it for the rest of the experiments. Happy to revisit if there are examples of this pattern elsewhere that I'm missing.

@jeffpaul
Copy link
Copy Markdown
Member

@karmatosed can you confirm optional approach to align to how Gutenberg handles contextual error messages (feel free to ping Gutenberg designers/engineers to verify if needed)?

@jeffpaul jeffpaul modified the milestones: 0.5.0, 0.6.0 Mar 12, 2026
@gziolo
Copy link
Copy Markdown
Member

gziolo commented Mar 16, 2026

can you confirm optional approach to align to how Gutenberg handles contextual error messages (feel free to ping Gutenberg designers/engineers to verify if needed)?

@jorgefilipecosta or @Mamaduka, what's the latest on showing errors in the UI: global snackbar (kept in this PR) or inline error notice (removed in this PR).

@Mamaduka
Copy link
Copy Markdown
Member

As far as I know, we're still using snackbars for most cases. I think it will remain the same until normal notices are more flexible.

Copy link
Copy Markdown
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Looks good. We can iterate when design recommendations change over time.

@gziolo gziolo merged commit d636281 into WordPress:develop Mar 17, 2026
17 of 18 checks passed
@github-project-automation github-project-automation bot moved this from Needs review to Done in WordPress AI Planning & Roadmap Mar 17, 2026
@juanfra juanfra deleted the tweak/generate-alt-remove-duplicate-error branch March 17, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

5 participants