Skip to content

Commit

Permalink
chore(masthead): reverts fix on release branch, avoid rendering L0 if…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffchew authored Dec 9, 2020
1 parent 9bfe360 commit d96f8c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ class DDSMastheadComposite extends LitElement {
: html`
<dds-left-nav-name>${brandName}</dds-left-nav-name>
`}
${l1Data ? undefined : this._renderNavItems({ target: NAV_ITEMS_RENDER_TARGET.LEFT_NAV })}
${l1Data ? this._renderL1Items({ target: NAV_ITEMS_RENDER_TARGET.LEFT_NAV }) : undefined}
${this.l1Data ? undefined : this._renderNavItems({ target: NAV_ITEMS_RENDER_TARGET.LEFT_NAV })}
${this.l1Data ? this._renderL1Items({ target: NAV_ITEMS_RENDER_TARGET.LEFT_NAV }) : undefined}
</dds-left-nav>
<dds-masthead aria-label="${ifNonNull(mastheadAssistiveText)}">
<dds-masthead-menu-button
Expand All @@ -574,13 +574,9 @@ class DDSMastheadComposite extends LitElement {
: html`
<dds-top-nav-name>${brandName}</dds-top-nav-name>
`}
${l1Data
? undefined
: html`
<dds-top-nav menu-bar-label="${ifNonNull(menuBarAssistiveText)}">
${this._renderNavItems({ target: NAV_ITEMS_RENDER_TARGET.TOP_NAV })}
</dds-top-nav>
`}
<dds-top-nav ?hide-divider="${this.l1Data}" menu-bar-label="${ifNonNull(menuBarAssistiveText)}">
${this.l1Data ? undefined : this._renderNavItems({ target: NAV_ITEMS_RENDER_TARGET.TOP_NAV })}
</dds-top-nav>
<dds-masthead-search-composite
?active="${activateSearch}"
input-timeout="${inputTimeout}"
Expand Down
3 changes: 1 addition & 2 deletions packages/web-components/src/components/masthead/top-nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { property, customElement, html, internalProperty } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
import BXHeaderNav from 'carbon-web-components/es/components/ui-shell/header-nav.js';
import ifNonNull from 'carbon-web-components/es/globals/directives/if-non-null.js';
import HostListener from 'carbon-web-components/es/globals/decorators/host-listener.js';
import HostListenerMixin from 'carbon-web-components/es/globals/mixins/host-listener.js';
import StableSelectorMixin from '../../globals/mixins/stable-selector';
Expand Down Expand Up @@ -54,7 +53,7 @@ class DDSTopNav extends StableSelectorMixin(HostListenerMixin(BXHeaderNav)) {
? html``
: html`
<nav class="${prefix}--header__nav">
<ul role="menubar" class="${prefix}--header__menu-bar" aria-label="${ifNonNull(this.menuBarLabel)}">
<ul role="menubar" class="${prefix}--header__menu-bar" aria-label="${this.menuBarLabel}">
<slot></slot>
</ul>
</nav>
Expand Down

0 comments on commit d96f8c1

Please sign in to comment.