Skip to content

Commit

Permalink
[Release] Stage to Main (#2688)
Browse files Browse the repository at this point in the history
  • Loading branch information
milo-pr-merge[bot] authored Aug 6, 2024
2 parents 8f6bc8f + 94b5b91 commit 498b7c8
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 58 deletions.
1 change: 1 addition & 0 deletions libs/blocks/caas-config/caas-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ const defaultOptions = {
},
detailsTextOption: {
default: 'Default',
createdDate: 'Created Date',
modifiedDate: 'Modified Date',
},
cardHoverEffect: {
Expand Down
4 changes: 3 additions & 1 deletion libs/blocks/caas/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,9 @@ export const getConfig = async (originalState, strs = {}) => {
&& state.targetActivity ? `/${encodeURIComponent(state.targetActivity)}.json` : '';
const flatFile = targetActivity ? '&flatFile=false' : '';
const localesQueryParam = locales ? `&locales=${locales}` : '';
const debug = state.showIds && document.location.pathname.includes('/tools/caas') ? '&debug=true' : '';
const debug = (state.showIds && document.location.pathname.includes('/tools/caas'))
|| state.container === 'categories'
? '&debug=true' : '';
const collectionTags = state.includeTags ? state.includeTags.join(',') : '';
const excludeContentWithTags = state.excludeTags ? state.excludeTags.join(',') : '';

Expand Down
9 changes: 8 additions & 1 deletion libs/blocks/marquee/marquee.css
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@
max-width: 212px;
}


.marquee.split.row-reversed .foreground.container {
justify-content: flex-end;
}
Expand All @@ -496,6 +495,14 @@
justify-content: flex-start;
}

html[dir="rtl"] .marquee.support-rtl.split .foreground.container {
flex-direction: row;
}

html[dir="rtl"] .marquee.support-rtl.split.row-reversed .foreground.container {
flex-direction: row-reverse;
}

.marquee.split .asset img,
.marquee.split.small .asset img,
.marquee.split.large .asset img,
Expand Down
5 changes: 4 additions & 1 deletion libs/blocks/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ export async function getModal(details, custom) {

if (!dialog.classList.contains('curtain-off')) {
document.body.classList.add('disable-scroll');
const curtain = createTag('div', { class: 'modal-curtain is-open' });
const curtain = createTag('div', {
class: 'modal-curtain is-open',
'daa-ll': `${analyticsEventName}:modalClose:curtainClose`,
});
curtain.addEventListener('click', (e) => {
if (e.target === curtain) closeModal(dialog);
});
Expand Down
5 changes: 5 additions & 0 deletions libs/blocks/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ function configTabs(config, rootElem) {
const sel = rootElem.querySelector(id);
if (sel) sel.click();
}
const tabParam = new URLSearchParams(window.location.search).get('tab');
if (!tabParam) return;
const dashIndex = tabParam.lastIndexOf('-');
const [tabsId, tabIndex] = [tabParam.substring(0, dashIndex), tabParam.substring(dashIndex + 1)];
if (tabsId === config.id) rootElem.querySelector(`#tab-${config.id}-${tabIndex}`)?.click();
}

function initTabs(elm, config, rootElem) {
Expand Down
66 changes: 33 additions & 33 deletions libs/deps/mas/merch-card-all.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions libs/deps/mas/merch-card.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions libs/features/mas/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions libs/features/mas/web-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,11 @@ We will use the Redirector extension for [Chrome](https://chrome.google.com/webs
Please import `./redirector.json` and toggle `Debug commerce web components` rule.

### Build
This section still requires discussions.<br />
Main idea is to once the development is done, and ideally PR is already merged, the developer builds the artifacts and ships it to Milo as follows.<br />
For non Milo consumers, we will support official releases to artifactory.

# Consumption in Milo
run
```
npm run build
```
copy the build artifacts to Milo's deps folder:
```
cp milo-libs/* ~/git/milo/libs/deps
Checkin the files updated in ~/git/milo/libs/deps/mas folder
```
#### Troubleshooting
Expand Down
5 changes: 5 additions & 0 deletions libs/features/mas/web-components/src/merch-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,11 @@ export class MerchCard extends LitElement {
!e.shiftKey &&
document.activeElement === lastFocusableElement
) {
let parentSection = this.closest('.section');
if(!parentSection) parentSection = document;
const merchCardsInSection = parentSection.querySelectorAll(MERCH_CARD_NODE_NAME);
const lastMerchCard = merchCardsInSection[merchCardsInSection.length - 1];
if (this === lastMerchCard) return;
e.preventDefault();
e.stopImmediatePropagation();
} else if (
Expand Down
4 changes: 3 additions & 1 deletion libs/features/personalization/personalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,10 +545,12 @@ export function parseManifestVariants(data, manifestPath, manifestOverrideName)
function parsePlaceholders(placeholders, config, selectedVariantName = '') {
if (!placeholders?.length || selectedVariantName === 'default') return config;
const valueNames = [
'value',
selectedVariantName.toLowerCase(),
config.locale.region.toLowerCase(),
config.locale.ietf.toLowerCase(),
...config.locale.ietf.toLowerCase().split('-'),
'value',
'other',
];
const [val] = Object.entries(placeholders[0])
.find(([key]) => valueNames.includes(key.toLowerCase()));
Expand Down
1 change: 1 addition & 0 deletions libs/features/personalization/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ function createPreviewPill(manifests) {
<div class="mep-manifest-page-info-title">Page Info:</div>
<div>Target integration feature is ${targetOnText}</div>
<div>Personalization feature is ${personalizationOnText}</div>
<div>Page's Region is ${config.locale.region}</div>
<div>Page's Locale is ${config.locale.ietf}</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion libs/martech/martech.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const loadMartechFiles = async (config) => {
setDeep(
window,
'alloy_all.data._adobe_corpnew.digitalData.page.pageInfo.language',
config.locale.ietf,
{ locale: config.locale.prefix.replace('/', ''), langCode: config.locale.ietf },
);
setDeep(window, 'digitalData.diagnostic.franklin.implementation', 'milo');

Expand Down

0 comments on commit 498b7c8

Please sign in to comment.