close
Skip to content

fix: Generate Button UX for title generation#433

Merged
dkotter merged 7 commits into
WordPress:developfrom
Takshil-Kunadia:fix/issue-385-title-gen-loading
Apr 16, 2026
Merged

fix: Generate Button UX for title generation#433
dkotter merged 7 commits into
WordPress:developfrom
Takshil-Kunadia:fix/issue-385-title-gen-loading

Conversation

@Takshil-Kunadia
Copy link
Copy Markdown
Contributor

@Takshil-Kunadia Takshil-Kunadia commented Apr 15, 2026

What?

Closes #385

Updates the Title Generation standalone button's loading state to match the standard loading pattern used elsewhere in the plugin (e.g. Excerpt Generation) adding the "Generating…" label and disabling the button while the request is in flight.

Why?

Match the Button UI with other functionalities.

How?

  • Three labels: Generate > Generating… > Re-generate.
  • Added disabled state when request is inflight.

Use of AI Tools

Testing Instructions

  1. In WP Admin, enable the Title Generation experiment.
  2. Normal editing mode:
    1. Create a new post with some body content and an empty title.
    2. Click into the title field and the standalone button should appear above it reading Generate.
    3. Click it. While the request is in flight, verify:
      • The label reads Generating…
      • The button is disabled and cannot be re-clicked
      • The standard busy indicator renders on the button
    4. Once the title populates, verify the button returns to Re-generate and is enabled again.
  3. Template editing mode:
    1. Open a template that contains the Post Title block.
    2. Select the Post Title block → the Re-generate button appears in the block toolbar.
    3. Click it and verify the same three-state label behavior (Generate / Generating… / Re-generate) and that the button is disabled during the request.
  4. Tip: throttle the network to "Slow 3G" in DevTools if the request is too fast to observe the loading state.

Screenshots or screencast

Before After
578809531-5a23be62-4206-4153-9690-b95740131e95 578808410-747bebf2-5678-4653-bfb8-6511da482c55

Changelog Entry

Fixed - Update the Title Generation button's loading state to match the standard loading pattern used across other AI experiments.

Open WordPress Playground Preview

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 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: Takshil-Kunadia <takshil@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>
Co-authored-by: dkotter <dkotter@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 Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.36%. Comparing base (0131263) to head (6220cf7).
⚠️ Report is 8 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #433   +/-   ##
==========================================
  Coverage      68.36%   68.36%           
  Complexity       813      813           
==========================================
  Files             53       53           
  Lines           3945     3945           
==========================================
  Hits            2697     2697           
  Misses          1248     1248           
Flag Coverage Δ
unit 68.36% <ø> (ø)

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 jeffpaul added this to the 0.8.0 milestone Apr 16, 2026
@jeffpaul jeffpaul requested a review from dkotter April 16, 2026 17:01
jeffpaul
jeffpaul previously approved these changes Apr 16, 2026
Copy link
Copy Markdown
Member

@jeffpaul jeffpaul left a comment

Choose a reason for hiding this comment

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

Works well in my testing, thanks!

dkotter
dkotter previously approved these changes Apr 16, 2026
@dkotter dkotter merged commit 6fd8073 into WordPress:develop Apr 16, 2026
18 checks passed
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.

Update title gen loading state

3 participants