Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Key Takeaways Feature #843

Merged
merged 17 commits into from
Feb 11, 2025
Merged

Add new Key Takeaways Feature #843

merged 17 commits into from
Feb 11, 2025

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Jan 23, 2025

Description of the Change

This PR adds in a new Feature, called Key Takeaways, that when enabled and configured, introduces a new Key Takeaways block.

This block can only be added once per post and when inserted, will send a request off to the configured Provider to generate the key takeaways of the content and render those as either bullets or paragraphs, depending on the setting in the block. This can be toggled back and forth after the key takeaways have been generated. The key takeaways can also be edited inline or removed.

It also renders a title for this block (defaults to Key Takeaways) that can be edited or deleted altogether. And we have a Refresh button in the sidebar settings for the block, allowing you to regenerated the key takeaways at any point.

Closes #505

Screenshots

Key Takeaways settings Block inserter showing the Key Takeaways block Key takeaways block loading in content Key takeaways block rendered in the editor

How to test the Change

  1. Enable the new Key Takeaways Feature
  2. Configure this to use OpenAI or Azure OpenAI
  3. Go to an existing post that has content (or create a new one) and add the Key Takeaways block
  4. Ensure this block loads in content
  5. Ensure the content renders both in the editor and on the frontend
  6. Try refreshing the results from the sidebar and ensure that works
  7. If desired, try adding a custom prompt to test that functionality

Changelog Entry

Added - New Feature, Key Takeaways, that adds a new block that will generate and output the key takeaways for that post, allowing visitors to get a quick overview of the content without having to read it all.

Credits

Props @dkotter, @jeffpaul

Checklist:

@dkotter dkotter added this to the 3.3.0 milestone Jan 23, 2025
@dkotter dkotter self-assigned this Jan 23, 2025
@dkotter dkotter changed the title WIP: Add new Key Takeaways Feature Add new Key Takeaways Feature Jan 24, 2025
@dkotter dkotter marked this pull request as ready for review January 24, 2025 20:43
@dkotter dkotter requested review from jeffpaul and a team as code owners January 24, 2025 20:43
@github-actions github-actions bot added the needs:code-review This requires code review. label Jan 24, 2025
@jeffpaul
Copy link
Member

Solid work on a Friday!!!

iamdharmesh
iamdharmesh previously approved these changes Feb 10, 2025
Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @dkotter! This looks amazing. I’ve added two minor optional comments, but everything looks good to me.

@dkotter
Copy link
Collaborator Author

dkotter commented Feb 11, 2025

Note the E2E tests on WP Trunk have a few failures related to our insertBlock utility command. I'm assuming something must have changed in WordPress so this will require a fix upstream in our Cypress WP Utils package. Going to merge this in for now

@dkotter dkotter merged commit 355582b into develop Feb 11, 2025
18 of 19 checks passed
@dkotter dkotter deleted the feature/tldr-block branch February 11, 2025 18:39
@jeffpaul
Copy link
Member

BTW I love the /tldr block inserter command!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Key Takeaways / TLDR block
3 participants