Skip to content

RelativeActivity: Hide when no data types can be rendered.#577

Merged
greinard merged 2 commits intomainfrom
RelativeActivityFixes
Mar 18, 2026
Merged

RelativeActivity: Hide when no data types can be rendered.#577
greinard merged 2 commits intomainfrom
RelativeActivityFixes

Conversation

@greinard
Copy link
Collaborator

Overview

This branch makes a small update to the RelativeActivity component such that it hides when all data types are using a 30 day average threshold and none have enough data to compute it. Previously, the title (if configured) and the mdhui-relative-activity-average-marker would display by themselves when this situation occurred.

The adjustment is to only add results to the transformed results when both threshold and relativePercent are defined. Transformed results that are missing either of these are ignored when rendering, so by excluding them during the transformation, we prevent rendering when no data types will be rendered anyways.

I also noticed an unused code path in the day coordinator, so I went ahead and removed that too.

Security

  • I have ensured no secure credentials or sensitive information remain in code, metadata, comments, etc.
    • Please verify that you double checked that .storybook/preview.js does not contain your participant access key details.
    • There are no temporary testing changes committed such as API base URLs, access tokens, print/log statements, etc.
  • These changes do not introduce any security risks, or any such risks have been properly mitigated.

No new security concerns. Just a rendering adjustment.

Testing

  • This change can be adequately tested using the MDH Storybook.
  • This change requires additional testing in the MDH iOS/Android/Web apps. (Create a pre-release tag/build and test in a ViewBuilder PR.)

I have updated the Storybook to include some new preview states that can be used to test this update.

Documentation

  • I have added relevant Storybook updates to this PR.
  • If this feature requires a developer doc update, I have tagged @CareEvolution/api-docs.
  • This change does not impact documentation or Storybook.

@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-577.d1xp2kmk6zrv44.amplifyapp.com

@greinard
Copy link
Collaborator Author

Thanks @ajmenca.

@greinard greinard merged commit 7cca088 into main Mar 18, 2026
8 checks passed
@greinard greinard deleted the RelativeActivityFixes branch March 18, 2026 19:51
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.

2 participants