altinn-studio icon indicating copy to clipboard operation
altinn-studio copied to clipboard

Create StudioTable components

Open ErlingHauan opened this issue 9 months ago • 1 comments

Description

Created two new Studio components, StudioTableRemotePaginationand StudioTableLocalPagination. They are visually identical, but handles pagination and sorting differently.

StudioTableRemotePagination should be used where pagination and sorting is handled externally, and data is fetched pagewise in chunks. This will be the replacement of the MUI DataGrid component that is currently used in the dashboard.

StudioTableLocalPagination is a wrapper around StudioTableRemotePagination. It should be used when a complete data set has been fetched. Here, the pagination and sorting will be handled internally by the component itself.

Screenshot

image

Related Issue(s)

#9191

Verification

  • [x] Your code builds clean without any errors or warnings
  • [x] Manual testing done (required)
  • [x] Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • [ ] User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)
  • [x] Added documentation to Storybook

ErlingHauan avatar Apr 30 '24 12:04 ErlingHauan

Codecov Report

Attention: Patch coverage is 96.51163% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 90.28%. Comparing base (b477008) to head (dd8a207). Report is 10 commits behind head on main.

Files Patch % Lines
...bs/studio-components/src/hooks/useTableSorting.tsx 92.00% 1 Missing and 1 partial :warning:
...ableLocalPagination/StudioTableLocalPagination.tsx 95.65% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12731      +/-   ##
==========================================
+ Coverage   90.26%   90.28%   +0.02%     
==========================================
  Files        1320     1327       +7     
  Lines       18953    19039      +86     
  Branches     2313     2335      +22     
==========================================
+ Hits        17107    17190      +83     
- Misses       1582     1583       +1     
- Partials      264      266       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 02 '24 11:05 codecov[bot]