components
components copied to clipboard
refactor: Async store util
Description
Addressing feedback from https://github.com/cloudscape-design/components/pull/1240.
Usage examples:
- https://github.com/cloudscape-design/components/pull/1359
- https://github.com/cloudscape-design/components/pull/1402
How has this been tested?
Reworked unit tests for better structure.
Added an integration test.
Tested with React 16, 17, 18.
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
- Changes include appropriate documentation updates.
-
Changes are backward-compatible if not indicated, see
CONTRIBUTING.md
. -
Changes do not include unsupported browser features, see
CONTRIBUTING.md
. - Changes were manually tested for accessibility, see accessibility guidelines.
Security
-
If the code handles URLs: all URLs are validated through the
checkSafeUrl
function.
Testing
- Changes are covered with new/existing unit tests?
- Changes are covered with new/existing integration tests?
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Codecov Report
Patch coverage: 100.00%
and project coverage change: +0.02%
:tada:
Comparison is base (
f7f381b
) 93.89% compared to head (d33ba0d
) 93.91%.
Additional details and impacted files
@@ Coverage Diff @@
## main #1246 +/- ##
==========================================
+ Coverage 93.89% 93.91% +0.02%
==========================================
Files 642 642
Lines 17259 17259
Branches 5675 5675
==========================================
+ Hits 16205 16209 +4
+ Misses 982 978 -4
Partials 72 72
Files Changed | Coverage Δ | |
---|---|---|
src/area-chart/chart-container.tsx | 93.10% <ø> (ø) |
|
src/area-chart/elements/area-chart-legend.tsx | 100.00% <ø> (ø) |
|
src/area-chart/elements/data-series.tsx | 100.00% <ø> (ø) |
|
src/area-chart/elements/highlighted-point.tsx | 100.00% <ø> (ø) |
|
src/area-chart/elements/use-highlight-details.ts | 100.00% <ø> (ø) |
|
src/area-chart/elements/vertical-marker.tsx | 100.00% <ø> (ø) |
|
src/table/sticky-columns/use-sticky-columns.ts | 100.00% <ø> (ø) |
|
src/area-chart/model/interactions-store.ts | 77.14% <100.00%> (ø) |
|
src/area-chart/model/use-chart-model.ts | 86.06% <100.00%> (ø) |
|
src/internal/async-store/index.ts | 100.00% <100.00%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.