Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] Stage to Main #3718

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/rcp-notifier.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
File ignored by default. Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override.

Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ const main = async () => {
const slackText = (days) =>
`Reminder RCP starts in ${days} days: from ${start.toUTCString()} to ${end.toUTCString()}. Merges to stage will be disabled beginning ${calculateDateOffset(start, stageOffset).toUTCString()}.`;
if (isWithin24Hours(firstNoticeOffset) && !isShort) {
console.log('Is within 24 hours of 10 days before RCP');
await slackNotification(slackText(10), process.env.MILO_DEV_HOOK);
console.log('Is within 24 hours of 13 days before RCP');
await slackNotification(slackText(13), process.env.MILO_DEV_HOOK);
}

if (isWithin24Hours(lastNoticeOffset) && !isShort) {
console.log('Is within 24 hours of 4 days before RCP');
await slackNotification(slackText(4), process.env.MILO_DEV_HOOK);
console.log('Is within 24 hours of 6 days before RCP');
await slackNotification(slackText(6), process.env.MILO_DEV_HOOK);
}
}

Expand Down
2 changes: 1 addition & 1 deletion libs/blocks/chart/chartLightTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default (deviceSize) => {
const axisColor = '#767676';
const options = {
textStyle: {
fontFamily: 'Adobe Clean',
fontFamily: '"Adobe Clean", adobe-clean, "Trebuchet MS", sans-serif',
fontSize: 16,
fontWeight: 700,
},
Expand Down
2 changes: 1 addition & 1 deletion libs/blocks/fragment/fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default async function init(a) {

let resourcePath = a.href;
if (a.href.includes('/federal/')) {
const { getFederatedUrl } = await import('../../utils/federated.js');
const { getFederatedUrl } = await import('../../utils/utils.js');
resourcePath = getFederatedUrl(a.href);
}
const resp = await customFetch({ resource: `${resourcePath}.plain.html`, withCacheRules: true })
Expand Down
18 changes: 13 additions & 5 deletions libs/blocks/global-footer/global-footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -221,25 +221,28 @@
/* Privacy */
.feds-footer-legalWrapper {
display: flex;
flex-direction: column; /* More privacy rows are allowed */
align-items: flex-start;
flex-direction: column;
row-gap: 12px;
}

.feds-footer-privacySection {
display: flex;
align-items: center;
column-gap: 5px;
flex-wrap: wrap;
margin: 0;
}

.feds-footer-privacyLink {
display: flex;
display: inline-flex;
column-gap: 5px;
align-items: center;
color: var(--feds-color-link);
fill: var(--feds-color-link);
vertical-align: bottom;
}

span.feds-footer-privacyLink-divider {
display: inline-block;
margin: 0 5px;
}

.feds-footer-privacyLink:hover {
Expand Down Expand Up @@ -310,12 +313,17 @@
/* Privacy */
.feds-footer-legalWrapper {
align-items: flex-end;
text-align: right;
}

.feds-footer-privacySection {
justify-content: flex-end;
text-align: right;
}
span.feds-footer-privacyLink-divider, .feds-footer-privacyLink {
margin-left: 5px;
margin-right: 0;
}
}

/* max-width (1440) + 2 x gutter (32) */
Expand Down
33 changes: 28 additions & 5 deletions libs/blocks/global-footer/global-footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
getConfig,
localizeLink,
loadStyle,
getFederatedUrl,
getFedsPlaceholderConfig,
} from '../../utils/utils.js';

import {
Expand All @@ -22,8 +24,6 @@ import {
isDarkMode,
} from '../global-navigation/utilities/utilities.js';

import { getFederatedUrl, getFedsPlaceholderConfig } from '../../utils/federated.js';

import { replaceKey } from '../../features/placeholders.js';

const { miloLibs, codeRoot, locale, mep } = getConfig();
Expand Down Expand Up @@ -339,9 +339,7 @@ class Footer {

// Decorate copyright element
const currentYear = new Date().getFullYear();
copyrightElem.replaceWith(toFragment`<span class="feds-footer-copyright">
Copyright © ${currentYear} ${copyrightElem.textContent}
</span>`);
copyrightElem.remove();

// Add Ad Choices icon
const adChoicesElem = privacyContent.querySelector('a[href*="#interest-based-ads"]');
Expand All @@ -350,15 +348,40 @@ class Footer {
</svg>`);

this.elements.legal = toFragment`<div class="feds-footer-legalWrapper" daa-lh="Legal"></div>`;
const linkDivider = '<span class="feds-footer-privacyLink-divider" aria-hidden="true">/</span>';

let privacyContentIndex = 0;
while (privacyContent.children.length) {
const privacySection = privacyContent.firstElementChild;
privacySection.classList.add('feds-footer-privacySection');
privacySection.querySelectorAll('a').forEach((link, index) => {
link.classList.add('feds-footer-privacyLink');
link.setAttribute('daa-ll', getAnalyticsValue(link.textContent, index + 1));
const privacySectionListItem = document.createElement('li');
privacySectionListItem.classList.add('feds-footer-privacy-listitem');
link.parentNode.insertBefore(privacySectionListItem, link);
privacySectionListItem.appendChild(link);
if (index !== privacySection.querySelectorAll('a').length - 1) {
privacySectionListItem.innerHTML += linkDivider;
}
});
this.elements.legal.append(privacySection);

if (privacyContentIndex === 0) {
const privacySectionList = document.createElement('ul');
[...privacySection.attributes].forEach((attr) => {
privacySectionList.setAttribute(attr.name, attr.value);
});
const copyrightListItem = document.createElement('li');
copyrightListItem.classList.add('feds-footer-privacy-listitem');
copyrightListItem.innerHTML = linkDivider;
copyrightListItem.prepend(copyrightElem);
copyrightElem.replaceWith(toFragment`<span class="feds-footer-copyright">Copyright © ${currentYear} ${copyrightElem.textContent}</span>`);
privacySectionList.prepend(copyrightListItem);
privacySectionList.innerHTML += privacySection.innerHTML.replace(/( \/ )/g, '');
privacySection.parentNode.replaceChild(privacySectionList, privacySection);
}
privacyContentIndex += 1;
}

return this.elements.legal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { getMetadata, getConfig } from '../../../../utils/utils.js';
import { getMetadata, getConfig, getFederatedUrl } from '../../../../utils/utils.js';
import { toFragment, lanaLog } from '../../utilities/utilities.js';
import { getFederatedUrl } from '../../../../utils/federated.js';

const metadata = {
seo: 'breadcrumbs-seo',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { getConfig } from '../../../../utils/utils.js';
import { getConfig, getFedsPlaceholderConfig } from '../../../../utils/utils.js';
import { toFragment, trigger, closeAllDropdowns, logErrorFor } from '../../utilities/utilities.js';
import { replaceKeyArray } from '../../../../features/placeholders.js';
import { getFedsPlaceholderConfig } from '../../../../utils/federated.js';

const getLanguage = (ietfLocale) => {
if (!ietfLocale.length) return 'en';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import {
lanaLog,
} from '../../utilities/utilities.js';
import { replaceKeyArray } from '../../../../features/placeholders.js';
import { getConfig } from '../../../../utils/utils.js';
import { getConfig, getFedsPlaceholderConfig } from '../../../../utils/utils.js';
import { debounce } from '../../../../utils/action.js';
import { getFedsPlaceholderConfig } from '../../../../utils/federated.js';

const CONFIG = {
suggestions: {
Expand Down
10 changes: 5 additions & 5 deletions libs/blocks/global-navigation/global-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
decorateLinks,
loadScript,
getGnavSource,
getFedsPlaceholderConfig,
} from '../../utils/utils.js';
import {
closeAllDropdowns,
Expand Down Expand Up @@ -45,7 +46,6 @@ import {
branchBannerLoadCheck,
getBranchBannerInfo,
} from './utilities/utilities.js';
import { getFedsPlaceholderConfig } from '../../utils/federated.js';

import { replaceKey, replaceKeyArray } from '../../features/placeholders.js';

Expand Down Expand Up @@ -1005,7 +1005,7 @@ class Gnav {

decorateMainNav = async () => {
const breadcrumbs = isDesktop.matches ? '' : await this.decorateBreadcrumbs();
this.elements.mainNav = toFragment`<div class="feds-nav"></div>`;
this.elements.mainNav = toFragment`<div class="feds-nav" role="list"></div>`;
this.elements.navWrapper = toFragment`
<div class="feds-nav-wrapper" id="feds-nav-wrapper">
${breadcrumbs}
Expand Down Expand Up @@ -1204,7 +1204,7 @@ class Gnav {
const sectionModifier = isSectionMenu ? ' feds-navItem--section' : '';
const sectionDaaLh = isSectionMenu ? ` daa-lh='${getAnalyticsValue(item.textContent)}'` : '';
const triggerTemplate = toFragment`
<${tag} class="feds-navItem${sectionModifier}${activeModifier}" ${sectionDaaLh}>
<${tag} role="listitem" class="feds-navItem${sectionModifier}${activeModifier}" ${sectionDaaLh}>
${dropdownTrigger}
</${tag}>`;

Expand Down Expand Up @@ -1237,7 +1237,7 @@ class Gnav {
// Remove its 'em' or 'strong' wrapper
item.parentElement.replaceWith(item);

return addMepHighlightAndTargetId(toFragment`<div class="feds-navItem feds-navItem--centered">
return addMepHighlightAndTargetId(toFragment`<div class="feds-navItem feds-navItem--centered" role="listitem">
${decorateCta({ elem: item, type: itemType, index: index + 1 })}
</div>`, item);
case 'link': {
Expand Down Expand Up @@ -1271,7 +1271,7 @@ class Gnav {
}

const linkTemplate = toFragment`
<div class="feds-navItem${activeModifier}${customLinkModifier}">
<div class="feds-navItem${activeModifier}${customLinkModifier}" role="listitem">
${linkElem}
</div>`;
return removeCustomLink ? '' : addMepHighlightAndTargetId(linkTemplate, item);
Expand Down
11 changes: 9 additions & 2 deletions libs/blocks/global-navigation/utilities/utilities.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
/* eslint import/no-relative-packages: 0 */
import {
getConfig, getMetadata, loadStyle, loadLana, decorateLinks, localizeLink,
getConfig,
getMetadata,
loadStyle,
loadLana,
decorateLinks,
localizeLink,
getFederatedContentRoot,
getFederatedUrl,
getFedsPlaceholderConfig,
} from '../../../utils/utils.js';
import { getFederatedContentRoot, getFederatedUrl, getFedsPlaceholderConfig } from '../../../utils/federated.js';
import { processTrackingLabels } from '../../../martech/attributes.js';
import { replaceText } from '../../../features/placeholders.js';
import { PERSONALIZATION_TAGS } from '../../../features/personalization/personalization.js';
Expand Down
50 changes: 47 additions & 3 deletions libs/blocks/mmm/mmm.css
Original file line number Diff line number Diff line change
Expand Up @@ -491,14 +491,13 @@ dd .mep-popup-header .mep-close {
pointer-events: none;
}
#mmm-pagination .arrow {
font-size: 1.5rem;
font-weight: 600;
}

.mmm-pagination-summary {
display: flex;
justify-content: flex-end;
padding: 0 0 .5rem;
padding: 0 0;
}

main > .section > .share-mmm.inline {
Expand Down Expand Up @@ -528,4 +527,49 @@ main > .section > .inline-wrapper > .share-mmm.inline {
#mmm-pagination {
padding: 2rem 4rem;
}
}
}

/* pagination */
#mmm-pagination-wrapper {
width: 100%;
display: flex;
gap: 10px;
justify-content: right;
flex-direction: row;
}

#pagination-select {
align-items: center;
}

#mmm-pagination-wrapper label,
#mmm-pagination-wrapper span {
font-size: 12px;
font-weight: 400;
text-align: left;
}

#mmm-pagination-dropdown {
min-width: 90px;
height: 36px;
border-radius: 4px;
margin-right: 20px;
}

#pagination-arrows,
#pagination-select {
display: flex;
gap: 10px;
align-items: center;
}

#pagination-arrows a:not(.disabled) {
color: #000;
cursor: pointer;
}

#pagination-arrows a.disabled svg {
opacity: .4;
}


Loading
Loading