Skip to content

feat: Add new TableCellSortButton#725

Merged
kurtdoherty merged 1 commit intomainfrom
feat-add-table-cell-sort-button
Aug 28, 2025
Merged

feat: Add new TableCellSortButton#725
kurtdoherty merged 1 commit intomainfrom
feat-add-table-cell-sort-button

Conversation

@kurtdoherty
Copy link
Contributor

@kurtdoherty kurtdoherty commented Aug 28, 2025

Context

  • We have table atoms in @reapit/elements/lab/table, but these don't facilitate the level of nuance required by the DS. For example:
    • They are pinned to semantic table elements like td, tr and so on, but we may need the flexibility of using them in a div-based DOM structure instead.
    • They do not provide any solution for the primary row action (which is meant to appear like the row itself is interactive).
    • They do not provide any solution for rendering row header cells.
    • They require column widths to be defined at the cell-level of the table rather than once at the table-level.
  • We want to enhance the capability of our table atoms when implementing "official" core versions of them (i.e. the table atoms that will be available via @reapit/elements/core/table.
  • The first chunk of this work focused on atoms involved in the table's body and was completed over a number of PRs: feat: Add new TableRowPrimaryAction #715, feat: Add new TableCellPrimaryData #716, feat: Add new TableCellDoubleLineLayout #717, feat: Add new TableBodyCell #718, feat: Add new TableBodyRow #719 and feat: Add new TableBody #720.
  • The next chunk of work will be focused on the atoms involved in the table's head:
    • Part 1: Sort button (this PR)
    • Part 2: Header cell
    • Part 3: Header row
    • Part 4: Table head

This PR

  • Adds TableCellSortButton.
Screenshot 2025-08-28 at 10 59 23 pm Screenshot 2025-08-28 at 10 59 30 pm Screenshot 2025-08-28 at 10 59 36 pm

@rpt-uk-github
Copy link

rpt-uk-github commented Aug 28, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. No issues have been found. (View Details)

@codacy-production
Copy link

codacy-production bot commented Aug 28, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for a2cc30e1 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a2cc30e) Report Missing Report Missing Report Missing
Head commit (bc42b19) 8508 7869 92.49%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#725) 33 33 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@kurtdoherty kurtdoherty marked this pull request as ready for review August 28, 2025 21:53
@kurtdoherty kurtdoherty force-pushed the feat-add-table-cell-sort-button branch from e812446 to bc42b19 Compare August 28, 2025 21:59
@@ -0,0 +1,41 @@
export type SortDirection = 'ascending' | 'descending' | 'none'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: some or all of this may move to a component-agnostic place in future (e.g., perhaps utils). In particular, when we have our search params schema implemented, we'll likely want a sort param schema to help us serialise and parse sort fields and directions to and from the URL.

@kurtdoherty kurtdoherty merged commit 9b90379 into main Aug 28, 2025
6 checks passed
@kurtdoherty kurtdoherty deleted the feat-add-table-cell-sort-button branch August 28, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants