-
Notifications
You must be signed in to change notification settings - Fork 77
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(block): fix rendering tied to named-slot content #10449
Conversation
|
||
const element = await page.find("calcite-block"); | ||
const content = await page.find(`calcite-block >>> section.${CSS.content}`); |
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 found something weird here. When using the >>>
piercing selector, it was finding some other CSS.content
class that is a div. Adding section
in front of this fixed it but Its also concerning it was finding this element which it shouldn't find. Using an id is fine too.
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 agree it can be confusing, but this is working as expected (see https://stenciljs.com/docs/end-to-end-testing#find-an-element-in-the-shadow-dom). This also came up in a Stencil issue.
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.
Interesting. I didn't know it searched all shadow roots. good to know!
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! WDYT about fix rendering tied to named-slot content
(or similar) to add a bit more context?
Related Issue: #6059
Summary
getSlotted
utilityslotchange
event and@State
variables to update the display of elements.