Skip to content

Commit

Permalink
Merge branch 'stage' into MWPW-142267
Browse files Browse the repository at this point in the history
  • Loading branch information
Axelcureno committed Aug 22, 2024
2 parents d04c3c1 + d90dcc0 commit 002aeab
Show file tree
Hide file tree
Showing 138 changed files with 12,204 additions and 3,818 deletions.
4 changes: 2 additions & 2 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
last 1 chrome version
last 1 firefox version
last 1 edge version
safari >= 14
ios_saf >= 14
safari >= 15
ios_saf >= 15
1 change: 1 addition & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ paths-ignore:
- 'tools/floodgate/**'
- 'tools/translation/**'
- node_modules
- libs/deps/mas
5 changes: 4 additions & 1 deletion .github/workflows/high-impact-alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ const main = async (params) => {
}

const { html_url, number, title } = context.payload.pull_request;
console.log('High impact label detected, sending Slack notification');
console.log('High impact label detected, sending Slack notifications');
slackNotification(`:alert: High Impact PR has been opened: <${html_url}|#${number}: ${title}>.` +
` Please prioritize testing the proposed changes.`, process.env.SLACK_HIGH_IMPACT_PR_WEBHOOK);
slackNotification(`:alert: High Impact PR has been opened: <${html_url}|#${number}: ${title}>.` +
` Please review the PR details promptly and raise any concerns or questions.`,
process.env.SLACK_MILO_UPDATES_WEBHOOK);
} catch (error) {
console.error(error);
}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/high-impact-alert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

env:
SLACK_HIGH_IMPACT_PR_WEBHOOK: ${{ secrets.SLACK_HIGH_IMPACT_PR_WEBHOOK }}
SLACK_MILO_UPDATES_WEBHOOK: ${{ secrets.SLACK_MILO_UPDATES_WEBHOOK }}

jobs:
send_alert:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/label-zero-impact.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ const zeroImpactDirs = [
'.kodiak',
'.vscode',
'.test',
'.browserslistrc',
'libs/mep',
'.eslintrc.js',
'CODEOWNERS',
'web-test-runner.config.mjs',
'LICENSE',
'codecov.yaml',
'.gitignore',
'package.json',
'package-lock.json',
];
const zeroImpactLabel = 'zero-impact';
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
.aem/*
coverage
logs/*
node_modules
*node_modules
.DS_Store
.idea
.iml
.env
**/mas/stats.json
**/mas/*/stats.json
10 changes: 9 additions & 1 deletion libs/blocks/accordion/accordion.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ dl.accordion {
border-bottom: 1px solid var(--color-gray-500);
}

.accordion-container.no-borders dl.accordion {
border: none;
}

.accordion dd {
margin: 0;
padding: var(--spacing-xs);
Expand All @@ -32,7 +36,7 @@ dl.accordion {
line-height: var(--type-heading-s-lh);
padding: var(--spacing-s) var(--spacing-m) var(--spacing-s) var(--spacing-xs);
position: relative;
text-align: left;
text-align: start;
width: 100%;
-webkit-text-size-adjust: 100%;
}
Expand All @@ -42,6 +46,10 @@ dl.accordion {
color: var(--color-black);
}

.accordion-container.no-borders .accordion dt button {
border: none;
}

.accordion dt .accordion-heading {
margin: 0;
}
Expand Down
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
38 changes: 19 additions & 19 deletions libs/blocks/editorial-card/editorial-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
min-width: initial;
}

.editorial-card.has-footer {
.editorial-card.equal-height {
height: 100%;
}

Expand All @@ -79,27 +79,29 @@
}

.editorial-card .foreground,
.editorial-card .footer {
.editorial-card .card-footer {
padding: var(--spacing-xs);
}

.editorial-card .extra-row {
padding: 0 var(--spacing-xs);
}

.editorial-card .footer {
.editorial-card .card-footer {
padding-top: 0;
margin-top: auto;
}

.editorial-card .footer > div {
.editorial-card .card-footer > div {
display: flex;
flex-direction: column;
text-align: end;
justify-content: end;
row-gap: var(--spacing-xxs);
}

.editorial-card .card-footer.empty { padding: 0; }

.editorial-card.no-bg.no-border .foreground {
padding: var(--spacing-s) 0;
}
Expand All @@ -109,7 +111,7 @@
}

.editorial-card.no-bg.no-border .static,
.editorial-card.no-bg.no-border .footer {
.editorial-card.no-bg.no-border .card-footer {
padding-inline: 0;
}

Expand All @@ -127,8 +129,8 @@
line-height: 0;
}

.editorial-card.footer-align-left .footer > div { text-align: start; }
.editorial-card.footer-align-center .footer > div { text-align: center; }
.editorial-card.footer-align-left .card-footer > div { text-align: start; }
.editorial-card.footer-align-center .card-footer > div { text-align: center; }

.editorial-card.no-bg.no-border .foreground > div {
row-gap: var(--spacing-xs);
Expand All @@ -154,11 +156,11 @@
}

.editorial-card .action-area,
.editorial-card .footer > .action-area {
.editorial-card .card-footer > .action-area {
display: flex;
align-items: center;
justify-content: right;
gap: var(--spacing-xxs);
gap: var(--spacing-xs) var(--spacing-s);
flex-flow: wrap;
flex-direction: row;
}
Expand All @@ -171,16 +173,13 @@
justify-content: center;
}

.editorial-card.right .action-area {
justify-content: right;
}

.editorial-card hr {
background-color: currentcolor;
border: none;
height: 1px;
width: 100%;
margin: var(--spacing-xs) 0;
margin: var(--spacing-xxs) 0;
}

.editorial-card .background {
Expand All @@ -204,6 +203,11 @@
position: relative;
}

.editorial-card:is(.media-square, .media-wide, .media-standard, .media-tall) .media-area .milo-video {
height: auto;
padding: 0;
}

/* Aspect Ratio */
.editorial-card.media-square .media-area img,
.editorial-card.media-square .media-area video {
Expand All @@ -224,7 +228,8 @@
}

.editorial-card.media-tall .media-area img,
.editorial-card.media-tall .media-area video {
.editorial-card.media-tall .media-area video,
.editorial-card.media-tall .media-area .milo-video {
aspect-ratio: var(--aspect-ratio-tall);
max-height: unset;
}
Expand All @@ -241,10 +246,5 @@
justify-items: center;
}

.editorial-card.right {
text-align: end;
justify-items: end;
}

.editorial-card.footer-align-left .action-area { justify-content: start; }
.editorial-card.footer-align-center .action-area { justify-content: center; }
7 changes: 4 additions & 3 deletions libs/blocks/editorial-card/editorial-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ const decorateForeground = async (el, rows) => {
row.classList.add('foreground');
await decorateLockupFromContent(row);
} else if (i === (rows.length - 1)) {
row.classList.add('footer');
row.classList.add('card-footer');
if (!row.textContent.trim()) row.classList.add('empty');
} else {
row.classList.add('extra-row');
}
Expand Down Expand Up @@ -86,12 +87,12 @@ const init = async (el) => {
if (![...el.classList].some((c) => c.endsWith('-lockup'))) el.classList.add('m-lockup');
let rows = el.querySelectorAll(':scope > div');
const [head, middle, ...tail] = rows;
if (rows.length === 4) el.classList.add('has-footer');
if (rows.length === 4) el.classList.add('equal-height');
if (rows.length >= 1) {
const count = rows.length >= 3 ? 'three-plus' : rows.length;
switch (count) {
case 'three-plus':
// 3+ rows (0:bg, 1:media, 2:copy, ...3:static, last:footer)
// 3+ rows (0:bg, 1:media, 2:copy, ...3:static, last:card-footer)
decorateBgRow(el, head);
rows = tail;
await decorateForeground(el, rows);
Expand Down
6 changes: 6 additions & 0 deletions libs/blocks/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ export class Footer {
const ariaExpanded = regionButton.classList.contains('inline-dialog-active');
regionButton.setAttribute('aria-expanded', ariaExpanded);
});
document.addEventListener('click', (e) => {
if (regionButton.classList.contains('inline-dialog-active') && !e.target.closest('.footer-region')) {
regionButton.setAttribute('aria-expanded', false);
regionButton.classList.remove('inline-dialog-active');
}
});
}
regionButton.className = 'footer-region-button';
regionButton.setAttribute('aria-haspopup', true);
Expand Down
16 changes: 9 additions & 7 deletions libs/blocks/global-navigation/global-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,15 @@ class Gnav {
try {
this.block.removeEventListener('click', this.loadDelayed);
this.block.removeEventListener('keydown', this.loadDelayed);
const [
Search,
] = await Promise.all([
loadBlock('../features/search/gnav-search.js'),
loadStyles(rootPath('features/search/gnav-search.css')),
]);
this.Search = Search;
if (this.searchPresent()) {
const [
Search,
] = await Promise.all([
loadBlock('../features/search/gnav-search.js'),
loadStyles(rootPath('features/search/gnav-search.css')),
]);
this.Search = Search;
}

if (!this.useUniversalNav) {
const [ProfileDropdown] = await Promise.all([
Expand Down
Loading

0 comments on commit 002aeab

Please sign in to comment.