Repository navigation
Excerpt Generation: Move generation into its own sidebar panel with a review modal - #1139
ntsekouras wants to merge 2 commits into
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. |
| onClose: () => void; | ||
| } | ||
|
|
||
| function CopyButton( { |
There was a problem hiding this comment.
Not for this PR, but some components could be reused across experiments. I think it would help with UI consistency without the risk of drifting.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1139 +/- ##
==========================================
Coverage 81.67% 81.67%
Complexity 3103 3103
==========================================
Files 129 129
Lines 12334 12335 +1
==========================================
+ Hits 10074 10075 +1
Misses 2260 2260
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:
|
| ### Changed | ||
| - Move Excerpt Generation into its own document sidebar panel instead of injecting buttons into the core excerpt field ([#1139](https://github.com/WordPress/ai/pull/1139)). |
There was a problem hiding this comment.
No need for this entry. Changelog is built at release time so as long as this changelog entry is in the PR description, that's good enough
jeffpaul
left a comment
There was a problem hiding this comment.
My biggest concern is that there's nothing around the primary excerpt location for this, only a new sidebar panel below. Not sure moving the excerpt generation away from the excerpt field improves the authoring/editing workflows. I'm open to the amended excerpt generation modal approach, but would wildly prefer that injected into the existing excerpt modal than how this PR currently works.
So you can read the original PR (#1129) and particularly my comment and the follow ups. It seems the hook we were using to inject into that excerpt panel is being removed, likely in WP 7.2, and so this is an alternative that will still work once 7.2 goes out. I agree though that this seems like a downgrade from what we have but if this WordPress/Gutenberg isn't going to give us* a better entry point, we don't have many options. * Worth maybe an upstream issue/comment to see if we can get hooks in place? I know we had some traction on similar requests (though still waiting changes) so this may be another one we can ask on? |
|
@oandregal as the one working on the upstream changes in Gutenberg, what's your advice on the most optimal user experience here? |
|
JFYI the PR in GB to stabilize the DataForm inspector is up and is aimed to land today (and for 7.2). |
What?
See WordPress/gutenberg#76076
Alternative to #1129, following the suggestion in #1129 (comment) to match the Meta Description experience.
Replaces the two buttons the Excerpt Generation experiment injected into core's excerpt UI with a single "Excerpt generation" panel in the document sidebar, registered via
PluginDocumentSettingPanel. Generation happens in a modal where the suggestion can be reviewed and edited before it is applied to the post.Why?
Gutenberg's DataForm-based inspector (see the linked issue) replaces the post summary and never renders the
__experimentalPluginPostExcerptslot, so the popover button would stop appearing there.Independently of that, relying on a deprecated slot and injecting markup next to core's excerpt field by targeting class names was never a sound integration.
PluginDocumentSettingPanelis the supported extension point and renders below the summary in both inspectors.Compared to #1129, the modal keeps the experience consistent with Meta Description and lets the user edit and approve the suggestion before anything is written to the excerpt, instead of applying it automatically.
How?
PluginDocumentSettingPanelreplaces the inline button and the popover fill. It follows core's Excerpt panel preference, so it hides when that panel is disabled or removed.MetaDescriptionModal: an editable textarea with Apply, Regenerate, Copy to clipboard and Cancel. Closing the modal cancels an in-flight request. The hook only writes the excerpt to the store on Apply.Testing Instructions
Screenshots or screencast
Before and after, same flow:
excerpt-generation-modal-before-after.mp4
Same flow with the DataForm inspector experiment:
excerpt-generation-modal-dataform-inspector.mp4
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Fable 5.1
Used for: Implementation, e2e tests, docs and changelog drafts; reviewed, directed and edited by me.