Repository navigation
Title Generation: Re-attach the title toolbar after switching to the Code editor and back - #1444
SainathPoojary wants to merge 2 commits into
Conversation
…Code editor and back
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1444 +/- ##
==========================================
Coverage 85.59% 85.59%
Complexity 5091 5091
==========================================
Files 193 193
Lines 18425 18425
==========================================
Hits 15770 15770
Misses 2655 2655
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
What?
Brings back the Title Generation toolbar after switching to the Code editor and back.
Why?
After you switch to the Code editor and back to the Visual editor, the "Generate" toolbar above the post title is gone until you reload the page. This is the same problem as #693, but with a different trigger.
How?
The toolbar code watches the editor page for changes so it can add the toolbar back. It watches only the first editor page. The Code editor removes that page, and the Visual editor creates a new one, so the code keeps watching a page that no longer exists.
This PR listens for the editor mode. When it changes back to Visual, the code watches the new page and adds the toolbar again. It uses the same
subscribepattern asblock-container-label-generation/components/RenameModalWrapper.tsx.It also adds an e2e test for this case.
Use of AI Tools
Testing Instructions
Screenshots or screencast
Before
Screen.Recording.2026-11-27.at.8.05.35.PM.mov
After
Screen.Recording.2026-11-27.at.8.04.01.PM.mov
Changelog Entry