Skip to content

Commit

Permalink
MWPW-148229 Left Rail filter hover Text (#43)
Browse files Browse the repository at this point in the history
* changed title attribute
* merch-sidenav libs changes for title attribute
* title attribute change in test file

---------

Co-authored-by: Mira Fedas <30750556+mirafedas@users.noreply.github.com>
Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 24, 2024
1 parent c9d55dc commit 11af2de
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions libs/merch-sidenav.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ customElements.define("merch-search", MerchSearch);
import { html as html2, LitElement as LitElement2, css as css3 } from "/libs/deps/lit-all.min.js";
var MerchSidenavList = class extends LitElement2 {
static properties = {
title: { type: String },
sidenavListTitle: { type: String },
label: { type: String },
deeplink: { type: String, attribute: "deeplink" },
selectedText: {
Expand Down Expand Up @@ -291,7 +291,7 @@ var MerchSidenavList = class extends LitElement2 {
aria-label="${this.label}"
@change="${(e) => this.selectionChanged(e)}"
>
${this.title ? html2`<h2>${this.title}</h2>` : ""}
${this.sidenavListTitle ? html2`<h2>${this.sidenavListTitle}</h2>` : ""}
<slot></slot>
</div>`;
}
Expand All @@ -302,7 +302,7 @@ customElements.define("merch-sidenav-list", MerchSidenavList);
import { html as html3, LitElement as LitElement3, css as css4 } from "/libs/deps/lit-all.min.js";
var MerchSidenavCheckboxGroup = class extends LitElement3 {
static properties = {
title: { type: String },
sidenavCheckboxTitle: { type: String },
label: { type: String },
deeplink: { type: String },
selectedValues: { type: Array, reflect: true },
Expand Down Expand Up @@ -372,7 +372,7 @@ var MerchSidenavCheckboxGroup = class extends LitElement3 {
}
render() {
return html3`<div aria-label="${this.label}">
<h3>${this.title}</h3>
<h3>${this.sidenavCheckboxTitle}</h3>
<div
@change="${(e) => this.selectionChanged(e)}"
class="checkbox-group"
Expand Down Expand Up @@ -440,7 +440,7 @@ document.addEventListener("sp-closed", () => {
});
var MerchSideNav = class extends LitElement4 {
static properties = {
title: { type: String },
sidenavTitle: { type: String },
closeText: { type: String, attribute: "close-text" },
modal: { type: Boolean, attribute: "modal", reflect: true }
};
Expand Down Expand Up @@ -527,7 +527,7 @@ var MerchSideNav = class extends LitElement4 {
<div id="content">
<div id="sidenav">
<div>
<h2>${this.title}</h2>
<h2>${this.sidenavTitle}</h2>
<slot></slot>
</div>
<sp-link href="#" @click="${this.closeModal}"
Expand All @@ -541,7 +541,7 @@ var MerchSideNav = class extends LitElement4 {
}
get asAside() {
return html4`<sp-theme theme="spectrum" color="light" scale="medium"
><h2>${this.title}</h2>
><h2>${this.sidenavTitle}</h2>
<slot></slot
></sp-theme>`;
}
Expand Down
4 changes: 2 additions & 2 deletions web-components/src/sidenav/merch-sidenav-checkbox-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { parseState, pushStateFromComponent } from '@adobe/mas-commons';

export class MerchSidenavCheckboxGroup extends LitElement {
static properties = {
title: { type: String },
sidenavCheckboxTitle: { type: String },
label: { type: String },
deeplink: { type: String },
selectedValues: { type: Array, reflect: true },
Expand Down Expand Up @@ -78,7 +78,7 @@ export class MerchSidenavCheckboxGroup extends LitElement {

render() {
return html`<div aria-label="${this.label}">
<h3>${this.title}</h3>
<h3>${this.sidenavCheckboxTitle}</h3>
<div
@change="${(e) => this.selectionChanged(e)}"
class="checkbox-group"
Expand Down
4 changes: 2 additions & 2 deletions web-components/src/sidenav/merch-sidenav-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { debounce } from '../utils';

export class MerchSidenavList extends LitElement {
static properties = {
title: { type: String },
sidenavListTitle: { type: String },
label: { type: String },
deeplink: { type: String, attribute: 'deeplink' },
selectedText: {
Expand Down Expand Up @@ -141,7 +141,7 @@ export class MerchSidenavList extends LitElement {
aria-label="${this.label}"
@change="${(e) => this.selectionChanged(e)}"
>
${this.title ? html`<h2>${this.title}</h2>` : ''}
${this.sidenavListTitle ? html`<h2>${this.sidenavListTitle}</h2>` : ''}
<slot></slot>
</div>`;
}
Expand Down
6 changes: 3 additions & 3 deletions web-components/src/sidenav/merch-sidenav.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ document.addEventListener('sp-closed', () => {

export class MerchSideNav extends LitElement {
static properties = {
title: { type: String },
sidenavTitle: { type: String },
closeText: { type: String, attribute: 'close-text' },
modal: { type: Boolean, attribute: 'modal', reflect: true },
};
Expand Down Expand Up @@ -110,7 +110,7 @@ export class MerchSideNav extends LitElement {
<div id="content">
<div id="sidenav">
<div>
<h2>${this.title}</h2>
<h2>${this.sidenavTitle}</h2>
<slot></slot>
</div>
<sp-link href="#" @click="${this.closeModal}"
Expand All @@ -125,7 +125,7 @@ export class MerchSideNav extends LitElement {

get asAside() {
return html`<sp-theme theme="spectrum" color="light" scale="medium"
><h2>${this.title}</h2>
><h2>${this.sidenavTitle}</h2>
<slot></slot
></sp-theme>`;
}
Expand Down
6 changes: 3 additions & 3 deletions web-components/test/sidenav/catalog-sidenav.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div id="merch-sidenav"></div>
</main>
<template id="merch-sidenav-template">
<merch-sidenav title="REFINE YOUR RESULTS">
<merch-sidenav sidenavTitle="REFINE YOUR RESULTS">
<merch-search deeplink="search">
<sp-search placeholder="Search all products"></sp-search>
</merch-search>
Expand All @@ -53,12 +53,12 @@
</sp-sidenav-item>
</sp-sidenav>
</merch-sidenav-list>
<merch-sidenav-checkbox-group title="Types" label="types" deeplink="types">
<merch-sidenav-checkbox-group sidenavCheckboxTitle="Types" label="types" deeplink="types">
<sp-checkbox emphasized name="desktop">Desktop</sp-checkbox>
<sp-checkbox emphasized name="mobile">Mobile</sp-checkbox>
<sp-checkbox emphasized name="web">Web</sp-checkbox>
</merch-sidenav-checkbox-group>
<merch-sidenav-list title="RESOURCES">
<merch-sidenav-list sidenavListTitle="RESOURCES">
<sp-sidenav
manageTabIndex="true"
label="resources"
Expand Down

0 comments on commit 11af2de

Please sign in to comment.