Add new "On Demand Mode" for Key Takeaways processing#1127
Open
dkotter wants to merge 9 commits into
Open
Conversation
…eration, including a new REST endpoint and settings
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Very similar to #1125 but adding this to Key Takeaways instead of TTS.
The Key Takeaways Feature currently only has a single "mode", manually adding the block to the post you want. This works fine but does require a user do this on each post. In addition, requires the summary to be generated in advance even if there aren't any users that care to read that summary.
This PR introduces a new setting to control the processing mode, defaulting to "manual" and adding a new "on-demand
option. When "on-demand" is chosen, a few additional settings are shown, like the post types this should apply to, the button label and the display format.
With this new mode turned on, a button will show at the top of the content for the single view for each supported post type. When you click this button, it will either render existing Key Takeaways or will generate those on-demand. Once generated, those are stored and re-used the next time.
Couple things to keep in mind:
Screenshot and screenshare
on-demand-key-takeaways.mp4
How to test the Change
npm i && npm run buildChangelog Entry
Credits
Props @dkotter
Checklist: