components
components copied to clipboard
refactor: Table column widths uses async store
Description
Refactored table column-widths util with the help of async-store abstraction. Depends on https://github.com/cloudscape-design/components/pull/1246
The refactored variant does not require React context and can be further optimised so that only the affected header columns will be re-rendered and not the entire thead.
How has this been tested?
Existing tests
Performance tests are showing minor improvement:
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.01
:tada:
Comparison is base (
66fc217
) 93.48% compared to head (cc65a75
) 93.49%.
Additional details and impacted files
@@ Coverage Diff @@
## main #1359 +/- ##
==========================================
+ Coverage 93.48% 93.49% +0.01%
==========================================
Files 624 624
Lines 16788 16796 +8
Branches 5548 5548
==========================================
+ Hits 15694 15704 +10
+ Misses 1021 1019 -2
Partials 73 73
Impacted Files | Coverage Δ | |
---|---|---|
src/table/sticky-columns/use-sticky-columns.ts | 100.00% <ø> (ø) |
|
src/table/internal.tsx | 98.66% <100.00%> (+<0.01%) |
:arrow_up: |
src/table/thead.tsx | 95.45% <100.00%> (+0.10%) |
:arrow_up: |
src/table/use-column-widths.ts | 100.00% <100.00%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.