Automattic / newspack-blocks

Gutenberg blocks for the Newspack project.
207 stars 43 forks source link

feat: add support for Newspack Guest Contributor in HPP blocks #1934

Open leogermani opened 3 weeks ago

leogermani commented 3 weeks ago

All Submissions:

Changes proposed in this Pull Request:

Adds support for the Newspack's Guest Contributor role in the Homepage posts and Carousel blocks

How to test the changes in this Pull Request:

  1. Create a user with only the Guest Contributor role and assign a post to it
  2. Add a Home page posts block
  3. Search by that author name and confirm it finds the author and their posts
  4. Do the same for the Carousel block

Other information:

leogermani commented 1 week ago

Looks like requests in the admin are not offloaded to ES.

I'm struggling to test this. @miguelpeixe could you have a look?

leogermani commented 4 days ago

@dkoo To be fair, this PR does not touch the Query for posts. It only touches the query for authors in the Authors filter input...

miguelpeixe commented 4 days ago

Paging @miguelpeixe who worked on the ES integration in case it's obvious to you.

That was an issue in the first implementation of the ES, which has been fixed since https://github.com/Automattic/newspack-manager/pull/275. Can you confirm you have the latest manager?

I may have misunderstood the issue. It works in the editor but on the front-end. If you have ES enabled for Newspack Blocks that might be a new uncovered incompatibility. We should flag that in Asana for further exploration.

miguelpeixe commented 4 days ago

It only touches the query for authors in the Authors filter input...

The ES incompatibility might be in trunk, to any query filtering CAP authors.

leogermani commented 4 days ago

It only touches the query for authors in the Authors filter input...

The ES incompatibility might be in trunk, to any query filtering CAP authors.

They are not CAP authors. It's just another user role. But they are regular wp users

leogermani commented 3 days ago

I may have misunderstood the issue. It works in the editor but on the front-end.

afaik queries are not offloaded to ES in the admin, only in the front end