-
Notifications
You must be signed in to change notification settings - Fork 5k
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): add component, theme, and story #9932
feat(Table): add component, theme, and story #9932
Conversation
✅ ethereum-org-website-dev deploy preview ready
|
f45cce0
to
d9ece15
Compare
@pettinarip I've based the creation of this new Table component on the current MarkdownTable, where only the table element is passed to the MDX provider and all the table elements are injected inside. Based on the fact that Chakra's |
73fdc9d
to
c62911c
Compare
I'm going to see what needs to be done to use all of Chakra's table components to pass in as a group to the |
Nice, sounds good. |
@pettinarip figured out that it was too easy to apply the Chakra table components, and ended up updating this PR with them implemented! 😄 |
@pettinarip I've updated the PR to integrate the new Table component to the templates. I would point an immediate oddball, like on the (Hopefully more consistency in the new DS with layouts will be helpful here!) |
Nice @TylerAPfledderer
I think we would want to keep doing what we have in prod which is a horizontal scroll. cc @nloureiro what do you think of this case? |
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.
Looks great @TylerAPfledderer
} from "@chakra-ui/react" | ||
import { MDXProviderComponentsProp } from "@mdx-js/react" | ||
|
||
interface TableProps extends ThemingProps<"Table"> { |
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.
Curious, would it be the same as importing TableProps
from the chakra package?
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.
Correct! .... kinda 😅
It only allows for the theming props and child components, and that's it. I was thinking to lock down the props, unless there was already a consideration for an instance or two that needed to apply other style props directly.
@nloureiro This has now been added! 😄 |
Quick solution here is to remove the Which of course makes it look like there is no horizontal overflow. (There is a lot of content farther down in the A downside to removing the |
Agreed. I think we need to remove the fixed layout only in the opcodes page for now (unless we detect another case). That will show it in a similar way as we have in prod. |
Remove the Table `layout` prop that was set to fixed so it can go back to the default of auto and allow cells to expand width based on content.
@pettinarip pushed changes. Should be good to go? |
@TylerAPfledderer same as in the Link PR, it looks good to me but since this PR touches many parts of the website, I want more eyes on it. It'd be also nice if @nloureiro could take another look at this once he is back. |
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.
Did some spot checking on the tables noted above... they're looking great! Seeing proper x-scroll where needed, header appear aligned appropriately (bottom-left by default), custom alignments (ie: | ---: |
) appear to be working correctly, and the cells are also matching that horizontal alignment, and seem to be aligned to the top as requested.
Thanks for all the efforts on this @TylerAPfledderer!
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.
🚢
Description
This is part of the Implementation of the DS v1
Creates a custom
Table
component, along with theming and a Storybook story fileCloses #8030