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(Table): Added three props to control wrapping in the Table component #347

Merged
merged 3 commits into from
May 15, 2024

Conversation

shindigira
Copy link
Contributor

@shindigira shindigira commented May 15, 2024

closes #344

Changes

  • Adds cellDisableWordWrap, cellWordBreak and headerWordWrap props to Table columns

How to test

  • Toggle cellDisableWordWrap, cellWordBreak and headerWordWrap in the LongCharacterSets Table story.

Screenshots

Default

Screenshot 2024-05-15 at 12 50 38 PM

Column 1 cells - no-wrap, Column 2 cells - wrap

Screenshot 2024-05-15 at 12 52 57 PM

Copy link

netlify bot commented May 15, 2024

Deploy Preview for cfpb-design-system-react ready!

Name Link
🔨 Latest commit df3dde4
🔍 Latest deploy log https://app.netlify.com/sites/cfpb-design-system-react/deploys/66452f86fae4de0008a15a41
😎 Deploy Preview https://deploy-preview-347--cfpb-design-system-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 site configuration.

Copy link
Contributor

@meissadia meissadia left a comment

Choose a reason for hiding this comment

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

Could use some clarification, along with adjustments to sample data that better demonstrate how the new props cause data rendering to change.

@@ -158,3 +158,26 @@ export const FixedWidth: Story = {
]
}
};

const maxUidTestRows = [...Array.from({ length: 20 }).keys()].map(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still curious why even 20 rows are needed? The character count of every row is exactly the same. I'd even argue that having a single row of demo data would be easier for users to adjust props on (especially since changing the prop configuration requires editing the array directly).

@shindigira shindigira merged commit 5ce34f6 into main May 15, 2024
8 of 10 checks passed
@shindigira shindigira deleted the 344-table-word-break branch May 15, 2024 22:23
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.

[Table] columns should have a word break option
2 participants