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

fix(author-profile): only display guest author profile when linked #1688

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

chickenn00dle
Copy link
Contributor

@chickenn00dle chickenn00dle commented Mar 6, 2024

All Submissions:

Changes proposed in this Pull Request:

Closes 0/1206709674365921/1205704843507324/f

This PR addresses an issue where it was possible to select a WP user account that was linked to a guest author account in the author profile block. Previously we weren't correctly filtering out linked WP users in the block whenever a search term was input that matched the WP user but not the linked guest author.

This PR fixes this by changing the strategy for fetching authors to first fetch only unlinked guest authors, then fetch users, and finally swap out any linked WP users with their respective guest author accounts.

Screenshot 2024-03-06 at 14 50 34

How to test the changes in this Pull Request:

  1. With Co-Authors Plus installed, add some guest authors and link them to some WP users that are at least author roles. Make sure you also have some unlinked authors as well. Also make sure the names are very different from one another (i.e. I Am Author / The Best Guest)
  2. Add an Author Profile block to any page and search for a linked WP author. Confirm there are no results in the suggestion dropdown and you cannot select the linked WP author.
  3. Now search for the corresponding guest author. Confirm the author does appear in the dropdown and is selectable.
  4. Confirm the correct Guest Author info appears in the block in both the editor and site front end.
  5. Repeat the above steps for a non-linked author and confirm you are able to select this account as well
  6. Do some additional smoke tests with other accounts with different naming similarity levels (i.e. Test Author / Test Guest Author)

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?

@chickenn00dle chickenn00dle marked this pull request as ready for review March 6, 2024 19:51
@chickenn00dle chickenn00dle requested a review from a team as a code owner March 6, 2024 19:51
@chickenn00dle chickenn00dle merged commit ee1bb21 into trunk Mar 7, 2024
8 checks passed
@chickenn00dle chickenn00dle deleted the fix/always-render-guest-author-profile branch March 7, 2024 22:04
matticbot pushed a commit that referenced this pull request Mar 7, 2024
## [3.0.5-alpha.1](v3.0.4...v3.0.5-alpha.1) (2024-03-07)

### Bug Fixes

* **author-profile:** only display guest author profile when linked ([#1688](#1688)) ([ee1bb21](ee1bb21))
* correct carousel button styles in editor ([#1680](#1680)) ([d4aba73](d4aba73))
* **modal-checkout:** ensure customer location when state is required but country is not ([#1683](#1683)) ([27badf8](27badf8))
@matticbot
Copy link
Contributor

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

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Mar 25, 2024
## [3.0.5](v3.0.4...v3.0.5) (2024-03-25)

### Bug Fixes

* **author-profile:** only display guest author profile when linked ([#1688](#1688)) ([ee1bb21](ee1bb21))
* correct carousel button styles in editor ([#1680](#1680)) ([d4aba73](d4aba73))
* **modal-checkout:** ensure customer location when state is required but country is not ([#1683](#1683)) ([27badf8](27badf8))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.1.0-epic-ras-acc.3 🎉

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.

None yet

3 participants