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

fix(Decorator): breakout single Decorator into many smaller Decorators #4542

Conversation

paul-balchin-ibm
Copy link
Contributor

@paul-balchin-ibm paul-balchin-ibm commented Mar 13, 2024

Contributes to #4476

Issue

The single Decorator has complex and changing prop relationships depending in the kind selected. This also requires complicated documentation to explain the different relationships.

Solution

Create an internal DecoratorBase component, and build out sub components where their props are specific to each type.

Convert monolithic Decorator into smaller, more focused "sub types":

  • Decorator
  • DecoratorLink
  • DecoratorSingleButton
  • DecoratorDualButton

What did you change?

Too many files to list.

How did you test and verify your work?

  • Storybook
  • Testing

@paul-balchin-ibm paul-balchin-ibm requested a review from a team as a code owner March 13, 2024 13:27
Copy link

netlify bot commented Mar 13, 2024

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

Name Link
🔨 Latest commit 94daab2
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/65f1c2650db12e00099fd3c2
😎 Deploy Preview https://deploy-preview-4542--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.

@paul-balchin-ibm paul-balchin-ibm self-assigned this Mar 13, 2024
@paul-balchin-ibm paul-balchin-ibm added package: security version: 2 Carbon 11 / v2 area: migration ➡️ Migration of Security package to IBM Products labels Mar 13, 2024
@paul-balchin-ibm paul-balchin-ibm linked an issue Mar 13, 2024 that may be closed by this pull request
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 great!

just one tiny nitpick: to avoid unnecessary repetition you can remove all the defaults in the variants and just use a single one in DecoratorBase

@paul-balchin-ibm
Copy link
Contributor Author

...remove all the defaults in the variants and just use a single one in DecoratorBase.

Great idea. Thanks for the details in the PMs 🎉

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.

woot

@paul-balchin-ibm paul-balchin-ibm added this pull request to the merge queue Mar 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 13, 2024
@paul-balchin-ibm paul-balchin-ibm added this pull request to the merge queue Mar 13, 2024
Merged via the queue into carbon-design-system:main with commit 3f57a24 Mar 13, 2024
15 checks passed
@paul-balchin-ibm paul-balchin-ibm deleted the fix-4476_breakout-decorator-2 branch March 13, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: migration ➡️ Migration of Security package to IBM Products package: security version: 2 Carbon 11 / v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate Decorator into multiple components
2 participants