RelativeActivity: Hide when no data types can be rendered.#577
Merged
RelativeActivity: Hide when no data types can be rendered.#577
Conversation
…hold and none have enough data to compute it.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
ajmenca
approved these changes
Mar 18, 2026
Collaborator
Author
|
Thanks @ajmenca. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This branch makes a small update to the
RelativeActivitycomponent 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 themdhui-relative-activity-average-markerwould display by themselves when this situation occurred.The adjustment is to only add results to the transformed results when both
thresholdandrelativePercentare 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
No new security concerns. Just a rendering adjustment.
Testing
I have updated the Storybook to include some new preview states that can be used to test this update.
Documentation
@CareEvolution/api-docs.