-
Notifications
You must be signed in to change notification settings - Fork 117
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(get-started): new component #5054
feat(get-started): new component #5054
Conversation
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@bndege2 just pushed updates! The cards are flexible in size, so if the user puts them in the container like you show above then they will fit in that container |
@ariellalgilmore updates look good! |
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.
Overall looks great but I have some concerns about the structure and where we’re setting props. I’m guessing there’s a few limitations because of the way the internal Card is set up, but I feel like where we can, we should keep GetStarted
specific props on the GetStarted
component itself.
Happy to discuss these further too since I’m sure there’s a lot more complexity to my suggestions than they appear on paper. Might also be worth pulling in @davidmenendez for his thoughts since he worked on the initial card variants. :)
packages/ibm-products-styles/src/components/GetStarted/_get-started.scss
Outdated
Show resolved
Hide resolved
@@ -41,10 +42,14 @@ export let Card = forwardRef( | |||
// The component props, in alphabetical order (for consistency). | |||
actionIcons = defaults.actionIcons, | |||
actionsPlacement = defaults.actionsPlacement, | |||
metaData = defaults.actionIcons, |
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.
Metadata’s common enough a term that I don’t think we need to camelCase this one. 🐫
metaData = defaults.actionIcons, | |
metadata = defaults.actionIcons, |
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 do like the thought of reusing what we have, but also don’t think the metadata really counts as “actions” semantically? 🤔
*/ | ||
export let GetStarted = React.forwardRef(({ ...rest }, ref) => { | ||
return ( | ||
<Card getStarted ref={ref} {...rest} {...getDevtoolsProps(componentName)} /> |
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 saw your comment that we used the internal Card
instead of ProductiveCard
— were we unable to get the actions working using ProductiveCard
?
I was thinking originally something like ...
<ProductiveCard ref={ref} {...rest} {...getDevtoolsProps(componentName)}>
<div className={`${blockClass}__header`}>
{sequence && (
<div className={`${blockClass}__sequence`}>{sequence}</div>
)}
{status && (
<div className={`${blockClass}__status`}>
...
</div>
)}
</div>
<div className={`${blockClass}__footer`}>
<div className={`${blockClass}__metadata`}>
...
</div>
</div>
</ProductiveCard>
... but I’m guessing this was a bit more complicated because of the positioning of sequence/status before the title/label and other media elements. 🤔
Still, anything we can keep specific to just the GetStarted
component will likely help reduce complexity at the internal Card
level longer term.
packages/ibm-products/src/components/GetStarted/GetStarted.stories.jsx
Outdated
Show resolved
Hide resolved
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.
this looks really cool! aside from a few code comments i just wanted to request a specific story for the disabled state. it seems important enough that i would hate to see it missed since it's only available as a toggle currently.
@@ -41,10 +42,14 @@ export let Card = forwardRef( | |||
// The component props, in alphabetical order (for consistency). | |||
actionIcons = defaults.actionIcons, | |||
actionsPlacement = defaults.actionsPlacement, | |||
metadata = defaults.actionIcons, |
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.
is there any specific reason why metadata
is required and we can't just use actionIcons
?
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.
when discussing with the PLG group, actionIcons was an icon you would take action on like in the other cards, but in this case it's more describing the card... so we thought metadata was a better prop name, but code-wise almost the same thing
@davidmenendez thanks for the review!! updated the getStarted component with your suggestions! I know we are still discussing card, but wanted to update here in the meantime! |
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.
awesome. thanks for making those updates!
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.
Rename looks good! Thanks for the quick update.
5d7208f
* feat(get-started): new component * fix(lint): update files * fix(footer): typo * fix(media): center align * fix(getStarted): mobile and step to sequence * fix(getStarted): move to jsx * fix(getStarted): picture and font * fix(getStarted): cleanup * fix(getStarted): cleanup * fix(story): update copy * feat(get-started): add avt test * fix(getStarted): update from review comments * fix(get-started): resolve comments * fix(get-started): use controls not argstable * fix(get-started): add card to name
Contributes to #4809
Adds new getStarted component
What did you change?
...still waiting on mobile updates from design
How did you test and verify your work?