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 #2409

Merged
merged 15 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 14 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
4 changes: 3 additions & 1 deletion .github/workflows/high-impact-alert.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: High Impact Alert

on:
pull_request:
pull_request_target:
types:
- labeled

Expand All @@ -15,6 +15,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.base.ref }}

- name: Send Slack message for high impact PRs
uses: actions/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-reminders.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Run from the root of the project for local testing: node --env-file=.env .github/workflows/pr-reminders.js

Check warning on line 1 in .github/workflows/pr-reminders.js

View workflow job for this annotation

GitHub Actions / Running eslint

[eslint] reported by reviewdog 🐶 File ignored by default. Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override. Raw Output: {"fatal":false,"severity":1,"message":"File ignored by default. Use a negated ignore pattern (like \"--ignore-pattern '!<relative/path/to/filename>'\") to override."}
const { getLocalConfigs } = require('./helpers.js');

const main = async ({ github, context }) => {
Expand Down Expand Up @@ -53,6 +53,7 @@
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
base: 'stage',
});

for await (const pr of openPRs) {
Expand Down
5 changes: 3 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
/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/ @colloyd @sabyamon @fullcolorcoder @JackySun9
/libs/blocks/quiz-entry/ @colloyd @fullcolorcoder @JackySun9
/libs/blocks/quiz-marquee/ @ryanmparrish
/libs/blocks/quiz-results/ @colloyd @sabyamon @fullcolorcoder @JackySun9 @elaineskpt @echampio-at-adobe
/libs/blocks/quiz-results/ @colloyd @sabyamon @fullcolorcoder @JackySun9
/libs/blocks/quote/ @ryanmparrish
/libs/blocks/recommended-articles/ @meganthecoder @JasonHowellSlavin @Brandon32 @rgclayton
/libs/blocks/review/ @nkthakur48 @chrischrischris @auniverseaway
Expand Down
13 changes: 13 additions & 0 deletions libs/blocks/caas-config/caas-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const defaultOptions = {
primary: 'Primary',
'call-to-action': 'Call To Action',
link: 'Link',
dark: 'Dark',
hidden: 'Hide CTAs',
},
container: {
Expand All @@ -90,6 +91,7 @@ const defaultOptions = {
'83Percent': '83% Container',
'32Margin': '32 Margin Container',
carousel: 'Carousel',
categories: 'Product Categories',
},
ctaActions: {
_blank: 'New Tab',
Expand Down Expand Up @@ -183,6 +185,7 @@ const defaultOptions = {
source: {
bacom: 'Bacom',
doccloud: 'DocCloud',
events: 'Events',
experienceleague: 'Experience League',
hawks: 'Hawks',
magento: 'Magento',
Expand All @@ -191,6 +194,7 @@ const defaultOptions = {
northstar: 'Northstar',
workfront: 'Workfront',
'bacom-blog': 'Bacom Blog',
news: 'Newsroom',
},
tagsUrl: 'https://www.adobe.com/chimera-api/tags',
titleHeadingLevel: {
Expand All @@ -210,6 +214,10 @@ const defaultOptions = {
default: 'Default',
modifiedDate: 'Modified Date',
},
cardHoverEffect: {
default: 'Default',
grow: 'Grow',
},
};

const getTagList = (root) => Object.entries(root).reduce((options, [, tag]) => {
Expand Down Expand Up @@ -362,6 +370,11 @@ const UiPanel = () => html`
<${Select} label="Grid Gap (Gutter)" prop="gutter" options=${defaultOptions.gutter} />
<${Select} label="Theme" prop="theme" options=${defaultOptions.theme} />
<${Select} label="Details Text" prop="detailsTextOption" options=${defaultOptions.detailsTextOption} />
<${Select}
label="Card Hover Effect"
prop="cardHoverEffect"
options=${defaultOptions.cardHoverEffect}
/>
<${Select}
label="Collection Button Style"
prop="collectionBtnStyle"
Expand Down
22 changes: 22 additions & 0 deletions libs/blocks/caas/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,26 @@ const getCustomFilterObj = ({ group, filtersCustomItems, openedOnLoad }, strs =
return filterObj;
};

const getCategoryArray = async (state, country, lang) => {
const { tags } = await getTags(state.tagsUrl);
const categories = Object.values(tags)
.filter((tag) => tag.tagID === 'caas:product-categories')
.map((tag) => tag.tags);

const categoryItems = Object.entries(categories[0])
.map(([key, value]) => ({
group: key,
id: value.tagID,
title: value.title,
icon: value.icon || '',
items: Object.entries(value.tags)
.map((tag) => getFilterObj({ excludeTags: [], filterTag: [tag[1].tagID], icon: '', openedOnLoad: false }, tags, state, country, lang))
.filter((tag) => tag !== null),
}));

return [{ group: 'All Topics', title: 'All Topics', id: '', items: [] }, ...categoryItems];
};

const getFilterArray = async (state, country, lang, strs) => {
if ((!state.showFilters || state.filters.length === 0) && state.filtersCustom?.length === 0) {
return [];
Expand Down Expand Up @@ -595,6 +615,7 @@ export const getConfig = async (originalState, strs = {}) => {
pool: state.sortReservoirPool,
},
ctaAction: state.ctaAction,
cardHoverEffect: state.cardHoverEffect || 'default',
additionalRequestParams: arrayToObj(state.additionalRequestParams),
},
hideCtaIds: hideCtaIds.split(URL_ENCODED_COMMA),
Expand All @@ -606,6 +627,7 @@ export const getConfig = async (originalState, strs = {}) => {
type: state.showFilters ? state.filterLocation : 'left',
showEmptyFilters: state.filtersShowEmpty,
filters: await getFilterArray(state, country, language, strs),
categories: await getCategoryArray(state, country, language),
filterLogic: state.filterLogic,
i18n: {
leftPanel: {
Expand Down
5 changes: 3 additions & 2 deletions libs/blocks/global-navigation/global-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,10 @@ class Gnav {
return 'linux';
};

const unavVersion = new URLSearchParams(window.location.search).get('unavVersion') || '1.1';
await Promise.all([
loadScript(`https://${environment}.adobeccstatic.com/unav/1.1/UniversalNav.js`),
loadStyle(`https://${environment}.adobeccstatic.com/unav/1.1/UniversalNav.css`),
loadScript(`https://${environment}.adobeccstatic.com/unav/${unavVersion}/UniversalNav.js`),
loadStyle(`https://${environment}.adobeccstatic.com/unav/${unavVersion}/UniversalNav.css`),
]);

const getChildren = () => {
Expand Down
5 changes: 5 additions & 0 deletions libs/blocks/icon-block/icon-block.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@
margin-top: var(--spacing-s);
}

.icon-block .foreground .second-column .title-row {
display: flex;
align-items: center;
}

.icon-block.full-width.small .foreground .icon-area,
.icon-block.vertical.small .foreground .icon-area {
margin-bottom: var(--spacing-s);
Expand Down
10 changes: 9 additions & 1 deletion libs/blocks/icon-block/icon-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,15 @@
const textContent = el.querySelectorAll('.text-content > :not(.icon-area)');
const secondColumn = createTag('div', { class: 'second-column' });
textContent.forEach((content) => {
secondColumn.append(content);
let nodeToInsert = content;
const firstIcon = content.querySelector('.icon:first-child');
if (firstIcon) {
const titleRowSpan = createTag('span', { class: 'title-row' });
titleRowSpan.append(firstIcon, content);
nodeToInsert = titleRowSpan;
}

Check warning on line 79 in libs/blocks/icon-block/icon-block.js

View check run for this annotation

Codecov / codecov/patch

libs/blocks/icon-block/icon-block.js#L76-L79

Added lines #L76 - L79 were not covered by tests

secondColumn.append(nodeToInsert);
});
if (secondColumn.children.length === 1) el.classList.add('items-center');
el.querySelector('.foreground .text-content').append(secondColumn);
Expand Down
4 changes: 3 additions & 1 deletion libs/blocks/merch/merch.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export async function getUpgradeAction(
imsSignedInPromise,
[{ productArrangement: { productFamily: offerFamily } = {} }],
) {
if (options.entitlement === false) return undefined;
if (!options.upgrade) return undefined;
const loggedIn = await imsSignedInPromise;
if (!loggedIn) return undefined;
const entitlements = await fetchEntitlements();
Expand Down Expand Up @@ -384,6 +384,7 @@ export async function getCheckoutContext(el, params) {
const checkoutWorkflow = params.get('workflow') ?? settings.checkoutWorkflow;
const checkoutWorkflowStep = params?.get('workflowStep') ?? settings.checkoutWorkflowStep;
const entitlement = params?.get('entitlement');
const upgrade = params?.get('upgrade');
const modal = params?.get('modal');

const extraOptions = {};
Expand All @@ -400,6 +401,7 @@ export async function getCheckoutContext(el, params) {
checkoutWorkflowStep,
checkoutMarketSegment,
entitlement,
upgrade,
modal,
extraOptions: JSON.stringify(extraOptions),
};
Expand Down
3 changes: 3 additions & 0 deletions libs/blocks/merch/upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ function buildUrl(upgradeOffer, upgradable, env) {
url.searchParams.append('surface', 'ADOBE_COM');
url.searchParams.append('ctx', 'if');
url.searchParams.append('ctxRtUrl', encodeURIComponent(window.location.href));
if (upgradeOffer.dataset?.promotionCode) {
url.searchParams.append('promoCode', upgradeOffer.dataset.promotionCode);
}
return url.toString();
}

Expand Down
4 changes: 4 additions & 0 deletions libs/blocks/path-finder/img/link-out.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions libs/blocks/path-finder/path-finder.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
:root {
/* Colors */
--hlx-sk-bg: rgb(48 48 48);
--hlx-sk-color: #FFF;
--hlx-notch-size: 12px;
--hlx-path-height: 49px;
}

body {
background: var(--hlx-sk-bg);
color: var(--hlx-sk-color);
}

.path-finder form {
width: 100%;
display: grid;
grid-template-columns: 1fr 90px 50px;
align-items: center;
gap: 8px;
height: var(--hlx-path-height);
box-sizing: border-box;
}

.path-finder button,
.path-finder input {
color: #FFF;
display: block;
font-family: var(--body-font-family);
box-sizing: border-box;
background: none;
}

.path-finder input {
height: var(--hlx-path-height);
font-size: 18px;
padding: 4px 12px;
border: none;
outline: none !important;
}

.path-finder span {
height: var(--hlx-path-height);
font-size: 18px;
padding: 11px 12px 4px;
display: inline-block;
}

.path-finder form.error {
background: rgb(94 11 11);
}

.path-finder button {
display: inline-block;
font-style: normal;
cursor: pointer;
padding: 5px 14px;
line-height: 18px;
font-size: 15px;
border-radius: 44px 0 0 44px;
outline-offset: 0;
transition: outline-offset .2s;
text-decoration: none;
font-weight: 700;
text-align: center;
background: var(--color-accent);
border: 2px solid var(--color-accent);
outline-color: var(--color-accent);
color: #FFF;
}

.path-finder button.new-tab {
border-radius: 0 44px 44px 0;
margin-right: 6px;
padding: 14px 0;
display: block;
background: var(--color-accent) url('./img/link-out.svg') center 5px / 18px no-repeat;
}

.path-finder button.login {
cursor: pointer;
background: #FF1593;
border-radius: 0;
font-weight: 700;
outline: transparent solid 0;
transition: outline 300ms;
border: none;
height: 36px;
font-family: var(--body-font-family);
padding: 0 18px;
margin-left: 6px;
clip-path: polygon(0% 0%, var(--hlx-notch-size) 0%, calc(100% - var(--hlx-notch-size)) 0%, 100% var(--hlx-notch-size), 100% calc(100% - var(--hlx-notch-size)), 100% 100%, 0% 100%, 0% 100%);
}
Loading
Loading