-
Notifications
You must be signed in to change notification settings - Fork 156
fix(content-block-paragraph): fixing the logic to hide the component … #12214
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(content-block-paragraph): fixing the logic to hide the component … #12214
Conversation
✅ Deploy Preview for incomparable-wisp-8d6771 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ibm-dotcom-web-components-react-wrap ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ibm-dotcom-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Works wonderfully!
Great job!!
dcf6bf2
into
carbon-design-system:main
#12214) …when no copy In this PR #12198, we created a logic to hide the component if it has no copy, however, that logic that hides and displays, was only considering direct text nodes, but in AEM we have a div for the RTE and only then the text content. It was resulting in the component to hide even if there's copy Modified the logic for the method `toggleVisibility()` to also look for any text or element nodes, in case of element nodes, we'll check if they have text content.
Hey there! This issue/pull request was referenced in recently released v2.17.1. |
1 similar comment
Hey there! This issue/pull request was referenced in recently released v2.17.1. |
…when no copy
Description
In this PR #12198, we created a logic to hide the component if it has no copy, however, that logic that hides and displays, was only considering direct text nodes, but in AEM we have a div for the RTE and only then the text content. It was resulting in the component to hide even if there's copy
Changelog
Modified the logic for the method
toggleVisibility()
to also look for any text or element nodes, in case of element nodes, we'll check if they have text content.