Skip to content
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

feat(panel): add content-bottom slot #9311

Merged
merged 6 commits into from
May 11, 2024

Conversation

Elijbet
Copy link
Contributor

@Elijbet Elijbet commented May 10, 2024

Related Issue: #8979

Summary

Add a new content-bottom slot to the panel component.

@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label May 10, 2024
@Elijbet Elijbet added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label May 10, 2024
@Elijbet Elijbet marked this pull request as ready for review May 10, 2024 20:51
@Elijbet Elijbet requested a review from a team as a code owner May 10, 2024 20:51
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

Aside from a couple of comments, this LGTM! 🎉

packages/calcite-components/src/demos/panel.html Outdated Show resolved Hide resolved
@@ -328,6 +331,10 @@ export class Panel
this.hasFab = slotChangeHasAssignedElement(event);
};

private contentBottomSlotChangeHandler = (event: Event): void => {
this.hasContentBottom = slotChangeHasAssignedElement(event);
Copy link
Member

Choose a reason for hiding this comment

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

I may have missed this in the content-top slot PR, but should this use slotChangeHasContent to consider both text and elements?

Copy link
Contributor Author

@Elijbet Elijbet May 10, 2024

Choose a reason for hiding this comment

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

Everywhere I look we use slotChangeHasAssignedElement, and slotChangeHasContent is only used once, in
scrim. Do we want to handle both (elements and text) in all cases, or is checking for text not needed everywhere?

@driskull

Copy link
Member

Choose a reason for hiding this comment

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

@Elijbet we only need to consider slotChangeHasContent for unnamed default slots. Otherwise, an element is used with a slot="x".

@Elijbet Elijbet added skip visual snapshots Pull requests that do not need visual regression testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 10, 2024
@Elijbet Elijbet added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed skip visual snapshots Pull requests that do not need visual regression testing. labels May 11, 2024
@Elijbet Elijbet merged commit 87da591 into main May 11, 2024
13 checks passed
@Elijbet Elijbet deleted the elijbet/8979-panel-add-content-bottom-slot branch May 11, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants