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

Austenem/CAT-873 add donor age messaging #3548

Merged
merged 10 commits into from
Oct 2, 2024

Conversation

austenem
Copy link
Collaborator

@austenem austenem commented Sep 25, 2024

Summary

Add messaging where donors with ages > 89 are displayed on search and detail pages, and cap age filter on search page at 90 years.

Design Documentation/Original Tickets

CAT-873 Jira ticket

Testing

Tested for both 90+ aged donors.

Screenshots/Video

Search page:
Screenshot 2024-09-26 at 12 39 52 PM
Dataset detail page:
Screenshot 2024-09-26 at 12 44 17 PM
Donor detail page:
Screenshot 2024-09-26 at 12 40 02 PM
Screenshot 2024-09-26 at 12 40 12 PM
Screenshot 2024-09-26 at 12 44 34 PM

Checklist

  • Code follows the project's coding standards
    • Lint checks pass locally
    • New CHANGELOG-your-feature-name-here.md is present in the root directory, describing the change(s) in full sentences.
  • Unit tests covering the new feature have been added
  • All existing tests pass
  • Any relevant documentation in JIRA/Confluence has been updated to reflect the new feature
  • Any new functionalities have appropriate analytics functionalities added

Copy link
Collaborator

@NickAkhmetov NickAkhmetov left a comment

Choose a reason for hiding this comment

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

Just a few minor tweaks, great work otherwise! Also, would it be possible to add this logic to the MetadataTable component as well to make sure we cover it wherever necessary?

Copy link
Collaborator

@john-conroy john-conroy left a comment

Choose a reason for hiding this comment

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

I should have included this in my PR, but we need to make mapped_metadata potentially undefined in the Donor type.

@austenem
Copy link
Collaborator Author

Just a few minor tweaks, great work otherwise! Also, would it be possible to add this logic to the MetadataTable component as well to make sure we cover it wherever necessary?

I can definitely do that, but the metadata table already has this language in the top info banner - I'd be in favor of replacing that with an inline tooltip like the rest of the messaging, or including both. @tsliaw?

@tsliaw
Copy link
Contributor

tsliaw commented Sep 26, 2024

@austenem I would be fine with a tooltip for the metadata table to keep it consistent. Let's remove the messaging in the info textbox. I think the messaging appears in enough places to be clear about what's going on in this scenario.

Comment on lines 57 to 58
{fieldValue.join(' / ')}
<DonorAgeTooltip donorAge={fieldValue.join(' / ')} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this be able to be converted with Number?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, because the fieldValue array only contains one element - but it might be a bit safer to take only the first element of fieldValue.

@@ -55,7 +55,7 @@ function getByPath(hitSource, field) {
return (
<Stack direction="row">
{fieldValue.join(' / ')}
<DonorAgeTooltip donorAge={fieldValue.join(' / ')} />
<DonorAgeTooltip donorAge={fieldValue[0]} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should check that fieldValue is non-empty.

Copy link
Collaborator

@john-conroy john-conroy left a comment

Choose a reason for hiding this comment

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

Thanks!

@john-conroy
Copy link
Collaborator

Re-ran cypress. Merge once passing.

@austenem austenem merged commit 8220a7e into main Oct 2, 2024
8 checks passed
@austenem austenem deleted the austenem/cat-873-add-donor-age-messaging branch October 2, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants