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(ConditionBuilder): customize primary conditions using custom statement configuration #6663

Merged

Conversation

amal-k-joy
Copy link
Contributor

@amal-k-joy amal-k-joy commented Jan 6, 2025

Closes #6136

Currently the default option for statements are if all, if any, unless all, unless any. This new feature will extend a new optional prop statementConfigCustom where they can pass their own custom statements that will override default ones

What did you change?

Added a new prop statementConfigCustom
Added tests for new prop

type statementConfig = {
  id: string;
  connector: 'and' | 'or';
  label: string; //if , excl. if
  secondaryLabel?: string; // a||b , a && b
}

How did you test and verify your work?

local

@amal-k-joy amal-k-joy requested a review from a team as a code owner January 6, 2025 08:49
@amal-k-joy amal-k-joy requested review from makafsal and devadula-nandan and removed request for a team January 6, 2025 08:49
Copy link

netlify bot commented Jan 6, 2025

Deploy Preview for ibm-products-web-components ready!

Name Link
🔨 Latest commit e26cabf
🔍 Latest deploy log https://app.netlify.com/sites/ibm-products-web-components/deploys/677baa57292e34000961f2f1
😎 Deploy Preview https://deploy-preview-6663--ibm-products-web-components.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.

Copy link

netlify bot commented Jan 6, 2025

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

Name Link
🔨 Latest commit e26cabf
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/677baa57478cf60008cdf692
😎 Deploy Preview https://deploy-preview-6663--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.

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.83%. Comparing base (2f7d5f1) to head (e26cabf).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6663      +/-   ##
==========================================
+ Coverage   80.78%   80.83%   +0.05%     
==========================================
  Files         396      396              
  Lines       12894    12898       +4     
  Branches     4275     4276       +1     
==========================================
+ Hits        10416    10426      +10     
+ Misses       2478     2472       -6     
Components Coverage Δ
ibm-products ∅ <ø> (∅)
ibm-products-web-components ∅ <ø> (∅)

@amal-k-joy amal-k-joy added this pull request to the merge queue Jan 7, 2025
Merged via the queue into carbon-design-system:main with commit 8eeab4c Jan 7, 2025
33 checks passed
@amal-k-joy amal-k-joy deleted the conditionBuilder6136 branch January 7, 2025 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Possibility to customize primary conditions
3 participants