Skip to content

feat: add Table.Checkbox#741

Merged
kurtdoherty merged 1 commit intomainfrom
feat-add-table-cell-checkbox
Sep 2, 2025
Merged

feat: add Table.Checkbox#741
kurtdoherty merged 1 commit intomainfrom
feat-add-table-cell-checkbox

Conversation

@kurtdoherty
Copy link
Contributor

Context

This PR

  • Adds TableCellCheckbox.
  • Updates TableBodyCell and TableHeaderCell to support the removal of their default padding.
  • Updates TableBodyRow to support "selected" styling.
  • Adds row selection examples to some docs.

TableCheckbox

Screenshot 2025-09-02 at 4 09 52 pm Screenshot 2025-09-02 at 4 10 01 pm

TableBodyCell and TableHeaderCell

Screenshot 2025-09-02 at 4 10 16 pm

TableBodyRow

Screenshot 2025-09-02 at 4 10 26 pm

TableBody

Screenshot 2025-09-02 at 4 10 38 pm

@rpt-uk-github
Copy link

rpt-uk-github commented Sep 2, 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

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for ad49aee1 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ad49aee) Report Missing Report Missing Report Missing
Head commit (e54b1fe) 8684 8045 92.64%

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 (#741) 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.

@@ -2,12 +2,19 @@ import { css } from '@linaria/core'
import { styled } from '@linaria/react'

export const ElInputCheckboxContainer = styled.div`
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 small scouts to the newly added InputCheckbox component.

@@ -242,6 +244,33 @@ export const Alignment: Story = {
],
}

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: new "no padding" example for TableBodyCell

@@ -27,11 +28,11 @@ const meta = {
children: {
control: 'select',
description: 'The row content.',
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: adding new canned children options that include checkboxes for the row. New stories demonstrating these are further down.

@@ -25,6 +25,13 @@ export const elTableBodyRow = css`
min-height: var(--size-10);
max-height: var(--size-18);

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: new selected styling. Take note of the code comment... we're doing the simplest thing that works for now.

@@ -3,6 +3,7 @@ import { Menu } from '#src/core/menu'
import { TableBody } from './body'
import { TableBodyCell } from '../body-cell'
import { TableBodyRow } from '../body-row'
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: adding checkboxes to the TableBody docs

/**
* A thin wrapper around [Input's checkbox implementation](./?path=/docs/core-input--docs) that is geared
* for use in tables built with [Table](./?path=/docs/core-table--docs).
*/
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: super thin wrapper around the newly added Input

@@ -144,3 +146,30 @@ export const Alignment: Story = {
),
],
}
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: same new "no padding" support for TableHeaderCell as added to TableBodyCell

@@ -6,7 +6,7 @@ import { StatusIndicator } from '#src/core/status-indicator'
import { TableCellPrimaryData } from './primary-data'
import { TagGroup } from '#src/core/tag-group'
import { Text } from '#src/core/text'
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: small scout

@@ -1,12 +1,12 @@
import { getNextSortDirection } from './sort-direction'
import { TableCellSortButton } from './sort-button'
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: small scout

grid-auto-rows: auto;
grid-template-columns: var(--__table-columns);
justify-items: var(--__table-column-justification);
justify-content: var(--__table-column-justification);
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: small fix for broken style

@kurtdoherty kurtdoherty marked this pull request as ready for review September 2, 2025 06:22
@kurtdoherty kurtdoherty merged commit d7d2b17 into main Sep 2, 2025
6 checks passed
@kurtdoherty kurtdoherty deleted the feat-add-table-cell-checkbox branch September 2, 2025 06:22
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