-
Notifications
You must be signed in to change notification settings - Fork 45
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: avoid duplicity with linked guest authors #1632
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to reproduce the issue this is trying to fix. My steps on the master branch were:
- Created a user "Jane Doe"
- Created a guest user "Jane Doe"
- Created a "Jane Doe Post" and selected both users as author
- Edited guest user "Jane Doe" to map to the user with the same name
- Created a homepage posts block to filter only "Jane Doe" and this is what I got:

I edited the created post and was surprised to see that the post no longer had 2 authors. I suspect CAP resolved that when the GA was mapped.
Looking into the original issue in Asana, I believe the problem might be related to how the AutocompleteTokenField
behaves.
The component "tokens" are the input labels, so you are not able to select multiple items that share the same name. I believe this should be resolved in 2 ways (not exclusively):
- Append a unique value to the input label, e.g.
Jane Doe (#{id})
- Prevent mapped users from rendering as an option, so you get only one option
What should happen is that you will see both Janes in the dropdown. If they are not linked, that's expected, but if they are linked you should see only one. Good idea adding the ID in the label, I'll have a look. But let me know if you can reproduce the above - and confirm the fix |
I just realized that I completely misinterpreted the PR 😅 I thought it was duplicating posts and not the authors' names. I now understand what to test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I understand what to test I can confirm it's working as described!
The addition to the unique value on the label would be nice but not a blocker for this.
I'd never question the use of "duplicity" to mean duplicate 😆 |
I got what you meant, too. I actually had to look it up because I wasn't sure if my hunch was correct. 🤣 |
# [2.5.0-alpha.2](v2.5.0-alpha.1...v2.5.0-alpha.2) (2023-12-22) ### Bug Fixes * avoid duplicity with linked guest authors ([#1632](#1632)) ([608979c](608979c)) * **modal-checkout:** show order details table with fees ([#1633](#1633)) ([07c0642](07c0642)) ### Features * **modal-checkout:** allow anonymous purchase for registered email ([#1615](#1615)) ([a0040b4](a0040b4))
🎉 This PR is included in version 2.5.0-alpha.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [2.5.0](v2.4.0...v2.5.0) (2024-01-08) ### Bug Fixes * avoid duplicity with linked guest authors ([#1632](#1632)) ([608979c](608979c)) * **modal-checkout:** show order details table with fees ([#1633](#1633)) ([07c0642](07c0642)) ### Features * accessibility improvements to the donate block tabs ([#1622](#1622)) ([115e9fb](115e9fb)) * **donate:** support empty value for "other" tier ([#1604](#1604)) ([61ffdbc](61ffdbc)) * **modal-checkout:** allow anonymous purchase for registered email ([#1615](#1615)) ([a0040b4](a0040b4))
🎉 This PR is included in version 2.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Fixes an issue with CAPs linked authors in the Hompepage posts block
How to test the changes in this Pull Request:
master
add a new Homepage block to a page and search for the author by it name in the "authors" filter boxOther information: