Hide title generation until content exists#479
Hide title generation until content exists#479dhrupo wants to merge 1 commit intoWordPress:developfrom
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #479 +/- ##
==========================================
Coverage 69.06% 69.06%
Complexity 957 957
==========================================
Files 60 60
Lines 4512 4512
==========================================
Hits 3116 3116
Misses 1396 1396
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What?
Closes #391
Hides the Title Generation control until the post has body content, and adds an e2e regression test for that empty-state behavior.
Why?
The current UI shows the title generation toolbar even when there is no content to generate from. That creates a confusing empty-state flow and matches the behavior reported in #391.
How?
The title toolbar now reads live editor state with
useSelectand returnsnullwhen the edited post content is empty. The existing Generate/Regenerate labeling stays the same once content exists. An e2e test was added to verify the toolbar stays hidden for a blank post and appears after content is added.Use of AI Tools
AI assistance: Yes
Tool(s): Codex
Model(s): GPT-5
Used for: Drafting the implementation and regression test; final changes were reviewed and edited before submission.
Testing Instructions
Generatelabel.Regeneratelabel.Ran locally:
npm run typechecknpm run lint:js -- src/experiments/title-generation/components/TitleToolbar.tsx tests/e2e/specs/experiments/title-generation.spec.jsChangelog Entry