-
Notifications
You must be signed in to change notification settings - Fork 174
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
base: stage
Are you sure you want to change the base?
Conversation
…patibility using "checkmark" class. Horizontal line added.
|
libs/blocks/merch-card/merch-card.js
Outdated
@@ -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'; |
There was a problem hiding this comment.
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
libs/blocks/merch-card/merch-card.js
Outdated
|
||
if (isCheckmark) { | ||
const firstRow = footerRows[0]; | ||
const bgStyle = firstRow.querySelector('div > div:first-child').innerHTML; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use "#E8E8E8" as default
libs/blocks/merch-card/merch-card.js
Outdated
if (!footerRows) return; | ||
|
||
const footerRowsSlot = createTag('div', { slot: 'footer-rows' }); | ||
const isCheckmark = merchCard.classList.contains('checkmark'); |
There was a problem hiding this comment.
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')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
There was a problem hiding this 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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Added @yesil |
Code scanning is complaining post merge and "npm run build" in mas component |
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. |
@afmicka conflicts resolved, could you please verify? |
@mirafedas @rohitsahu
cc: @Roycethan |
@mirafedas this change is affecting CTAs on consumers page |
@afmicka fixed, could you please check again? |
@mirafedas https://mwpw-158015--milo--rohitsahu.hlx.page/drafts/rosahu/rosahu/min-compare-redesign?martech=off
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 ) -
5)Can you plz cross check the gap between the components comparing figma: |
@Roycethan thanks for verification, |
@mirafedas Thanks for fixing issues reported.
|
@Roycethan thank you, fixed 👍 |
Thanks @mirafedas Fixed |
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: