Skip to content

Commit

Permalink
MWPW-164638 and 164805 MMM refine values for save and add manifest co…
Browse files Browse the repository at this point in the history
…unt (#3416)

* account for no stageDomainsMap

* add unit test

* less redundant

* Update libs/features/personalization/preview.js

add nala folder to exclusions

* MWPW-164805 [MMM] Add manifest count to page list (#3430)

* ServiceNow CMR integration (#3392)

* added servicenow CMR template

added servicenow CMR template for github actions

* updated template to remove skms

updated template to remove skms and swap it with ServiceNow

* started adding servicenow api calls

started adding servicenow api calls

* added the servicenow cmr calls.

added the servicenow cmr calls.

* test branch added

test branch added

* removed skms.yml where we are using servicenow

removed skms.yml where we are using servicenow

* updated function calls and parameters

updated function calls and parameters

* test update

test update

* Updated calls to output to file and check output

Updated calls to output to file and check output for successful curl calls.  Fixes jq parsing command.

* testing output

testing output

* fixed github env variable declarations

fixed github env variable declarations for token, cmr_id, transaction_id, release_title

* added output to console for response from curl

added output to console for response from curl

* fixed file existence and size check

fixed file existence and size check

* small update

small update

* fixed curl statements and timestamps

fixed curl statements and timestamps

* another small update

another small update

* testing

testing

* testing theory

testing theory

* testing arguments

testing arguments

* second attempt

second attempt

* updated branch to remove caching

updated branch to remove caching from GitHub Actions, hopefully.

* reverted changes of new branch

reverted changes of new branch

* another small fix

another small fix

* testing a thought

testing a thought

* moved release summary to last param

moved release summary to last param where it stops other parameters from being read.

* testing out semantics for env variables

testing out semantics for env variables

* updated shell commands to fix errors

updated shell commands to fix errors

* small github env fixes

small github env fixes

* updated curl statement

updated curl statement

* updated calls and timespans

updated calls and timespans

* added printouts for debugging

added printouts for debugging

* small fixes

small fixes

* updated calls per guidance from winter solstice

updated calls per guidance from winter solstice team

* added new python script and removed shell script

added new python scripts and removed shell script

* added sanitization method

added sanitization method

* updated servicenow integration to use python

updated servicenow integration to use python

* updated variables and added headers

updated variables and added headers

* fixed cmr_id parsing and cmr closing

fixed cmr_id parsing and cmr closing

* added small test change for PR

added small test change for PR

* updated execution path

* fixing environment variable access

fixing environment variable access

* fixed branches in yaml

fixed branches in yaml

* updated approvers, removed executor

updated approvers, removed executor so that the default "Change Management API Integration" user is used instead.

* changed stage variables, urls to prod

changed stage variables, urls to prod

* Add unc activity feed support for standalone gnav (#3386)

* Ading uncConfig for unav

* Ading uncConfig for unav

* Lint fix

* MWPW-163479: MAS - Switch to Spectrum CSS from SWC (#3289)

* MWPW-162385 add wcsApiKey attribute

* MWPW-161355: Update MAS documentation (#3135)

* MWPW-159374: Update hydrate logic

to support all cta styles
organise code and code coverage

Update tests

* add workaround for ccd-suggested cards

* remove source maps

* improve code coverage

* merge MWPW-159374

* MWPW-161355: Update MAS documentation

* Example with contextual menu
* Checkout click event with correct event target
 when the CTA contains a text wrapped by a span

* cleanup all attributes during card hydration

* remove deps/mas/mas.js

* update test

* update doc

* allow list libs/features/mas/mas/dist/mas.js

* change order in ignore

* trying with wildcard

* allow list dist

* update hlxignore rules

* update hlxignore rules

* MWPW-161176: restructure ccd gallery (#3169)

restructure ccd gallery

* fix mas path

* fix undefined error in merch-icon

* fix regression in ctas size

* update doc

* fix css with checkout-link

* fix random rtl issue

* revert removal of mas.js from deps

* update ccd gallery

---------

Co-authored-by: Mariia Lukianets <lukianet@adobe.com>

* MWPW-161845: basic analytics on mas cards (#3206)

* MWPW-161845: add analytics

* fix review changes

* add build files

* MWPW-159191: MAS Freyja support (#3209)

* initial freyja commit

* increase codecov

* trival

* add qa support to ccd page

* improve page performance

* update ccd.html

* MWPW-161804: Merch card style auditing (#3216)

Refactor merch-card styles to improve structure and specificity

* Added space after price recurrence label for display-per-unit prices (#3196)

* Added space after price recurrence label for display-per-unit prices

* more specific selector

* built

* fix cr

* built

* adding example

* MWPW-162933: merge mas modules (#3248)

* MWPW-162933: merge mas modules

+ consonant-templates module from tacocat.js
into a single module

* MWPW-160755 - add tests for CCD cards (#3256)

* MWPW-160755 - add tests for CCD cards

* refactor and prepare dark mode checks

* add tests for slice cards

* activate dark for suggested and eslint fixes

* add check for cta variant

* fix multi mnemonic check

* fix lint

* add analytics check

* remove comment

* MWPW-163041: analytics fix (#3257)

* MWPW-163041: fix analytics & add docs

* add tests for analytics

* add analytics docu

* fix test

* Fix overriding of border style on merch cards (#3278)

* Fix overriding of border style on merch cards

* width change

* built

---------

Co-authored-by: Mariia Lukianets <mariia.lukianets@gmail.com>

* Bump timeout from 2 to 10 sec (#3282)

* bump to 10 seconds

* new change

* MWPW-163479: Switch to Spectrum CSS from SWC

CCD app already provides Spectrum CCS styles.

* update doc style

* update doc style

* update doc style

* update doc style

* update doc style

* update doc style

* Update styles

* update docs

* Keep SWC logic as an option

* MWPW-161645: lana logging for CCD (#3271)

* MWPW-161645: lana logging for CCD

with <mas-commerce-service data-lana-tags="consumer=ccd" ...>

lana will be enabled.

TODO:

Update docs

* Update tests

* fix review comments

* add host env attribute, fix lana override

* fix docs

* fix unit tests

* start loggin missing osi's

* fix message

* fix message

* Update libs/features/mas/src/lana.js

Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com>

* PR review changes

* avoid duplicate logging, log wcs url, limit page length in log

* fix formatString error

* fix render

* add tests

* fix loggin

* revert ccd comments

* fix milo tags

---------

Co-authored-by: Mariia Lukianets <mariia.lukianets@gmail.com>
Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com>

* fix gaps with Spectrum CSS support

* update version

* fix gaps reported by ccd teamm

* address gaps

* address gaps

* address gaps

* address gaps

* address gaps

* fix for MWPW-163718

addressed design gaps.

* addressed design gaps.

* bump the version

* add build artifacts

* Update colors based on CCD app

* Update colors based on CCD app

* build without source maps

* update Nala tests

* fix lint

* reset box-sizing for merch-card elements

* Force box-sizing on merch-card

* update styles: box-sizing

* fix ccd gallery

* update version

* limit ccd price style to their variants

* limit ccd price style to suggest variant

* preserve white spaces in prices section

* fix spacing in price

* Update version

* Update doc

* update cards

* update gallery styles

* make the gallery responsive

* align slice card ctas

* cards resize responsively

* fix 1x of gap issue

* fix description text alignement

* fix gaps in minimal widths

* fix the gallery layout

* Fix strikethrough price color in promos

* Update nala tests

* MWPW-164177: clean up card style on fragment

* Added a new section to ccd gallery

* update mas version

* fix missing default spectrum css button style

---------

Co-authored-by: Nicolas Peltier <npeltier@adobe.com>
Co-authored-by: Mariia Lukianets <lukianet@adobe.com>
Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com>
Co-authored-by: Angelo Statescu <angelostatescu.adobe@gmail.com>
Co-authored-by: Milica Micic <cod23684@adobe.com>
Co-authored-by: Mariia Lukianets <mariia.lukianets@gmail.com>

* MWPW-150560 make search literals usable as fragments (#3320)

* MWPW-150560 make search literals usable as fragments

* Revert "MWPW-140452 - Icon authoring in milo using the federal repo a… (#3357)

Revert "MWPW-140452 - Icon authoring in milo using the federal repo and individual SVG assets (#3259)"

This reverts commit 81a5770.

* review comment

* Update libs/blocks/merch-card-collection/merch-card-collection.js

Co-authored-by: Mariia Lukianets <mariia.lukianets@gmail.com>

* fix unit test

---------

Co-authored-by: milo-pr-merge[bot] <169241390+milo-pr-merge[bot]@users.noreply.github.com>
Co-authored-by: Okan Sahin <39759830+mokimo@users.noreply.github.com>
Co-authored-by: Mariia Lukianets <mariia.lukianets@gmail.com>

* MWPW-162046 Tabs - Stacked Mobile (#3351)

* MWPW-162046 Tabs - Stacked Mobile

* figma review adjustments

* remove unused variable

* MWPW-164084 [Catalog] Page position not preserved after closing the modal (#3375)

* MWPW-164084 [Catalog] Page position not preserved after closing the modal

* Trigger Build

* MWPW-164084 [Catalog] Page position not preserved after closing the modal

* MWPW-164084 [Catalog] Page position not preserved after closing the modal

---------

Co-authored-by: Bozo Jovicic <bozo@hitthecode.com>

* [MWPW-161858] Remove sticky section when footer is visible (#3402)

remove sticky section when footer is visible

* MWPW-159299 Add chart role and dynamic aria labels (#3404)

* MWPW-159299 Add chart role

* Update echarts library and dynamically set aria text

* Update aria settings

* MWPW-156410: add daa-lh/ll values for gnav promo (#3413)

* MWPW-162760 [MEP] Issues with inline fragments (#3415)

initial push

* created number of activities for pages

* updated tests

* updated activities number positioning

* Update libs/blocks/mmm/mmm.js

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update libs/blocks/mmm/mmm.js

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update libs/blocks/mmm/mmm.js

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update libs/blocks/mmm/mmm.js

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update libs/blocks/mmm/mmm.js

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update libs/blocks/mmm/mmm.js

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* css change

---------

Co-authored-by: Aaron Mauchley <mauchley@adobe.com>
Co-authored-by: Bandana Laishram <bandanalaishram@gmail.com>
Co-authored-by: Ilyas Türkben <tuerkben@adobe.com>
Co-authored-by: Nicolas Peltier <npeltier@adobe.com>
Co-authored-by: Mariia Lukianets <lukianet@adobe.com>
Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com>
Co-authored-by: Angelo Statescu <angelostatescu.adobe@gmail.com>
Co-authored-by: Milica Micic <cod23684@adobe.com>
Co-authored-by: Mariia Lukianets <mariia.lukianets@gmail.com>
Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com>
Co-authored-by: milo-pr-merge[bot] <169241390+milo-pr-merge[bot]@users.noreply.github.com>
Co-authored-by: Okan Sahin <39759830+mokimo@users.noreply.github.com>
Co-authored-by: Megan Thomas <methomas@adobe.com>
Co-authored-by: Bozo Jovicic <37440641+bozojovicic@users.noreply.github.com>
Co-authored-by: Bozo Jovicic <bozo@hitthecode.com>
Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com>
Co-authored-by: Brandon Marshall <bmarshal@adobe.com>
Co-authored-by: nishantka <126539566+nishantka@users.noreply.github.com>
Co-authored-by: Vivian A Goodrich <101133187+vgoodric@users.noreply.github.com>
Co-authored-by: Denys Fedotov <dfedotov@Denyss-MacBook-Pro.local>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: Denys Fedotov <denlight@gmail.com>
Co-authored-by: Aaron Mauchley <mauchley@adobe.com>
Co-authored-by: Bandana Laishram <bandanalaishram@gmail.com>
Co-authored-by: Ilyas Türkben <tuerkben@adobe.com>
Co-authored-by: Nicolas Peltier <npeltier@adobe.com>
Co-authored-by: Mariia Lukianets <lukianet@adobe.com>
Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com>
Co-authored-by: Angelo Statescu <angelostatescu.adobe@gmail.com>
Co-authored-by: Milica Micic <cod23684@adobe.com>
Co-authored-by: Mariia Lukianets <mariia.lukianets@gmail.com>
Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com>
Co-authored-by: milo-pr-merge[bot] <169241390+milo-pr-merge[bot]@users.noreply.github.com>
Co-authored-by: Okan Sahin <39759830+mokimo@users.noreply.github.com>
Co-authored-by: Megan Thomas <methomas@adobe.com>
Co-authored-by: Bozo Jovicic <37440641+bozojovicic@users.noreply.github.com>
Co-authored-by: Bozo Jovicic <bozo@hitthecode.com>
Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com>
Co-authored-by: Brandon Marshall <bmarshal@adobe.com>
Co-authored-by: nishantka <126539566+nishantka@users.noreply.github.com>
Co-authored-by: Denys Fedotov <dfedotov@Denyss-MacBook-Pro.local>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
22 people authored Jan 9, 2025
1 parent 56b944a commit 06c149b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 8 deletions.
7 changes: 7 additions & 0 deletions libs/blocks/mmm/mmm.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
@import '../../styles/inline.css';

.mmm-page_item-subtext {
position: absolute;
font-size: 12px;
bottom: 3px;
left: 16px;
color: #505050;
}
.mmm-container {
padding: var(--spacing-m) 0;
}
Expand Down
8 changes: 7 additions & 1 deletion libs/blocks/mmm/mmm.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ async function toggleDrawer(target, dd) {
}
}
function createButtonDetailsPair(mmmEl, page) {
const { url, pageId } = page;
const { url, pageId, numOfActivities } = page;
const triggerId = `mmm-trigger-${pageId}`;
const panelId = `mmm-content-${pageId}`;
const icon = createTag('span', { class: 'mmm-icon' });
const hTag = createTag('h5', false, url);
const activitiesNum = createTag(
'span',
{ class: 'mmm-page_item-subtext' },
`${numOfActivities} Manifest(s) found`,
);
const button = createTag('button', {
type: 'button',
id: triggerId,
Expand All @@ -39,6 +44,7 @@ function createButtonDetailsPair(mmmEl, page) {
'aria-controls': panelId,
}, hTag);
button.append(icon);
button.append(activitiesNum);

const dtHtml = hTag ? createTag(hTag.tagName, { class: 'mmm-heading' }, button) : button;
const dt = createTag('dt', false, dtHtml);
Expand Down
15 changes: 9 additions & 6 deletions libs/features/personalization/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,18 @@ function addPillEventListeners(div) {
export function parsePageAndUrl(config, windowLocation, prefix) {
const { stageDomainsMap, env } = config;
const { pathname, origin } = windowLocation;
if (env?.name === 'prod' || !stageDomainsMap) {
return { page: pathname.replace(`/${prefix}/`, '/'), url: `${origin}${pathname}` };
}
let path = pathname;
let domain = origin;
const allowedHosts = [
'business.stage.adobe.com',
'www.stage.adobe.com',
'milo.stage.adobe.com',
];
if (env?.name === 'prod' || !stageDomainsMap
|| allowedHosts.includes(origin.replace('https://', ''))) {
const domain = origin.replace('stage.adobe.com', 'adobe.com');
return { page: pathname.replace(`/${prefix}/`, '/'), url: `${domain}${pathname}` };
}
let path = pathname;
let domain = origin;
const domainCheck = Object.keys(stageDomainsMap)
.find((key) => {
try {
Expand Down Expand Up @@ -353,7 +355,8 @@ function addHighlightData(manifests) {
}
export async function saveToMmm() {
const data = parseMepConfig();
if (data.page.url.includes('/drafts/')) return false;
const excludedStrings = ['/drafts/', '.stage.', '.page/', '.live/', '/fragments/', '/nala/'];
if (excludedStrings.some((str) => data.page.url.includes(str))) return false;
data.activities = data.activities.filter((activity) => {
const { url, source } = activity;
activity.source = source.filter((item) => item !== 'mep param');
Expand Down
2 changes: 1 addition & 1 deletion test/blocks/mmm/mmm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('MMM', () => {
expect(mmmDl).to.exist;
const mmmDt = mmmDl.querySelectorAll('dt');
expect(mmmDt.length).to.equal(5);
expect(mmmDt[0].textContent).to.equal('https://www.adobe.com/');
expect(mmmDt[0].textContent).to.equal('https://www.adobe.com/1 Manifest(s) found');
const mmmDd = mmmDl.querySelectorAll('dd');
expect(mmmDd.length).to.equal(5);
const loading = mmmDd[0].querySelector('.loading');
Expand Down
5 changes: 5 additions & 0 deletions test/blocks/mmm/mocks/get-pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,39 @@
"pageId": 4,
"page": "/",
"locale": "en-US",
"numOfActivities": 1,
"url": "https://www.adobe.com/"
},
{
"geo": "",
"pageId": 7,
"page": "/acrobat/pricing.html",
"locale": "en-US",
"numOfActivities": 1,
"url": "https://www.adobe.com/acrobat/pricing.html"
},
{
"geo": "",
"pageId": 3,
"page": "/creativecloud.html",
"locale": "en-US",
"numOfActivities": 1,
"url": "https://www.adobe.com/creativecloud.html"
},
{
"geo": "ca_fr",
"pageId": 16,
"page": "/",
"locale": "fr-CA",
"numOfActivities": 1,
"url": "https://www.adobe.com/ca_fr/"
},
{
"geo": "de",
"pageId": 61,
"page": "/",
"locale": "de-DE",
"numOfActivities": 1,
"url": "https://www.adobe.com/de/"
}
]
7 changes: 7 additions & 0 deletions test/features/personalization/preview.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ describe('preview feature', () => {
expect(url).to.equal('https://www.adobe.com/fr/products/photoshop.html');
expect(page).to.equal('/products/photoshop.html');
});
it('parse url and page for no stage map', () => {
config.env.name = 'stage';
delete config.stageDomainsMap;
const { url, page } = parsePageAndUrl(config, new URL('https://www.stage.adobe.com/events/2024-10-31.html'), '');
expect(url).to.equal('https://www.adobe.com/events/2024-10-31.html');
expect(page).to.equal('/events/2024-10-31.html');
});
it('opens manifest', () => {
document.querySelector('a.mep-edit-manifest').click();
});
Expand Down

0 comments on commit 06c149b

Please sign in to comment.