Skip to content

Conversation

@naaa760
Copy link
Contributor

@naaa760 naaa760 commented Dec 3, 2025

Closes: #21096

  • Adds size prop to DataTableSkeleton to match DataTable row sizing (xs, sm, md, lg, xl) for visual consistency between loading and data states.

Changelog

New

  • Added size prop to DataTableSkeleton with test coverage

@naaa760 naaa760 requested a review from a team as a code owner December 3, 2025 09:35
@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 12f9af3
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/693004709ff9d2000859556a
😎 Deploy Preview https://deploy-preview-21111--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.87%. Comparing base (7da22c2) to head (12f9af3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21111      +/-   ##
==========================================
+ Coverage   92.62%   96.87%   +4.24%     
==========================================
  Files         515      158     -357     
  Lines       38225    23711   -14514     
  Branches     5861      951    -4910     
==========================================
- Hits        35406    22970   -12436     
+ Misses       2670      731    -1939     
+ Partials      149       10     -139     
Flag Coverage Δ
main-packages ?
web-components 96.87% <ø> (-0.01%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 12f9af3
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/69300470329468000876c8da
😎 Deploy Preview https://deploy-preview-21111--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 12f9af3
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/693004703a07720008b46ccd
😎 Deploy Preview https://deploy-preview-21111--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@adamalston adamalston left a comment

Choose a reason for hiding this comment

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

Can you update the API snapshot?

Comment on lines +97 to +103
it('should respect the size prop', () => {
render(<DataTableSkeleton size="xs" />);

expect(screen.getByRole('table')).toHaveClass(
`${prefix}--data-table--xs`
);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest also including a check for the prop's default value.

showToolbar?: boolean;


size?: DataTableSize;
Copy link
Contributor

Choose a reason for hiding this comment

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

Has this code been formatted?

Suggested change
size?: DataTableSize;
/*
* Changes the row height of table.
*/
size?: DataTableSize;

showToolbar: PropTypes.bool,


size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
/*
* Changes the row height of table.
*/
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),

@maradwan26
Copy link
Contributor

@naaa760 Snapshot tests are failing due to mismatches. Run yarn test -u at the root level and commit the changes to resolve them.

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.

[Feature Request]: Support size prop in DataTableSkeleton for consistent row sizing

3 participants