Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tables)!: add $isLoading prop to SimpleTable.Td, normalize all tables margins/heights & checkboxes #1200

Merged

Conversation

ivangabriele
Copy link
Member

@ivangabriele ivangabriele commented May 23, 2024

BREAKING CHANGES

  • Remove isChecked prop in TableWithSelectableRows.RowCheckbox, replaced by native checked prop.
  • Remove isIndeterminate prop in TableWithSelectableRows.RowCheckbox, replaced by original Rsuite indeterminate prop.
  • Remove $isHighlighted prop in TableWithSelectableRows.Td, replaced by the same prop on TableWithSelectableRows.BodyTr.
  • In order to work properly with RowCheckbox, TableWithSelectableRows now requires <Table $withRowCheckbox />.
  • Following the SimpleTable & TableWithSelectableRows margins/heights normalization, including a few hacks,
    it may break some UI widths & heights.
  • Please check TableWithSelectableRows.stories.tsx to see a full example on how to use/update it.
  • As shown in the story, be careful NOT to wrap the checkbox table header cell
    within <TableWithSelectableRows.SortContainer /> since the flex display breaks its internal positioning.

Features

Fixes

  • fix ellipsis when SimpleTable.Th width is set while not set in SimpleTable.Td (// TableWithSelectableRows)
  • deprecate $width prop from TableWithSelectableRows.Td (removed by breaking change)

Related Pull Requests & Issues

Preview URL

https://637e01cf5934a2ae881ccc9d-bebahrewee.chromatic.com/

Screenshots

image

image

- add `$isLoading` prop to `SimpleTable.Td (& `TableWithSelectableRows.Td`)
- add `$width` prop to `SimpleTable.Th` (& `TableWithSelectableRows.Th`)
- add & expose `SimpleTable.CellLoader` (& `TableWithSelectableRows.CellLoader`)
- fix ellipsis when `SimpleTable.Th` width is set while not set in `SimpleTable.Td` (// `TableWithSelectableRows`)
- deprecate `$width` prop from `TableWithSelectableRows.Td`
@ivangabriele ivangabriele force-pushed the ivan/feat-tables-add-isLoading-prop-to-SimpleTable.Td branch from d8eb90b to faf9342 Compare May 23, 2024 14:32
Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.39%. Comparing base (f655623) to head (cd9d2f1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1200   +/-   ##
=======================================
  Coverage   57.39%   57.39%           
=======================================
  Files          55       55           
  Lines         805      805           
  Branches      274      267    -7     
=======================================
  Hits          462      462           
- Misses        327      343   +16     
+ Partials       16        0   -16     
Flag Coverage Δ
unit 57.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ivangabriele ivangabriele force-pushed the ivan/feat-tables-add-isLoading-prop-to-SimpleTable.Td branch from e5b5f10 to 90e870c Compare May 23, 2024 18:27
@ivangabriele ivangabriele changed the title feat(tables): add $isLoading prop to SimpleTable.Td feat(tables)!: add $isLoading prop to SimpleTable.Td, normalize all tables margins/heights & checkboxes May 23, 2024
BREAKING CHANGE:

- Remove `isChecked` prop in `TableWithSelectableRows.RowCheckbox`, replaced by native `checked` prop.
- Remove `isIndeterminate` prop in `TableWithSelectableRows.RowCheckbox`, replaced by original Rsuite `indeterminate` prop.
- Remove `$isHighlighted` prop in `TableWithSelectableRows.Td`, replaced by the same prop on `TableWithSelectableRows.BodyTr`.
- In order to work properly with `RowCheckbox`, `TableWithSelectableRows` now requires `<Table $withRowCheckbox />`.
- Following the `SimpleTable` & `TableWithSelectableRows` margins/heights normalization, including a few hacks,
  it may break some UI widths & heights.
- Please check `TableWithSelectableRows.stories.tsx` to see a full example on how to use/update it.
- As shown in the story, be careful **NOT** to wrap the checkbox table header cell
  within `<TableWithSelectableRows.SortContainer />` since the flex display breaks its internal positioning.
@ivangabriele ivangabriele force-pushed the ivan/feat-tables-add-isLoading-prop-to-SimpleTable.Td branch from 90e870c to cd9d2f1 Compare May 23, 2024 18:46
@ivangabriele ivangabriele merged commit 23afb70 into main May 27, 2024
22 checks passed
@ivangabriele ivangabriele deleted the ivan/feat-tables-add-isLoading-prop-to-SimpleTable.Td branch May 27, 2024 00:14
@ivangabriele
Copy link
Member Author

🎉 This PR is included in version 18.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants