Closed davidmenendez closed 3 years ago
caption
seems like it'd be more suited to either description
or subtitle
. do you have thoughts on this? How long will the text here possibly be?CardHeader.js
, we noticed that he label, title and caption are all <p>
tags. Can we potentially change to something more semantic? perhaps an <h6>
for the title?onClick
and onKeyDown
:
onClick: action('on click')
onKeyDown
and onClick
props differ? Seems like they would be the same thing and we don't want our end users to have to pass in the same function twice.ExpressiveCard.js
you're getting a console error -- go ahead and add mediaRatio
to prepareProps
to remove this_index.scss
as well as the React components in index.js
expect()
function to ensure that test is checking for that component in the dom? expect(Card).toBeinDocument
or somethingCard.test.js
, it might be helpful to be more specific with what the test is doing. "Renders expressive card with action icons and ensures that each click is being called"reRender
. If you're testing for action placement, have the expected behavior in expect() and add that to the test description.Card.test.js
-- you can see an example in ExampleComponent.test.js
Once you address the above, go ahead and do the following!
Thanks again, @davidmenendez 🎉
The prop caption seems like it'd be more suited to either description or subtitle. do you have thoughts on this? How long will the text here possibly be?
i believe i used caption
originally because that was the term used in the design documentation, but i have no strong feeling towards this and i'll change it to description.
In CardHeader.js, we noticed that he label, title and caption are all
tags. Can we potentially change to something more semantic? perhaps an
for the title?
my only problem with this is that since any combination of these can be used and the design makes it so that semantically it doesn't make sense anyways because label is smaller than title but resides above it. i don't think there's anything wrong here with using p tags.
When you add the mediaPosition to left on a smaller column size, there's some wonky behavior where the content looks quite cramped. Can we double check with design that this is the intended behavior?
it's definitely working as intended. the problem is trying to use a one size fits all piece of content there. the AspectRatio
component that i'm using there can only do so much when sized in these weird ways. this is a case where the story isn't flexible enough to make it work. it'll look fine in a real use case when an appropriately sized piece of content is being used.
Does onKeyDown and onClick props differ? Seems like they would be the same thing and we don't want our end users to have to pass in the same function twice.
it's entirely possible that the function is different. we shouldn't assume otherwise and always provide the consumer with maximum flexibility.
my only problem with this is that since any combination of these can be used and the design makes it so that semantically it doesn't make sense anyways because label is smaller than title but resides above it. i don't think there's anything wrong here with using p tags.
I can see your point for all of these with the exception of title
. I think at a minimum, the title
should be wrapped around an h6
, which is the lowest level header as far as hierarchy goes and won't introduce (or shouldn't introduce) conflicts.
In your documentation (.mdx) files it looks like the code snippet for both Productive and Expressive doesn't show the actual source code... we weren't able to figure out why. Could you look into it?
found the solution here https://github.com/storybookjs/storybook/issues/12596#issuecomment-872352197
Can you add a few usage guidelines from the Cards documentation into your component docs?
honestly I don't really see a reason to do this. all i'd be doing is copying and pasting content from the designated design usage guidelines, which i'm already linking to. it doesn't seem necessary to me when all the pertinent information already exists elsewhere.
Review for release
Readiness
Engineering review
Standards
Testing
Documentation