Skip to content

fix: duplicate behavior for slotted content when no template is present#5174

Merged
jhefferman-sfdc merged 9 commits intomasterfrom
jhefferman/default-slot-template
Jan 30, 2025
Merged

fix: duplicate behavior for slotted content when no template is present#5174
jhefferman-sfdc merged 9 commits intomasterfrom
jhefferman/default-slot-template

Conversation

@jhefferman-sfdc
Copy link
Contributor

Details

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

GUS work item

W-17657735

@jhefferman-sfdc jhefferman-sfdc requested a review from a team as a code owner January 29, 2025 17:10
Comment on lines +104 to +106
_shadowSlottedContent: any,
_lightSlottedContent: any,
_scopedSlottedContent: any,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BOOOO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a feeling this might upset you :p

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(sorry)

_lightSlottedContent: unknown,
_scopedSlottedContent: unknown,
Cmp: LightningElementConstructor,
_instance: unknown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_instance: unknown
instance: unknown

yield '<template shadowrootmode="open"></template>';
yield `<template shadowrootmode="open"></template>`;
if (shadowSlottedContent) {
yield shadowSlottedContent(_instance);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
yield shadowSlottedContent(_instance);
yield shadowSlottedContent(instance);

_lightSlottedContent: unknown,
_scopedSlottedContent: unknown,
Cmp: LightningElementConstructor,
_instance: unknown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_instance: unknown
instance: unknown

emit('<template shadowrootmode="open"></template>');
emit(`<template shadowrootmode="open"></template>`);
if (shadowSlottedContent) {
shadowSlottedContent(emit, _instance);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
shadowSlottedContent(emit, _instance);
shadowSlottedContent(emit, instance);

@jhefferman-sfdc jhefferman-sfdc merged commit 4334dc2 into master Jan 30, 2025
11 checks passed
@jhefferman-sfdc jhefferman-sfdc deleted the jhefferman/default-slot-template branch January 30, 2025 19:36
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.

2 participants