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 “Has Documentation” Tag to Author and Keyword Views #3596

Conversation

luis-gustavo
Copy link
Collaborator

Issue

Closes #3413

Description

This pull request adds the “Has Documentation” tag to the Author and Keyword views, ensuring consistency with the Search view, where this tag was already present.

The implementation involved updating PackageInfo to include the hasDocumentation property from scoreDetails.

Screenshots

  • Search
  • Authors
  • Keywords

Copy link

cla-bot bot commented Jan 13, 2025

Thanks so much for submitting a pull request. We appreciate your contribution!

We require all contributors to sign our Contributor License Agreement (CLA) before we can merge any code, and we don't currently have a record of a signed CLA for @luis-gustavo. Please email [email protected] and let us know you need to sign a CLA, and we'll get the template over to you.

Copy link
Member

@daveverwer daveverwer left a comment

Choose a reason for hiding this comment

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

What a great start, thanks so much for your contribution @luis-gustavo! We really appreciate it.

I tested it locally and all looks good. The only change I'd make is to modify the mock objects for the keyword and author view snapshot tests so that we get the "Has documentation" flair showing in our snapshots to make sure we never break this.

The tests are test_KeywordShow() and test_AuthorShow() and you can find the mocks in KeywordShow+mock.swift and AuthorShow+mock.swift.

@daveverwer
Copy link
Member

What a great start, thanks so much for your contribution @luis-gustavo! We really appreciate it.

I tested it locally and all looks good. The only change I'd make is to modify the mock objects for the keyword and author view snapshot tests so that we get the "Has documentation" flair showing in our snapshots to make sure we never break this.

The tests are test_KeywordShow() and test_AuthorShow() and you can find the mocks in KeywordShow+mock.swift and AuthorShow+mock.swift.

Also, to update the snapshots change .missing to .all in SnapshotTestCase.swift and run the tests.

@daveverwer
Copy link
Member

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Jan 14, 2025
Copy link

cla-bot bot commented Jan 14, 2025

The cla-bot has been summoned, and re-checked this pull request!

@luis-gustavo
Copy link
Collaborator Author

Hi @daveverwer, thanks for the feedback. I have updated the mocks and the snapshot tests. Can you please review again?

Copy link
Member

@daveverwer daveverwer left a comment

Choose a reason for hiding this comment

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

Thank you so much, @luis-gustavo! We really appreciate the help.

@daveverwer daveverwer merged commit 8de1d0a into SwiftPackageIndex:main Jan 14, 2025
7 checks passed
@daveverwer
Copy link
Member

Deploying as 2.116.2

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.

Keyword and Author pages should show "Has documentation" flair
2 participants