-
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
docs: deprecate add custom-content slot for dialog component #11072
base: dev
Are you sure you want to change the base?
Conversation
…nto dit13711/10323-rename-dialog-content-slot
…nto dit13711/10323-rename-dialog-content-slot
@@ -50,7 +50,8 @@ let initialDocumentOverflowStyle: string = ""; | |||
|
|||
/** | |||
* @slot - A slot for adding content. | |||
* @slot content - A slot for adding custom content. | |||
* @slot content - [Deprecated] Use `custom-content` slot instead. |
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.
@DitwanP we would actually need to add this slot in the code. It not just a doc change.
I'm kinda unsure how this change would work without being breaking since we put the panel inside the content
slot by default.
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.
@driskull Yeah good point. That being said, what are your thoughts on changing the slot to the new one overall? Are you in favor or not in favor of such a change?
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'm in favor of it, i'm just not sure how it will work exactly.
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.
Can this coincide with the rest of 3.0 breaking changes?
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.
Thats a question for @jcfranco
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.
Could we deprecate (w/o removing) "content" slot and add "custom-content"? That wouldn't be breaking as the recommendation is to use the "unnamed" default slot, right?
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.
The problem is we put default content in the content
slot now. So we don't have a good way to counter that.
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.
Basically, we can't have this in both the content
and custom-content
slots or it would show up twice.
<slot name={SLOTS.content}>
<calcite-panel
beforeClose={this.beforeClose}
class={CSS.panel}
closable={!this.closeDisabled}
closed={!opened}
I don't think we can do this right?
<slot name="custom-content">
<slot name={SLOTS.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.
That... does seem to work pretty well, in local testing...
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.
Well i'll be... 🤯
Related Issue: #10323
Summary
Deprecates the
"content"
slot in favor of a new"custom-content"
slot that will clearly describes the behavior that a user can expect. This change should solve the issue of confusion that we've heard about from internal feedback.The description of the new slot would be: