-
Notifications
You must be signed in to change notification settings - Fork 180
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(components): Add table components #17604
Conversation
Unlike ListTable, SubListTable does not contain the semantic HTML table identity. We keep the non-table case more general, so it is possible to have a SubListTable within a SubListTable.
Functionally equivalent to SubListTable, but contains the HTML table semantics
We're introducing animation constants with the LPC work.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## edge #17604 +/- ##
===========================================
+ Coverage 25.70% 63.12% +37.41%
===========================================
Files 2843 2847 +4
Lines 218884 219294 +410
Branches 17947 18186 +239
===========================================
+ Hits 56268 138430 +82162
+ Misses 162601 80672 -81929
- Partials 15 192 +177
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@mjhuff |
It sounds like eventually yes but not currently. Mel was ok placing the components in Helix, but we can talk to her if you have thoughts! |
Thanks! Also I talked about the unification with Shlok. He told me if supporting web/ODD in one component make its code complicated, it would be okay to create components separately. |
components/src/molecules/ListAccordion/ListAccordion.stories.tsx
Outdated
Show resolved
Hide resolved
components/src/molecules/ListAccordion/ListAccordion.stories.tsx
Outdated
Show resolved
Hide resolved
f652dba
to
e73db3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good implementation-wise, but I think it would be even better if you could put the stuff about when and when not to use the components that is currently in comments into description fields in storybook so that it will show up when you navigate there.
7042b77
to
055cc35
Compare
Closes EXEC-1250 and EXEC-1248
Overview
This PR adds several table components to
components
, introducing a couple new concepts to our design system:First: Semantic tables. While tables are powerful from a design and accessibility perspective, they can lead to some implementation pitfalls if devs are not careful. I've done my best to write helpful comments on when to use which table-esque component. There are a couple important dev considerations when using tables:
Child content by its nature must be injected in a
<table>
, and this means that when using a component with<table>
, it's best practice to also inject<tr>
tags appropriately. Not doing so isn't the end of the world, but it's a good idea to do so in order to capture the benefits for using semantic table tags. This can't really be enforced through testing, but I have added comments.Tables are really our first foray into dealing with non-design system components that should directly share the same styling with design system components, ie, if we have table headers that are grid-enforced, we do care about the injected child content using the same layout styling. When this issue has come up in the past, we've done some hacky things to make content align, but it wasn't great. A solution for now is to introduce CSS grid into our componentization, which mitigates most of the hacks. There's probably still more we can do to make shared styling accessible (like style constants within components that are utilized by injected components), but I do want to sit and think about this a bit.
Second: CSS animation constants. This is highly subject to change as Design starts thinking about unified animations, but it's neat we're starting to do more of it.
Screen.Recording.2025-02-27.at.11.04.28.AM.mov
List Accordion Demo
Test Plan and Hands on Testing
SubListTable
,ListTable
, andListAccordion
components. Note thatSubListTable
andListTable
should be identical in terms of functionality, they are just semantically different, see code comments.Changelog
Risk assessment
low