Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
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 adds a number of new components that can be used to help participants visualize and gather insight from the survey and device data they have shared, with particular focus on daily log survey entries. This is in the same vein as the existing
InsightMatrixcomponent, which displays a comparative mashup, in tabular form, of similar types of data.These new components operate on the concept of daily
InsightsData, which includes a collection of survey answers and data points from that day. The included data is configurable. TheInsightsDatacan be examined to determine progress toward badges, daily states, detailed overviews, etc. The components are highly configurable, allowing these components to be used in many different situations across a wide variety of projects and use cases.Here is a brief description of each of the new components:
InsightsDataCoordinator- Responsible for the shared loading of relevant dailyInsightsData. It is DateRangeContext aware. It provides a context that child components can use to access the loadedInsightsData.InsightsRenderingCoordinator- This coordinator houses shared badge rendering and daily detail computation configuration. It provides a context that child components can use to access its configuration.InsightsStateCoordinator- This coordinator houses shared state computation and display configuration. It provides a context that child components can use to access its configuration.InsightsBadge- A component that renders as a progress ring surrounding an optional icon. It can be used to indicate progress toward achieving a goal. The configuration used with these generally comes from anInsightsRenderingCoordinator.InsightsRenderer- A component that renders the insights for a particular day. It can render badges and computed details when configured to do so. The configuration for the badges and the detail computation generally come from an -InsightsRenderingCoordinator.InsightsList- A component that renders a reverse chronological list ofInsightsRenderer's.InsightsPreview- A component that conditionally displays anInsightsRendereror a CTA to enter a new log entry (if logging has been been enabled, but not yet completed) for the given day.InsightsCalendar- A multi-state capable calendar component (weekly or monthly) of computed insight states. The weekly variant can also display daily badges when configured to do so. The configuration for the state computations comes from anInsightsStateCoordinator. The configuration for the badges and the detail computation comes from anInsightsRenderingCoordinator.InsightsCalendarDayNavigator- A component that wraps anInsightsCalendarand aDateRangeCoordinator. The calendar is used to navigate and select individual days that are then rendered within the date range coordinator.Screenshots
InsightsRendererwithInsightsBadgeInsightsPreview(logging configured, no log yet)InsightsCalendar(month variant)InsightsCalendarDayNavigatorwithInsightsCalendar(week variant) withInsightsBadgeSecurity
No new security risk. This branch just adds new ways to render data that is already available.
Testing
The vast majority of this can be tested via the Storybook, but the actual data loading will require a live running storybook or ViewBuilder PR.
Documentation
@CareEvolution/api-docs.