Skip to content

Commit

Permalink
Syncing milo to milo-pink
Browse files Browse the repository at this point in the history
  • Loading branch information
milo-repo-sync[bot] committed Mar 22, 2024
1 parent dd1aafa commit 25b29be
Show file tree
Hide file tree
Showing 450 changed files with 35,918 additions and 3,230 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module.exports = {
ignorePatterns: [
'/libs/deps/*',
'/tools/loc/*',
'/libs/features/spectrum-web-components/*',
],
plugins: [
'chai-friendly',
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules/*
.DS_Store
.idea
.iml
.env
24 changes: 24 additions & 0 deletions .kodiak/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 1.0

snow:
- id: 324444 # Milo/Helix (milo.adobe.com)

notifications:
jira:
default:
project: MWPW # Mandatory
filters:
include:
risk_rating: R5
fields:
assignee:
name: casalino
customfield_11800: MWPW-140779 #epic link
watchers:
- casalino
- jmichnow
- mauchley
labels:
- "OriginatingProcess=Kodiak"
components:
- name: "DevOps Security"
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"ryanluker.vscode-coverage-gutters",
"eamodio.gitlens"
"eamodio.gitlens",
"github.vscode-pull-request-github"
]
}
32 changes: 22 additions & 10 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,51 @@
/libs/features/title-append/ @hparra
/libs/martech/ @adobecom/admins
/libs/scripts/ @adobecom/admins
/libs/scripts/taxonomy.js @meganthecoder @JasonHowellSlavin @Brandon32 @rgclayton
/libs/utils/ @adobecom/admins

# Milo Blocks (alphabetical order)
/libs/blocks/accordion/ @fullcolorcoder @ryanmparrish
/libs/blocks/article-feed/ @meganthecoder @JasonHowellSlavin @Brandon32 @rgclayton
/libs/blocks/article-header/ @meganthecoder @JasonHowellSlavin @Brandon32 @rgclayton
/libs/blocks/aside/ @Sartxi
/libs/blocks/bulk-publish-v2 @Sartxi
/libs/blocks/caas/ @chrischrischris
/libs/blocks/caas-config/ @chrischrischris
/libs/blocks/carousel/ @rgclayton
/libs/blocks/chart/ @meganthecoder @Brandon32 @JasonHowellSlavin @sanjayms01
/libs/blocks/commerce/ @Axelcureno @VKniaz
/libs/blocks/chart/ @meganthecoder @Brandon32 @JasonHowellSlavin
/libs/blocks/commerce/ @adobecom/tacocat
/libs/blocks/faas/ @seanchoi-dev
/libs/blocks/faas-config/ @seanchoi-dev
/libs/blocks/featured-article/ @meganthecoder @JasonHowellSlavin @Brandon32 @rgclayton
/libs/blocks/form/ @elan-tbx @rgclayton
/libs/blocks/fragment-personalization/ @chrischrischris
/libs/blocks/global-footer/ @overmyheadandbody @mokimo @narcis-radu
/libs/blocks/global-navigation/ @overmyheadandbody @mokimo @narcis-radu
/libs/blocks/how-to/ @fullcolorcoder @ryanmparrish
/libs/blocks/icon-block/ @elan-tbx
/libs/blocks/local-nav/ @seanchoi-dev
/libs/blocks/marketo/ @Brandon32
/libs/blocks/marketo-config/ @Brandon32
/libs/blocks/marketo/ @Brandon32 @meganthecoder @JasonHowellSlavin
/libs/blocks/marketo-config/ @Brandon32 @meganthecoder @JasonHowellSlavin
/libs/blocks/marquee/ @ryanmparrish @Sartxi @auniverseaway
/libs/blocks/media/ @ryanmparrish
/libs/blocks/merch/ @3ch023 @honstar @VKniaz @npeltier @Axelcureno
/libs/blocks/merch-card/ @VKniaz @Axelcureno @ryanmparrish
/libs/blocks/ost/ @Axelcureno @3ch023 @honstar @VKniaz @vladen @yesil @npeltier
/libs/blocks/pdf-vewer/ @sanjayms01
/libs/blocks/merch/ @adobecom/tacocat
/libs/blocks/merch-card/ @adobecom/tacocat
/libs/blocks/merch-cards/ @adobecom/tacocat
/libs/blocks/merch-offers/ @adobecom/tacocat
/libs/blocks/mnemonic-list/ @adobecom/tacocat
/libs/blocks/ost/ @adobecom/tacocat
/libs/blocks/pdf-vewer/ @meganthecoder @JasonHowellSlavin @Brandon32
/libs/blocks/quiz/ @colloyd @sabyamon @fullcolorcoder @JackySun9 @elaineskpt @echampio-at-adobe
/libs/blocks/quiz-marquee/ @ryanmparrish
/libs/blocks/quiz-results/ @colloyd @sabyamon @fullcolorcoder @JackySun9 @elaineskpt @echampio-at-adobe
/libs/blocks/quote/ @ryanmparrish
/libs/blocks/recommended-articles/ @meganthecoder @JasonHowellSlavin @Brandon32 @rgclayton
/libs/blocks/review/ @nkthakur48 @chrischrischris @auniverseaway
/libs/blocks/table-of-contents/ @Brandon32
/libs/blocks/table-of-contents/ @Brandon32 @meganthecoder @JasonHowellSlavin
/libs/blocks/tabs/ @ryanmparrish
/libs/blocks/tag-selector/ @meganthecoder
/libs/blocks/tag-selector/ @meganthecoder @JasonHowellSlavin @Brandon32
/libs/blocks/tags/ @meganthecoder @JasonHowellSlavin @Brandon32 @rgclayton
/libs/blocks/text/ @ryanmparrish
/libs/blocks/video-metadata/ @hparra
/libs/blocks/z-pattern/ @ryanmparrish
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2022 Adobe Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
29 changes: 23 additions & 6 deletions libs/blocks/accordion/accordion.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ dl.accordion {
pointer-events: none;
}

html[dir="rtl"] .accordion-icon {
right: unset;
left: var(--spacing-xs);
}

.accordion-icon::before,
.accordion-icon::after {
content: "";
Expand Down Expand Up @@ -145,6 +150,18 @@ dl.accordion {
background: var(--color-gray-100);
}

html[dir="rtl"] .accordion dt button {
padding: var(--spacing-s) var(--spacing-xs) var(--spacing-s) var(--spacing-m);
}

html[dir="rtl"] .accordion dt button::before {
right: 0;
}

.section[class*='-up'] dl.accordion {
max-width: unset;
}

/* Editorial Variation */
.accordion-media {
display: none;
Expand All @@ -158,17 +175,17 @@ dl.accordion {
}


@keyframes fade-in {
0% {
@keyframes fade-in {
0% {
opacity: 0;
}

100% {
opacity: 1;
100% {
opacity: 1;
}
}

.accordion-media > div.expanded,
.accordion-media > div.expanded,
.accordion-media > div.expanded > img {
display: inline;
position: relative;
Expand All @@ -190,7 +207,7 @@ div.media-p {
align-items: center;
justify-content: center;
}

.editorial .accordion {
width: 50%;
display: inline-block;
Expand Down
15 changes: 11 additions & 4 deletions libs/blocks/accordion/accordion.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createTag } from '../../utils/utils.js';
import { decorateButtons } from '../../utils/decorate.js';
import { processTrackingLabels } from '../../martech/analytics.js';
import { processTrackingLabels } from '../../martech/attributes.js';

const faq = { '@context': 'https://schema.org', '@type': 'FAQPage', mainEntity: [] };
const mediaCollection = {};
Expand Down Expand Up @@ -74,11 +74,11 @@ function createItem(accordion, id, heading, num, edit) {
const panelId = `accordion-${id}-content-${num}`;
const icon = createTag('span', { class: 'accordion-icon' });
const hTag = heading.querySelector('h1, h2, h3, h4, h5, h6');
const analyticsString = `open-${num}|${processTrackingLabels(heading.textContent)}`;
const analyticsString = `open-${num}--${processTrackingLabels(heading.textContent)}`;
const button = createTag('button', {
type: 'button',
id: triggerId,
class: 'accordion-trigger',
class: 'accordion-trigger tracking-header',
'aria-expanded': 'false',
'aria-controls': panelId,
'daa-ll': analyticsString,
Expand Down Expand Up @@ -135,7 +135,14 @@ export default function init(el) {

const headings = el.querySelectorAll(':scope > div:nth-child(odd)');
const items = [...headings].map(
(heading, idx) => createItem(accordion, id, heading, idx + 1, isEditorial, accordionMedia),
(heading, idx) => createItem(
accordion,
id,
heading,
idx + 1,
isEditorial,
accordionMedia,
),
);

if (isSeo) { setSEO(items); }
Expand Down
4 changes: 4 additions & 0 deletions libs/blocks/action-item/action-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@
transform: scale(1.05);
}

.action-item.float-icon .main-image {
display: block;
}

.action-item.float-icon .floated-icon {
display: flex;
position: absolute;
Expand Down
11 changes: 5 additions & 6 deletions libs/blocks/article-feed/article-feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,26 @@ export function readBlockConfig(block) {
* fetches blog article index.
* @returns {object} index with data and path lookup
*/
export async function fetchBlogArticleIndex() {
export async function fetchBlogArticleIndex(config) {
if (blogIndex.complete) return (blogIndex);
const pageSize = 500;
const { feed } = blogIndex.config;
const { feed } = config || blogIndex.config;
const queryParams = `?limit=${pageSize}&offset=${blogIndex.offset}`;
blogIndex.offset += pageSize;
const defaultPath = updateLinkWithLangRoot(`${getConfig().locale.contentRoot}/query-index.json`);
const indexPath = feed
? `${feed}${queryParams}`
: `${defaultPath}${queryParams}`;

if (blogIndex.complete) return (blogIndex);

return fetch(indexPath)
.then((response) => response.json())
.then((json) => {
const complete = (json.limit + json.offset) === json.total;
const complete = (json.limit + json.offset) >= json.total;
json.data.forEach((post) => {
blogIndex.data.push(post);
blogIndex.byPath[post.path.split('.')[0]] = post;
});
blogIndex.complete = complete;
blogIndex.offset = json.offset + pageSize;

return blogIndex;
});
Expand Down
10 changes: 6 additions & 4 deletions 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 Expand Up @@ -281,7 +281,9 @@ export function getLinkForTopic(topic, path) {
* @returns card Generated card
*/
export function buildArticleCard(article, type = 'article', eager = false) {
const { title, description, image, imageAlt, date } = article;
const {
title, h1, description, image, imageAlt, date,
} = article;

const path = article.path.split('.')[0];

Expand All @@ -301,8 +303,8 @@ export function buildArticleCard(article, type = 'article', eager = false) {
<p class="${type}-card-category">
${categoryTag}
</p>
<h3>${title}</h3>
<p class="${type}-card-description">${description}</p>
<h3>${h1 || title}</h3>
<p class="${type}-card-description">${description && description !== '0' ? description : ''}</p>
<p class="${type}-card-date">${formatCardLocaleDate(date)}
</div>`;
return card;
Expand Down
Loading

0 comments on commit 25b29be

Please sign in to comment.