Add the Content Summarization UI#147
Conversation
… the description dynamic
…t from that to update our state. And when inserting the summary block, replace the existing one or insert at the top if there isn't an existing one
…here it's needed. Use this in the block controls regenerate button
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #147 +/- ##
=============================================
- Coverage 49.00% 48.99% -0.02%
- Complexity 469 473 +4
=============================================
Files 30 30
Lines 2306 2329 +23
=============================================
+ Hits 1130 1141 +11
- Misses 1176 1188 +12
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:
|
|
@dkotter perhaps a docs page for this experiment like done in https://github.com/WordPress/ai/pull/155/changes#diff-f70665388390657902e73741dea03efcdadc4bd0ceb4432959f8903ae015c042? |
|
Note we'll want to update the screenshot numbers when this gets merged in, I left it with a hash instead of a number depending on when this versus other experiments get merged in. |
…ton in the block toolbar doesn't extend too far
|
@jeffpaul This is ready for final testing now |
|
@dkotter primary issue I'm seeing is regenerating the summary resets any styles applied to that block, secondary but non-blocking here is the regenerate icon when shown in top toolbar appears to be placed lower than the other icons in the toolbar Screen.Recording.2026-02-05.at.9.59.20.AM.mov |
… to that. Make our button styles more specific so they only apply to the inline toolbar and not the top toolbar
… if there isn't an existing one. If there is an existing one, just update the content when a regeneration happens
Both of these should be fixed now. I've never used the fixed top-toolbar so hadn't tested that but adjusted the styling to work there as well. And modified it so when we generate a summary, if a summary block doesn't exist, we create it and insert it. If it does exist, we now replace the content but leave the rest alone, so things like block styles should persist (inline styling, like bold and italics won't though). |
|
Seeing the Dependency Review check fail, seems is bailing on |
|
Bah, now seeing argparse@2.0.1 with the Python-2.0 license which I do not think is GPL-compatible. Do we know where that's coming in / if its used? |
That's not a dependency we are directly including but in doing some quick digging, seems that is pulled in via Quick fix is to downgrade back to 31.2.0 here though not necessarily a great long-term plan |
|
Let's downgrade for now so we can get this feature merged/released, meantime I'll check with some folks on how best to proceed with >31.2.0 |
Okay, downgrading just that didn't work but I downgraded everything to what is currently in |
jeffpaul
left a comment
There was a problem hiding this comment.
Ok, a quick test and things still work as expected, let's merge this in!
What?
Closes #12
The base Content Summarization Experiment and Ability were added in #136. This PR builds on top of that to add in the actual UI to trigger content summarization within the post editor.
Why?
With #136 merged in, you can manually trigger summarization by using the Ability but there isn't a way to trigger that from the UI. This PR adds in that UI, making that Experiment more useful.
How?
Testing Instructions
Settings > AI Credentialsand ensure you have a valid AI provider configuredSettings > AI Experimentsand ensure you have the Content Summarization Experiment enabledGenerate AI Summarybutton in the Post Status sidebarScreenshots or screencast