Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This project is a library of web components providing merchandising content to v
- Preview: https://main--mas--adobecom.aem.page/
- Live: https://main--mas--adobecom.aem.live/

## Feature branch name
Feature branches need to have the name in format `MWPW-XXXXXX` where `XXXXXX` is the ticket number in Jira, otherwise IMS client regex check will fail and user will not be able to sign in.

## Installation

```sh
Expand Down
4 changes: 2 additions & 2 deletions io/www/src/fragment/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function applyPlansSettings(fragment, locale) {

async function settings(context) {
const { locale } = context;
if (context.body?.fields?.variant === 'plans') {
if (context.body?.fields?.variant?.startsWith('plans')) {
applyPlansSettings(context.body, locale);
}

Expand All @@ -25,7 +25,7 @@ async function settings(context) {
if (
ref &&
ref.type === 'content-fragment' &&
ref.value?.fields?.variant === 'plans'
ref.value?.fields?.variant?.startsWith('plans')
) {
applyPlansSettings(ref.value, locale);
}
Expand Down
11 changes: 1 addition & 10 deletions studio/src/editors/merch-card-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class MerchCardEditor extends LitElement {
static properties = {
fragmentStore: { type: Object, attribute: false },
updateFragment: { type: Function },
wide: { type: Boolean, state: true },
superWide: { type: Boolean, state: true },
availableSizes: { type: Array, state: true },
availableColors: { type: Array, state: true },
availableBorderColors: { type: Array, state: true },
Expand Down Expand Up @@ -54,8 +52,6 @@ class MerchCardEditor extends LitElement {
constructor() {
super();
this.updateFragment = null;
this.wide = false;
this.superWide = false;
this.availableSizes = [];
this.availableColors = [];
this.availableBorderColors = [];
Expand Down Expand Up @@ -256,8 +252,6 @@ class MerchCardEditor extends LitElement {
const field = this.querySelector(`sp-field-group.toggle#${key}`);
if (field) field.style.display = 'block';
});
this.wide = variant.size?.includes('wide');
this.superWide = variant.size?.includes('super-wide');
this.showQuantityFields(this.quantitySelectorDisplayed);
if (variant.borderColor) {
const borderField = this.querySelector(
Expand Down Expand Up @@ -736,10 +730,7 @@ class MerchCardEditor extends LitElement {
}

get isPlans() {
return (
this.fragment.variant === 'plans' ||
this.fragment.variant === 'plans-education'
);
return this.fragment.variant.startsWith('plans');
}

get badge() {
Expand Down
1 change: 1 addition & 0 deletions studio/src/editors/variant-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const VARIANTS = [
{ label: 'All', value: 'all', surface: 'all' },
{ label: 'Catalog', value: 'catalog', surface: 'acom' },
{ label: 'Plans', value: 'plans', surface: 'acom' },
{ label: 'Plans Students', value: 'plans-students', surface: 'acom' },
{ label: 'Plans Education', value: 'plans-education', surface: 'acom' },
{ label: 'Slice', value: 'ccd-slice', surface: 'ccd' },
{ label: 'Special offers', value: 'special-offers', surface: 'acom' },
Expand Down
Loading