Add multi-state capability to the CalendarDay component. #553
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 multi-state capability to the
CalendarDaycomponent.Previously, a fixed state configuration was supplied to the component. The component would dynamically acquire the single state key to use for each day, pull that state from the fixed state configuration, and apply it. This mechanism has been deprecated.
The new state acquisition mechanism does not require a fixed state configuration up front. Instead, the component dynamically asks for a collection of states to apply to each day. The states for a given day can also have a note and/or custom display value attached. The Storybook has been updated to demonstrate these new rendering options.
This change is intended to be fully backward compatible, so existing usage of the
CalendarDaycomponent should not need to be updated until we decide to remove the deprecated functionality in a future major release.Single-State | Multi-State
Other Notable Items
predictableRandomNumberhelper function.Security
No new security risks. This is just an adjustment to how a bit of rendering configuration is managed and applied.
Testing
Some basic regression should be performed on the
AsthmaControlCalendarand theSeverityCalendarto ensure they still function as expected.Documentation
@CareEvolution/api-docs.