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

feat(homepage-posts): support deduplication toggling #1543

Merged
merged 6 commits into from
Oct 4, 2023

Conversation

miguelpeixe
Copy link
Member

@miguelpeixe miguelpeixe commented Oct 2, 2023

All Submissions:

Changes proposed in this Pull Request:

1205451924709229-as-1205631504130139

Implements a toggle to allow a Homepage Posts block to be excluded to deduplication logic.

Without deduplication, the block will not account for previously queried posts and will also not have their queried posts as part of the exclusion for the following blocks.

image
Default deduplication With "Block 2" opted-out
image image

Closes #258.

How to test the changes in this Pull Request:

  1. Check out this branch and draft a new page with 3 Homepage Posts block, similar to the image above
  2. Toggle the "Use deduplication logic" off in the second block and confirm the content is duplicate from the previous block and the third block renders the content that was previously being rendered in the edited block (same as the image above)
  3. Save, visit the page, and confirm the same behavior persists
  4. Edit the page and change the second block to "Choose Specific Posts"
  5. Select a post from the first block and confirm the post renders without interfering with the previous block
  6. Save, visit the page, and confirm the same behavior persists

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@miguelpeixe miguelpeixe self-assigned this Oct 2, 2023
@miguelpeixe miguelpeixe marked this pull request as ready for review October 2, 2023 20:37
@miguelpeixe miguelpeixe requested a review from a team as a code owner October 2, 2023 20:37
Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

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

Works nicely!

@miguelpeixe
Copy link
Member Author

Thanks, @dkoo! I'll for this one to be approved before merging so it doesn't risk breaking campaigns.

@miguelpeixe miguelpeixe merged commit 6acc719 into master Oct 4, 2023
@miguelpeixe miguelpeixe deleted the feat/homepage-posts-toggle-deduplication branch October 5, 2023 15:08
matticbot pushed a commit that referenced this pull request Oct 16, 2023
# [2.0.0-alpha.1](v1.75.5...v2.0.0-alpha.1) (2023-10-16)

### Bug Fixes

* **donate:** allow "once" in tiers-based layout ([ad7268a](ad7268a))
* **homepage-posts:** check existing "specific posts" recursively for deduplication ([#1541](#1541)) ([9755e40](9755e40))
* newspack.pub > newspack.com ([#1552](#1552)) ([343b80b](343b80b))

### Features

* add option for a button after checkout ([#1521](#1521)) ([bdfb3c2](bdfb3c2))
* **homepage-posts:** support deduplication toggling ([#1543](#1543)) ([6acc719](6acc719))
* remove AMP compatibility ([27ecf88](27ecf88))

### BREAKING CHANGES

* AMP will not be supported anymore by this plugin.
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.0.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Oct 31, 2023
# [2.0.0](v1.75.6...v2.0.0) (2023-10-31)

### Bug Fixes

* **donate:** allow "once" in tiers-based layout ([ad7268a](ad7268a))
* **homepage-posts:** check existing "specific posts" recursively for deduplication ([#1541](#1541)) ([9755e40](9755e40))
* newspack.pub > newspack.com ([#1552](#1552)) ([343b80b](343b80b))
* update WC's variation methods ([860f9fa](860f9fa))

### Features

* add option for a button after checkout ([#1521](#1521)) ([bdfb3c2](bdfb3c2))
* **homepage-posts:** support deduplication toggling ([#1543](#1543)) ([6acc719](6acc719))
* **modal checkout:** post-checkout newsletter signup ([#1561](#1561)) ([092007a](092007a))
* **modal-checkout:** implement ras overlay ([#1562](#1562)) ([8270c9b](8270c9b))
* remove AMP compatibility ([27ecf88](27ecf88))

### BREAKING CHANGES

* AMP will not be supported anymore by this plugin.
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Article Block: Ability to show duplicate posts
3 participants