Skip to content

[Docs] typed Datatable story#5856

Open
Sulaymon333 wants to merge 3 commits intomasterfrom
add-typed-datatable-story
Open

[Docs] typed Datatable story#5856
Sulaymon333 wants to merge 3 commits intomasterfrom
add-typed-datatable-story

Conversation

@Sulaymon333
Copy link
Collaborator

Deploy Preview

What does this PR do?

  • add typing and improved column data and formatting

What are the relevant issues?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

Screenshots (if appropriate)

Should this PR be mentioned in Design System updates?

Is this change backwards compatible or is it a breaking change?

Copilot AI review requested due to automatic review settings February 24, 2026 18:17
@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

⚠️ No Changeset found

Latest commit: 32ea137

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Feb 24, 2026

Deploy Preview for hpe-theme-preview ready!

Name Link
🔨 Latest commit 32ea137
🔍 Latest deploy log https://app.netlify.com/projects/hpe-theme-preview/deploys/699f12edcc7f0e00087b9a75
😎 Deploy Preview https://deploy-preview-5856--hpe-theme-preview.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 Feb 24, 2026

Deploy Preview for unrivaled-bublanina-3a9bae ready!

Name Link
🔨 Latest commit 32ea137
🔍 Latest deploy log https://app.netlify.com/projects/unrivaled-bublanina-3a9bae/deploys/699f12ed59b4660008ea73bb
😎 Deploy Preview https://deploy-preview-5856--unrivaled-bublanina-3a9bae.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 Feb 24, 2026

Deploy Preview for hpe-design-icons-grommet ready!

Name Link
🔨 Latest commit 32ea137
🔍 Latest deploy log https://app.netlify.com/projects/hpe-design-icons-grommet/deploys/699f12edc54b2e0008a7088c
😎 Deploy Preview https://deploy-preview-5856--hpe-design-icons-grommet.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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds proper TypeScript typing to the DataTable Storybook story and improves the data formatting for the percent column. The changes remove the previous workaround (TypedDataTable cast to any) and implement a properly typed solution using generic types from Grommet's DataTable component.

Changes:

  • Removed the TypedDataTable workaround and added proper generic typing with Datum type
  • Converted percent values from strings ("20%") to numbers (20) and added Intl.NumberFormat for proper formatting
  • Reorganized code to define DATA before columns for better type inference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

},
];

const percentFormatter = new Intl.NumberFormat('en-US', {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could be helpful for other data stories. Would it be worth adding into a new helpers.tsx under utils?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes sure, I can create a follow on issue/PR once the structure of the stories are finalized.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@britt6612 britt6612 left a comment

Choose a reason for hiding this comment

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

looks good agree with keeping the
satisfies Meta<typeof DataTable<Datum>>

need to fix merge conflicts

@britt6612 britt6612 requested a review from jcfilben March 3, 2026 15:53
@jcfilben
Copy link
Collaborator

jcfilben commented Mar 3, 2026

Looks good, just need to resolve merge conflicts

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.

5 participants