Skip to content

Commit

Permalink
Merge branch 'main' into commerce-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
honstar authored Nov 16, 2023
2 parents f76f8ca + 23f0e0d commit 20a251e
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 96 deletions.
2 changes: 1 addition & 1 deletion libs/blocks/article-feed/article-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function loadArticleTaxonomy(article) {

const articleTax = computeTaxonomyFromTopics(topics, path);

clonedArticle.category = articleTax.category;
clonedArticle.category ??= articleTax.category;

// topics = tags as an array
clonedArticle.topics = topics;
Expand Down
1 change: 0 additions & 1 deletion libs/blocks/aside/aside.css
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@
border-radius: var(--spacing-xs);
width: var(--grid-container-width);
margin: auto;
bottom: var(--spacing-xs);
box-shadow: 0 3px 6px #707070;
}

Expand Down
2 changes: 1 addition & 1 deletion libs/blocks/caas/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ const fetchUuidForCard = async (card) => {
}
try {
const url = new URL(card.contentId);
const localizedLink = localizeLink(url, window.location.hostname, true);
const localizedLink = localizeLink(url, null, true);
const substr = String(localizedLink).split('https://').pop();
return await getUuid(substr);
} catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion libs/blocks/library-config/lists/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getMetadata } from '../../section-metadata/section-metadata.js';
const LIBRARY_METADATA = 'library-metadata';
const LIBRARY_CONTAINER_START = 'library-container-start';
const LIBRARY_CONTAINER_END = 'library-container-end';
const BLOCK_SPACING = '<br>';
// Block types:
const CONTAINER_START_BLOCK = 0;
const CONTAINER_END_BLOCK = 1;
Expand Down Expand Up @@ -286,7 +287,7 @@ export default async function loadBlocks(blocks, list, query) {
const containerHtml = getHtml(container, block.path);
e.target.classList.add('copied');
setTimeout(() => { e.target.classList.remove('copied'); }, 3000);
const blob = new Blob([containerHtml], { type: 'text/html' });
const blob = new Blob([`${BLOCK_SPACING}${containerHtml}${BLOCK_SPACING}`], { type: 'text/html' });
createCopy(blob);
});
item.append(name, copy);
Expand Down
4 changes: 4 additions & 0 deletions libs/blocks/section-metadata/section-metadata.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@
z-index: 4;
}

.section.sticky-bottom.popup {
bottom: var(--spacing-xs);
}

.section[class*='grid-width-'] {
padding-left: var(--grid-margins-width);
padding-right: var(--grid-margins-width);
Expand Down
1 change: 1 addition & 0 deletions libs/blocks/section-metadata/sticky-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function promoIntersectObserve(el, stickySectionEl, options = {}) {
function handleStickyPromobar(section) {
const main = document.querySelector('main');
section.classList.add('promo-sticky-section', 'hide-sticky-section');
if (section.querySelector('.promobar.popup')) section.classList.add('popup');
let stickySectionEl = null;
const hasScrollControl = section.querySelector('.promobar').classList.contains('no-delay');
if (!hasScrollControl && main.children[0] !== section) {
Expand Down
174 changes: 87 additions & 87 deletions libs/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,98 +21,98 @@ const prodDomains = ['milo.adobe.com'];

const locales = {
'': { ietf: 'en-US', tk: 'hah7vzn.css' },
ae_ar: { ietf: 'ar', tk: 'nwq1mna.css', dir: 'rtl' },
ae_en: { ietf: 'en', tk: 'pps7abe.css' },
africa: { ietf: 'en', tk: 'pps7abe.css' },
ar: { ietf: 'es-AR', tk: 'oln4yqj.css' },
at: { ietf: 'de-AT', tk: 'vin7zsi.css' },
au: { ietf: 'en-AU', tk: 'pps7abe.css' },
be_en: { ietf: 'en-BE', tk: 'pps7abe.css' },
be_fr: { ietf: 'fr-BE', tk: 'vrk5vyv.css' },
be_nl: { ietf: 'nl-BE', tk: 'cya6bri.css' },
bg: { ietf: 'bg-BG', tk: 'aaz7dvd.css' },
br: { ietf: 'pt-BR', tk: 'inq1xob.css' },
ca_fr: { ietf: 'fr-CA', tk: 'vrk5vyv.css' },
ca: { ietf: 'en-CA', tk: 'pps7abe.css' },
ch_de: { ietf: 'de-CH', tk: 'vin7zsi.css' },
ch_fr: { ietf: 'fr-CH', tk: 'vrk5vyv.css' },
ch_it: { ietf: 'it-CH', tk: 'bbf5pok.css' },
cl: { ietf: 'es-CL', tk: 'oln4yqj.css' },
cn: { ietf: 'zh-CN', tk: 'puu3xkp' },
co: { ietf: 'es-CO', tk: 'oln4yqj.css' },
cr: { ietf: 'es-419', tk: 'oln4yqj.css' },
cy_en: { ietf: 'en-CY', tk: 'pps7abe.css' },
cz: { ietf: 'cs-CZ', tk: 'aaz7dvd.css' },
de: { ietf: 'de-DE', tk: 'vin7zsi.css' },
dk: { ietf: 'da-DK', tk: 'aaz7dvd.css' },
ec: { ietf: 'es-419', tk: 'oln4yqj.css' },
ee: { ietf: 'et-EE', tk: 'aaz7dvd.css' },
eg_ar: { ietf: 'ar', tk: 'nwq1mna.css', dir: 'rtl' },
eg_en: { ietf: 'en-GB', tk: 'pps7abe.css' },
el: { ietf: 'el', tk: 'aaz7dvd.css' },
es: { ietf: 'es-ES', tk: 'oln4yqj.css' },
fi: { ietf: 'fi-FI', tk: 'aaz7dvd.css' },
fr: { ietf: 'fr-FR', tk: 'vrk5vyv.css' },
gr_el: { ietf: 'el', tk: 'fnx0rsr.css' },
gr_en: { ietf: 'en-GR', tk: 'pps7abe.css' },
gt: { ietf: 'es-419', tk: 'oln4yqj.css' },
hk_en: { ietf: 'en-HK', tk: 'pps7abe.css' },
ae_ar: { ietf: 'ar', tk: 'qxw8hzm.css', dir: 'rtl' },
ae_en: { ietf: 'en', tk: 'hah7vzn.css' },
africa: { ietf: 'en', tk: 'hah7vzn.css' },
ar: { ietf: 'es-AR', tk: 'hah7vzn.css' },
at: { ietf: 'de-AT', tk: 'hah7vzn.css' },
au: { ietf: 'en-AU', tk: 'hah7vzn.css' },
be_en: { ietf: 'en-BE', tk: 'hah7vzn.css' },
be_fr: { ietf: 'fr-BE', tk: 'hah7vzn.css' },
be_nl: { ietf: 'nl-BE', tk: 'qxw8hzm.css' },
bg: { ietf: 'bg-BG', tk: 'qxw8hzm.css' },
br: { ietf: 'pt-BR', tk: 'hah7vzn.css' },
ca_fr: { ietf: 'fr-CA', tk: 'hah7vzn.css' },
ca: { ietf: 'en-CA', tk: 'hah7vzn.css' },
ch_de: { ietf: 'de-CH', tk: 'hah7vzn.css' },
ch_fr: { ietf: 'fr-CH', tk: 'hah7vzn.css' },
ch_it: { ietf: 'it-CH', tk: 'hah7vzn.css' },
cl: { ietf: 'es-CL', tk: 'hah7vzn.css' },
cn: { ietf: 'zh-CN', tk: 'qxw8hzm' },
co: { ietf: 'es-CO', tk: 'hah7vzn.css' },
cr: { ietf: 'es-419', tk: 'hah7vzn.css' },
cy_en: { ietf: 'en-CY', tk: 'hah7vzn.css' },
cz: { ietf: 'cs-CZ', tk: 'qxw8hzm.css' },
de: { ietf: 'de-DE', tk: 'hah7vzn.css' },
dk: { ietf: 'da-DK', tk: 'qxw8hzm.css' },
ec: { ietf: 'es-419', tk: 'hah7vzn.css' },
ee: { ietf: 'et-EE', tk: 'qxw8hzm.css' },
eg_ar: { ietf: 'ar', tk: 'qxw8hzm.css', dir: 'rtl' },
eg_en: { ietf: 'en-GB', tk: 'hah7vzn.css' },
el: { ietf: 'el', tk: 'qxw8hzm.css' },
es: { ietf: 'es-ES', tk: 'hah7vzn.css' },
fi: { ietf: 'fi-FI', tk: 'qxw8hzm.css' },
fr: { ietf: 'fr-FR', tk: 'hah7vzn.css' },
gr_el: { ietf: 'el', tk: 'qxw8hzm.css' },
gr_en: { ietf: 'en-GR', tk: 'hah7vzn.css' },
gt: { ietf: 'es-419', tk: 'hah7vzn.css' },
hk_en: { ietf: 'en-HK', tk: 'hah7vzn.css' },
hk_zh: { ietf: 'zh-HK', tk: 'jay0ecd' },
hu: { ietf: 'hu-HU', tk: 'aaz7dvd.css' },
id_en: { ietf: 'en', tk: 'pps7abe.css' },
id_id: { ietf: 'id', tk: 'czc0mun.css' },
ie: { ietf: 'en-GB', tk: 'pps7abe.css' },
il_en: { ietf: 'en-IL', tk: 'pps7abe.css' },
il_he: { ietf: 'he', tk: 'nwq1mna.css', dir: 'rtl' },
in_hi: { ietf: 'hi', tk: 'aaa8deh.css' },
in: { ietf: 'en-GB', tk: 'pps7abe.css' },
it: { ietf: 'it-IT', tk: 'bbf5pok.css' },
hu: { ietf: 'hu-HU', tk: 'qxw8hzm.css' },
id_en: { ietf: 'en', tk: 'hah7vzn.css' },
id_id: { ietf: 'id', tk: 'qxw8hzm.css' },
ie: { ietf: 'en-GB', tk: 'hah7vzn.css' },
il_en: { ietf: 'en-IL', tk: 'hah7vzn.css' },
il_he: { ietf: 'he', tk: 'qxw8hzm.css', dir: 'rtl' },
in_hi: { ietf: 'hi', tk: 'qxw8hzm.css' },
in: { ietf: 'en-GB', tk: 'hah7vzn.css' },
it: { ietf: 'it-IT', tk: 'hah7vzn.css' },
jp: { ietf: 'ja-JP', tk: 'dvg6awq' },
kr: { ietf: 'ko-KR', tk: 'qjs5sfm' },
kw_ar: { ietf: 'ar', tk: 'nwq1mna.css', dir: 'rtl' },
kw_en: { ietf: 'en-GB', tk: 'pps7abe.css' },
la: { ietf: 'es-LA', tk: 'oln4yqj.css' },
kw_ar: { ietf: 'ar', tk: 'qxw8hzm.css', dir: 'rtl' },
kw_en: { ietf: 'en-GB', tk: 'hah7vzn.css' },
la: { ietf: 'es-LA', tk: 'hah7vzn.css' },
langstore: { ietf: 'en-US', tk: 'hah7vzn.css' },
lt: { ietf: 'lt-LT', tk: 'aaz7dvd.css' },
lu_de: { ietf: 'de-LU', tk: 'vin7zsi.css' },
lu_en: { ietf: 'en-LU', tk: 'pps7abe.css' },
lu_fr: { ietf: 'fr-LU', tk: 'vrk5vyv.css' },
lv: { ietf: 'lv-LV', tk: 'aaz7dvd.css' },
mena_ar: { ietf: 'ar', tk: 'dis2dpj.css', dir: 'rtl' },
mena_en: { ietf: 'en', tk: 'pps7abe.css' },
mt: { ietf: 'en-MT', tk: 'pps7abe.css' },
mx: { ietf: 'es-MX', tk: 'oln4yqj.css' },
my_en: { ietf: 'en-GB', tk: 'pps7abe.css' },
my_ms: { ietf: 'ms', tk: 'sxj4tvo.css' },
ng: { ietf: 'en-GB', tk: 'pps7abe.css' },
nl: { ietf: 'nl-NL', tk: 'cya6bri.css' },
no: { ietf: 'no-NO', tk: 'aaz7dvd.css' },
nz: { ietf: 'en-GB', tk: 'pps7abe.css' },
pe: { ietf: 'es-PE', tk: 'oln4yqj.css' },
ph_en: { ietf: 'en', tk: 'pps7abe.css' },
ph_fil: { ietf: 'fil-PH', tk: 'ict8rmp.css' },
pl: { ietf: 'pl-PL', tk: 'aaz7dvd.css' },
pr: { ietf: 'es-419', tk: 'oln4yqj.css' },
pt: { ietf: 'pt-PT', tk: 'inq1xob.css' },
qa_ar: { ietf: 'ar', tk: 'nwq1mna.css', dir: 'rtl' },
qa_en: { ietf: 'en-GB', tk: 'pps7abe.css' },
ro: { ietf: 'ro-RO', tk: 'aaz7dvd.css' },
ru: { ietf: 'ru-RU', tk: 'aaz7dvd.css' },
sa_ar: { ietf: 'ar', tk: 'nwq1mna.css', dir: 'rtl' },
sa_en: { ietf: 'en', tk: 'pps7abe.css' },
se: { ietf: 'sv-SE', tk: 'fpk1pcd.css' },
sg: { ietf: 'en-SG', tk: 'pps7abe.css' },
si: { ietf: 'sl-SI', tk: 'aaz7dvd.css' },
sk: { ietf: 'sk-SK', tk: 'aaz7dvd.css' },
th_en: { ietf: 'en', tk: 'pps7abe.css' },
th_th: { ietf: 'th', tk: 'aaz7dvd.css' },
tr: { ietf: 'tr-TR', tk: 'aaz7dvd.css' },
lt: { ietf: 'lt-LT', tk: 'qxw8hzm.css' },
lu_de: { ietf: 'de-LU', tk: 'hah7vzn.css' },
lu_en: { ietf: 'en-LU', tk: 'hah7vzn.css' },
lu_fr: { ietf: 'fr-LU', tk: 'hah7vzn.css' },
lv: { ietf: 'lv-LV', tk: 'qxw8hzm.css' },
mena_ar: { ietf: 'ar', tk: 'qxw8hzm.css', dir: 'rtl' },
mena_en: { ietf: 'en', tk: 'hah7vzn.css' },
mt: { ietf: 'en-MT', tk: 'hah7vzn.css' },
mx: { ietf: 'es-MX', tk: 'hah7vzn.css' },
my_en: { ietf: 'en-GB', tk: 'hah7vzn.css' },
my_ms: { ietf: 'ms', tk: 'qxw8hzm.css' },
ng: { ietf: 'en-GB', tk: 'hah7vzn.css' },
nl: { ietf: 'nl-NL', tk: 'qxw8hzm.css' },
no: { ietf: 'no-NO', tk: 'qxw8hzm.css' },
nz: { ietf: 'en-GB', tk: 'hah7vzn.css' },
pe: { ietf: 'es-PE', tk: 'hah7vzn.css' },
ph_en: { ietf: 'en', tk: 'hah7vzn.css' },
ph_fil: { ietf: 'fil-PH', tk: 'qxw8hzm.css' },
pl: { ietf: 'pl-PL', tk: 'qxw8hzm.css' },
pr: { ietf: 'es-419', tk: 'hah7vzn.css' },
pt: { ietf: 'pt-PT', tk: 'hah7vzn.css' },
qa_ar: { ietf: 'ar', tk: 'qxw8hzm.css', dir: 'rtl' },
qa_en: { ietf: 'en-GB', tk: 'hah7vzn.css' },
ro: { ietf: 'ro-RO', tk: 'qxw8hzm.css' },
ru: { ietf: 'ru-RU', tk: 'qxw8hzm.css' },
sa_ar: { ietf: 'ar', tk: 'qxw8hzm.css', dir: 'rtl' },
sa_en: { ietf: 'en', tk: 'hah7vzn.css' },
se: { ietf: 'sv-SE', tk: 'qxw8hzm.css' },
sg: { ietf: 'en-SG', tk: 'hah7vzn.css' },
si: { ietf: 'sl-SI', tk: 'qxw8hzm.css' },
sk: { ietf: 'sk-SK', tk: 'qxw8hzm.css' },
th_en: { ietf: 'en', tk: 'hah7vzn.css' },
th_th: { ietf: 'th', tk: 'qxw8hzm.css' },
tr: { ietf: 'tr-TR', tk: 'qxw8hzm.css' },
tw: { ietf: 'zh-TW', tk: 'jay0ecd' },
ua: { ietf: 'uk-UA', tk: 'aaz7dvd.css' },
uk: { ietf: 'en-GB', tk: 'pps7abe.css' },
vn_en: { ietf: 'en-GB', tk: 'pps7abe.css' },
vn_vi: { ietf: 'vi', tk: 'jii8bki.css' },
za: { ietf: 'en-GB', tk: 'pps7abe.css' },
ua: { ietf: 'uk-UA', tk: 'qxw8hzm.css' },
uk: { ietf: 'en-GB', tk: 'hah7vzn.css' },
vn_en: { ietf: 'en-GB', tk: 'hah7vzn.css' },
vn_vi: { ietf: 'vi', tk: 'qxw8hzm.css' },
za: { ietf: 'en-GB', tk: 'hah7vzn.css' },
};

const config = {
Expand Down
2 changes: 2 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow: /
10 changes: 5 additions & 5 deletions test/blocks/library-config/library-config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Library Config: text', () => {
verifyContainer(containers[0], 1, true);
// verify getHtml()
const docxHtml = getHtml(containers[0], BLOCK_PAGE_URL);
expect(docxHtml).to.equal(expectedDocxHtml);
expect(docxHtml).to.equal(expectedDocxHtml.trim());
// verify getSearchTags()
const searchTags = getSearchTags(containers[0]);
expect(searchTags).to.equal('tb-2up-gr10 tb-3up-gr12 text');
Expand All @@ -57,7 +57,7 @@ describe('Library Config: chart', () => {
verifyContainer(containers[0], 1, true);
// verify getHtml()
const docxHtml = getHtml(containers[0], BLOCK_PAGE_URL);
expect(docxHtml).to.equal(expectedDocxHtml);
expect(docxHtml).to.equal(expectedDocxHtml.trim());
// verify getSearchTags()
const searchTags = getSearchTags(containers[0]);
expect(searchTags).to.equal('chart-0 chart (area, green, border)');
Expand All @@ -84,7 +84,7 @@ describe('Library Config: marquee', () => {
verifyContainer(containers[0], 1, true);
// verify getHtml()
const docxHtml = getHtml(containers[0], BLOCK_PAGE_URL);
expect(docxHtml).to.equal(expectedDocxHtml);
expect(docxHtml).to.equal(expectedDocxHtml.trim());
// verify getSearchTags()
const searchTags = getSearchTags(containers[0]);
expect(searchTags).to.equal('mq-std-md-lt mq-std-md-rt mq-std-md-lt-vid marquee-dark marquee');
Expand Down Expand Up @@ -148,8 +148,8 @@ describe('Library Config: containers', () => {
const containers = getContainers(document);
const singleBlockHtml = getHtml(containers[0], BLOCK_PAGE_URL);
const containerHtml = getHtml(containers[3], BLOCK_PAGE_URL);
expect(singleBlockHtml).to.equal(expectedSingleBlockHtml);
expect(containerHtml).to.equal(expectedContainerHtml);
expect(singleBlockHtml).to.equal(expectedSingleBlockHtml.trim());
expect(containerHtml).to.equal(expectedContainerHtml.trim());
});

it('getSearchTags', async () => {
Expand Down

0 comments on commit 20a251e

Please sign in to comment.