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

va-table: add striped variation #1439

Merged
merged 7 commits into from
Dec 17, 2024
Merged

va-table: add striped variation #1439

merged 7 commits into from
Dec 17, 2024

Conversation

jamigibbs
Copy link
Contributor

@jamigibbs jamigibbs commented Dec 16, 2024

Chromatic

https://3448-va-table-striped--65a6e2ed2314f7b8f98609d8.chromatic.com

Description

This adds the USWDS striped variation to va-table.

Closes department-of-veterans-affairs/vets-design-system-documentation#3448

QA Checklist

  • Component maintains 1:1 parity with design mocks
  • Text is consistent with what's been provided in the mocks
  • Component behaves as expected across breakpoints
  • Accessibility expert has signed off on code changes (if applicable. If not applicable provide reason why)
  • Designer has signed off on changes (if applicable. If not applicable provide reason why)
  • Tab order and focus state work as expected
  • Changes have been tested against screen readers (if applicable. If not applicable provide reason why)
  • New components are covered by e2e tests; updates to existing components are covered by existing test suite
  • Changes have been tested in vets-website using Verdaccio (if applicable. If not applicable provide reason why)

Screenshots

Basic bordered + striped table
Screenshot 2024-12-16 at 10 14 31 AM

Striped + Sorting + Border + Scrollable

Screenshot 2024-12-16 at 10 14 01 AM

Acceptance criteria

  • QA checklist has been completed
  • Screenshots have been attached that cover desktop and mobile screens

Definition of done

  • Documentation has been updated, if applicable
  • A link has been provided to the originating GitHub issue (or connected to it via ZenHub)

@jamigibbs jamigibbs added the minor For a minor Semantic Version change label Dec 16, 2024
const defaultProps = {...props, 'table-title': 'this is a caption'};
return `<va-table ${Object.entries(defaultProps)
.map(([key, value]) => `${key}="${value}"`)
.join(' ')}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw an opportunity to make it easier to test props without having to copy/paste table markup. We should be able to use this makeTable function now with customizable properties.

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks great!

});


describe('V3 table', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just some cleanup things along the way.

@jamigibbs jamigibbs marked this pull request as ready for review December 16, 2024 19:18
@jamigibbs jamigibbs requested a review from a team as a code owner December 16, 2024 19:18
@jamigibbs jamigibbs requested a review from a team December 17, 2024 15:50
Copy link
Contributor

@danbrady danbrady left a comment

Choose a reason for hiding this comment

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

Nice work on the striped and sortable!

@jamigibbs jamigibbs merged commit fa3f03e into main Dec 17, 2024
8 checks passed
@jamigibbs jamigibbs deleted the 3448-va-table-striped branch December 17, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor For a minor Semantic Version change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Striped and scrollable Table variations - Development
3 participants