Skip to content

Commit

Permalink
fix: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux committed Dec 19, 2023
1 parent 2677778 commit dd417ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy-pages-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Deploy to GitHub Pages (DEV Version)

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1-4'

permissions:
contents: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class ApplicationHeader {
@State() menuExpanded = false;
@State() suppressResponsive = false;

@State() isSlotted = false;
@State() hasSlottedElements = false;

private menuDisposable?: Disposable;
private modeDisposable?: Disposable;
Expand Down Expand Up @@ -158,15 +158,11 @@ export class ApplicationHeader {
);
}

private slotUpdated(): void {
this.updateIsSlottedContent();
}

private updateIsSlottedContent() {
const slotElement =
this.hostElement.shadowRoot.querySelector('.content slot');

this.isSlotted = hasSlottedElements(slotElement);
this.hasSlottedElements = hasSlottedElements(slotElement);
}

render() {
Expand Down Expand Up @@ -201,7 +197,7 @@ export class ApplicationHeader {
<ix-icon-button
class={{
['context-menu']: true,
['context-menu-visible']: this.isSlotted,
['context-menu-visible']: this.hasSlottedElements,
}}
data-context-menu
icon="more-menu"
Expand All @@ -213,12 +209,14 @@ export class ApplicationHeader {
trigger={this.resolveContextMenuButton()}
>
<div class="dropdown-content">
<slot onSlotchange={() => this.slotUpdated()}></slot>
<slot
onSlotchange={() => this.updateIsSlottedContent()}
></slot>
</div>
</ix-dropdown>
</Fragment>
) : (
<slot onSlotchange={() => this.slotUpdated()}></slot>
<slot onSlotchange={() => this.updateIsSlottedContent()}></slot>
)}
<slot name="ix-application-header-avatar"></slot>
</div>
Expand Down

0 comments on commit dd417ee

Please sign in to comment.