-
Notifications
You must be signed in to change notification settings - Fork 601
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
Accordion default slot #5514
Accordion default slot #5514
Conversation
@@ -15,10 +15,7 @@ export const accordionItemTemplate: ( | |||
context: ElementDefinitionContext, | |||
definition: AccordionItemOptions | |||
) => html` | |||
<template | |||
class="${x => (x.expanded ? "expanded" : "")}" | |||
slot="item" |
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.
Turns out FAST was automatically adding the slot under the hood. I assume only a tiny portion of the consumers will have to keep their eyes open for a breaking change, as long as they use a component extending AccordionItem
@@ -14,8 +14,9 @@ export const accordionTemplate: ( | |||
) => ViewTemplate<Accordion> = ( | |||
context: ElementDefinitionContext, | |||
definition: FoundationElementDefinition | |||
) => html` | |||
) => /* TODO: deprecate slot name `item` to only support default slot https://github.com/microsoft/fast/issues/XXXX */ html` |
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.
@chrisdholt did you want to create the issue, or do you want me to, and you would add any additional details afterwards?
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.
Would you mind taking care of this? Thank you!
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.
Done!
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.
Thanks @m4thieulavoie for this!
Pull Request
📖 Description
This PR addresses the issue in accordion where it's unclear whether the slot name is
"item"
or""
. We now default to a default slot, while maintaining backward compatibility.Fixes #5437
🎫 Issues
#5437
👩💻 Reviewer Notes
📑 Test Plan
✅ Checklist
General
$ yarn change
Component-specific
⏭ Next Steps