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

[MWPW-158015] [Mini Compare Merch Card] Redesign mini compare card for testing #3147

Open
wants to merge 35 commits into
base: stage
Choose a base branch
from

Conversation

rohitsahu
Copy link
Contributor

@rohitsahu rohitsahu commented Nov 6, 2024

Redesign mini-compare chart. Added checkmarks for icons. Backward compatibility using "checkmark" class. Horizontal line added.
For mobile, implemented cheveron up and down functionality for checkmark copy list

Testing notes:

Resolves: MWPW-158015

Test URLs:

@rohitsahu rohitsahu requested a review from a team as a code owner November 6, 2024 10:35
Copy link
Contributor

aem-code-sync bot commented Nov 6, 2024

@@ -2,6 +2,7 @@ import { decorateButtons, decorateBlockHrs } from '../../utils/decorate.js';
import { getConfig, createTag, loadStyle } from '../../utils/utils.js';
import { getMetadata } from '../section-metadata/section-metadata.js';
import { processTrackingLabels } from '../../martech/attributes.js';
import { chevronDownSVG, chevronUpSVG } from './img/chevron.js';
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be on-demand for performance reasons

review comment

if (isCheckmark) {
const firstRow = footerRows[0];
const bgStyle = firstRow.querySelector('div > div:first-child').innerHTML;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use "#E8E8E8" as default

if (!footerRows) return;

const footerRowsSlot = createTag('div', { slot: 'footer-rows' });
const isCheckmark = merchCard.classList.contains('checkmark');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

replace checkmark with a more business/functional term

@@ -46,6 +46,9 @@ export class MiniCompareChart extends VariantLayout {
'promo-text',
'callout-content',
];
if (this.card.classList.contains('checkmark')) {
Copy link
Member

Choose a reason for hiding this comment

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

Looking for a class added in Milo inside the web component code might seem a bit odd. I would suggest to move this code to Milo or move the footer row code to web component class. Ideally they should be decoupled.

thoughts @yesil, @npeltier @3ch023 ?

Copy link
Contributor Author

@rohitsahu rohitsahu Nov 8, 2024

Choose a reason for hiding this comment

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

I can go with adjusting the footer rows height in milo if others agree. Only drawback I see is height alignment logic spread across 2 places.
How about changing the footer rows slot name for new mini compare design. Then I just need to add the new slot name here @Axelcureno ?

Copy link
Member

Choose a reason for hiding this comment

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

On a second thought, I think it's okay to leave it as is. Anyways this card will only be used in Milo.

Copy link
Contributor

@yesil yesil left a comment

Choose a reason for hiding this comment

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

@rohitsahu could you please add unit tests for both the custom element and block.

@@ -68,6 +68,14 @@ export const CSS = `
height: var(--consonant-merch-card-mini-compare-chart-icon-size);
}

merch-card[variant="mini-compare-chart"] .footer-rows-title {
font-color: #2C2C2C;
font-weight: 700;
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have merch variables for these values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could not find variables for these 2. For others using variables

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is: --merch-color-grey-80

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@rohitsahu
Copy link
Contributor Author

@rohitsahu could you please add unit tests for both the custom element and block.

Added @yesil

@rohitsahu
Copy link
Contributor Author

rohitsahu commented Nov 27, 2024

Code scanning is complaining post merge and "npm run build" in mas component

Copy link
Contributor

github-actions bot commented Dec 5, 2024

This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label.

@github-actions github-actions bot added the Stale label Dec 5, 2024
@3ch023 3ch023 removed the Stale label Dec 11, 2024
@mirafedas
Copy link
Contributor

@afmicka conflicts resolved, could you please verify?

@afmicka
Copy link
Contributor

afmicka commented Dec 11, 2024

@mirafedas @rohitsahu
Cards with Secure transaction do not match the design
https://mwpw-158015--milo--rohitsahu.hlx.page/drafts/rosahu/rosahu/min-compare-redesign?martech=off

  1. both desktop and mobile:
Screenshot 2024-12-11 at 14 09 54 Screenshot 2024-12-11 at 14 30 57
  1. Extra white space at the bottom on desktop i assume is also not by the design:
Screenshot 2024-12-11 at 14 10 48

cc: @Roycethan

@afmicka
Copy link
Contributor

afmicka commented Dec 12, 2024

@mirafedas this change is affecting CTAs on consumers page
https://main--cc--adobecom.hlx.live/pl/creativecloud?milolibs=mwpw-158015--milo--rohitsahu
Screenshot 2024-12-12 at 12 32 22
Screenshot 2024-12-12 at 12 32 33

on mobile as well:
Screenshot 2024-12-12 at 12 41 50
Screenshot 2024-12-12 at 12 42 10

@mirafedas
Copy link
Contributor

@afmicka fixed, could you please check again?

@Roycethan
Copy link

Roycethan commented Dec 14, 2024

@mirafedas
Here are few issues/observations:

https://mwpw-158015--milo--rohitsahu.hlx.page/drafts/rosahu/rosahu/min-compare-redesign?martech=off

  1. Tablet should not have chevron and dropdown per Figma - it should be same as desktop:
image Expect: image
  1. On mobile: Secure transaction should be vertically aligned with other elements, its slightly off or outside:
image Expect: image

3)Not sure if this case will happen or not but if happens ( like one card with CTA long string and other card with short ) -
Then the secure transaction label is not horizontally aligned between cards: Mentioning here but if theres no good fix then we will keep as in - hopefully this won't happen
image

  1. Yellow label is slightly above and not in algnment with product title
image Expect: image

5)Can you plz cross check the gap between the components comparing figma:
specially its very narrow here:
gap between mnemonics and product title
gap between description and pricing
image

@rahulgupta999 rahulgupta999 removed their request for review December 14, 2024 05:23
@mirafedas
Copy link
Contributor

@Roycethan thanks for verification,
1, 2, 4, and 5 corrected, as for the #4 - there is no good fix for this, because the secure transaction label should always be located close to the buttons.

@Roycethan
Copy link

Roycethan commented Dec 20, 2024

MWPW-158015

@mirafedas Thanks for fixing issues reported.

  1. I see a regression where the price is bit right shifted and not vertically aligned with other elements
    https://mwpw-158015--milo--rohitsahu.hlx.page/drafts/rosahu/rosahu/min-compare-redesign?martech=off
image
  1. Can you plz pull the latest from stage -
    Since theres a PR Revert "MWPW-163754 Color difference is seen in the milo pages" #3365 in [Release] Stage to Main #3355 which reverted in stage which was causing the below issue which exist in your branch:
    https://main--homepage--adobecom.hlx.live/homepage/index-loggedout?milolibs=mwpw-158015--milo--rohitsahu
image

@mirafedas
Copy link
Contributor

@Roycethan thank you, fixed 👍

@Roycethan
Copy link

@Roycethan thank you, fixed 👍

Thanks @mirafedas Fixed

@Roycethan Roycethan added verified PR has been E2E tested by a reviewer Ready for Stage and removed needs-verification PR requires E2E testing by a reviewer labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commerce merch card Ready for Stage run-nala Run Nala Test Automation against PR verified PR has been E2E tested by a reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants