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

feat(get-started): new component #5054

Merged

Conversation

ariellalgilmore
Copy link
Member

Contributes to #4809

Adds new getStarted component

What did you change?

  • Added new Get Started component
  • updated internal Card component to handle GetStarted updates without effecting other Cards

...still waiting on mobile updates from design

How did you test and verify your work?

  • added simple tests to verify default props and component rendering
  • used storybook to check against figma design

Copy link

netlify bot commented May 1, 2024

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 3debecc
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/664ba6f409f47500085ac71e
😎 Deploy Preview https://deploy-preview-5054--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@elycheea elycheea added the status: needs design review 🎨 Component is ready for design review label May 7, 2024
@ariellalgilmore ariellalgilmore marked this pull request as ready for review May 7, 2024 17:53
@ariellalgilmore ariellalgilmore requested a review from a team as a code owner May 7, 2024 17:53
@ariellalgilmore ariellalgilmore requested review from kennylam and elycheea and removed request for a team May 7, 2024 17:53
@bndege2
Copy link

bndege2 commented May 8, 2024

@ariellalgilmore @elycheea

  • For all variants- metadata text sizing update to $label-01

  • For variant with image: the image is not a 1:1 ratio. Please note that when the card with image sits on top of a card without an image, the image size should align with the card without the image width (see layout image example)
    Get started layout 1

  • Attached new placeholder svgs to use for the card with image

@bndege2
Copy link

bndege2 commented May 8, 2024

card with image placeholder 2
card with image placeholder

@ariellalgilmore
Copy link
Member Author

@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

@bndege2
Copy link

bndege2 commented May 9, 2024

@ariellalgilmore updates look good!

Copy link
Contributor

@elycheea elycheea left a 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. :)

@@ -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,
Copy link
Contributor

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. 🐫

Suggested change
metaData = defaults.actionIcons,
metadata = defaults.actionIcons,

Copy link
Contributor

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? 🤔

packages/ibm-products/src/components/Card/Card.js Outdated Show resolved Hide resolved
*/
export let GetStarted = React.forwardRef(({ ...rest }, ref) => {
return (
<Card getStarted ref={ref} {...rest} {...getDevtoolsProps(componentName)} />
Copy link
Contributor

@elycheea elycheea May 14, 2024

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.

Copy link
Contributor

@davidmenendez davidmenendez left a 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,
Copy link
Contributor

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?

Copy link
Member Author

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

packages/ibm-products/src/components/Card/Card.js Outdated Show resolved Hide resolved
packages/ibm-products/src/components/Card/Card.js Outdated Show resolved Hide resolved
packages/ibm-products/src/components/Card/Card.js Outdated Show resolved Hide resolved
packages/ibm-products/src/components/Card/Card.js Outdated Show resolved Hide resolved
packages/ibm-products/src/components/Card/CardFooter.js Outdated Show resolved Hide resolved
@ariellalgilmore
Copy link
Member Author

@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!

davidmenendez
davidmenendez previously approved these changes May 20, 2024
Copy link
Contributor

@davidmenendez davidmenendez left a 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!

Copy link
Contributor

@elycheea elycheea left a 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.

@davidmenendez davidmenendez added this pull request to the merge queue May 20, 2024
Merged via the queue into carbon-design-system:main with commit 5d7208f May 20, 2024
16 checks passed
@ariellalgilmore ariellalgilmore deleted the feat/get-started branch May 20, 2024 20:33
paul-balchin-ibm pushed a commit to paul-balchin-ibm/ibm-products that referenced this pull request May 23, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs design review 🎨 Component is ready for design review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants