MWPW-194632: Add hub-hero-modal c2 block#5907
Conversation
|
@sirivuri What do I need to do to see the modal on your test page? |
@rgclayton you not able to open this ? https://main--da-dc--adobecom.aem.page/drafts/sirivuri/mwpw-194632-hub-hero-modal?milolibs=MWPW-194632--milo--sirivuri#hub-hero-modal |
|
I think this needs some clean up. We don't want this in the regular (c1) folder, which this has this update added in both c1 and c2 blocks. |
overmyheadandbody
left a comment
There was a problem hiding this comment.
Some initial notes on this:
- let's keep the code in the MEP folder for now,
- S2A vars shouldn't need fallback variables, those will cause maintenance issues in the long run, the tokens alone should handle everything
- the code essentially switches all modal UI, has this been vetted with Design? Georouting and other functionality will be impacted, we need to ensure this is desired. I also see some RTL styles that have been removed, has that been tested with this update?
- styles.css can't live in the MEP folder, it needs to be in
libs/c2/styles/styles.css - we prefer a mobile-first approach.
max-widthin media queries is an indicator that styles need to be flipped, so we have the mobile ones as the default and the higher viewport ones inmin-width - we now use a particular way to author and initialize blocks. Some context is available in #5827. We allow per-viewport content variation, which
decorateViewportContenthandles automatically. It also handles text overrides
I have more particular comments on the code, but let's clean the PR a bit for now and then we can go into details.
|
Addressing review feedback — here's the status on each item: (a) MEP folder — Done. Block code is in (b) S2A fallbacks — Done. Removed 23 unnecessary fallbacks where tokens are defined in (c) Modal scope — Kyle confirmed the close button spec is universal for all C2 modals, not just tour. Ryan is in alignment. (Slack thread: C09C8DLTNJZ/p1778684416598359) (d) styles.css in c2 — Done per Jan Ivan's guidance. (e) Mobile-first — Done. Flipped from (f) decorateViewportContent — Investigated. The tour block has a multi-section structure (N numbered sections with Z-pattern layout, CTA extraction, transition elements, separate header row) that doesn't fit the |
New C2 block — scrollable modal with numbered content sections, Z-pattern layout (desktop), sticky promo CTA, and per-viewport responsive behavior. Mobile-first CSS. Tour block (libs/mep/ace1205/tour/): - Numbered sections (1/N) with text + artwork - Z-pattern alignment at desktop (right/left/center) - Sticky CTA bar with frosted backdrop (blur 50px desktop, 10px mobile) - Icon extraction from DA content into promo-cta pill - daa-lh analytics on block, daa-ll on CTA link - title-6 responsive typography, body-sm (14px) per design Promo CTA shared component (libs/c2/styles/styles.css): - Reusable pill button: icon + label + arrow indicator - Variant classes: .arrow-down (rotate 90°), .full-width - S2_Icon_UIArrow_N SVG arrow (libs/c2/assets/img/) - S2A design tokens for colors, spacing, typography Modal close button (libs/mep/ace1205/modal/): - 32×32 visible size, 8px border-radius, rgb(0 0 0 / 5%) bg - Consistent positioning across viewports (right: 16px, top: 20px) - Universal for all C2 modals per Design (Kyle + Ryan alignment) Figma refs: 12438:6048, 9659:9817, 10302:11258, 11596:18519 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MEP useBlockCode does not redirect for blocks loaded inside fragments/modals. The block must exist at libs/c2/blocks/tour/ for milolibs= preview to work. ace1205 copies remain as source of truth. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Note on duplicate block files (libs/c2/blocks/tour/ + libs/mep/ace1205/tour/): The tour block loads inside a modal fragment. MEP The c2 copies exist solely to make Before merge: Once we confirm the MEP fragment behavior with @jviloria, we'll determine which copies to keep and remove the duplicates. |
Removed libs/c2/blocks/tour/ and reverted libs/c2/blocks/modal/ modal.css to wave1. Block code lives only in libs/mep/ace1205/ per wave2 guidance. PR now has 6 files — no c2 block duplicates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MEP useBlockCode does not redirect for blocks in fragments. c2 copy needed for ?milolibs= preview. Will remove before merge. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update CSS variables and comment to reflect 48×48 button size (was incorrectly set to 32px). The button dimensions were already corrected in previous commit, this ensures CSS variables are consistent. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Create modal.js that re-exports C2 modal functionality. This allows MEP's useBlockCode action to load the ACE1205 modal.css (with 48px close button) instead of falling back to production C2 modal CSS. Without this JS file, MEP cannot load the Wave 2 modal styles, causing the page to use production C2 modal with incorrect button size. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change re-export syntax to avoid no-restricted-exports and import/no-unresolved lint errors. Still imports C2 modal functionality, just with compliant syntax. Fixes build failure blocking modal.js deployment to preview CDN. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Correct relative path from ../../../c2 (was ../../c2). From /libs/mep/ace1205/modal/ need to go up 3 levels to reach /libs/c2/. Fixes import/no-unresolved lint error blocking build. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Issue: ACE1205 modal.js was re-exporting C2 modal.js, which loaded C2 modal.css (overriding ACE1205 modal.css). Fix: Copy full modal.js + modal.merch.js from C2 to ACE1205, changing the loadStyle path from /c2/blocks/modal/modal.css to /mep/ace1205/modal/modal.css. This ensures only ACE1205 modal.css loads (with 48px close button), not C2 modal.css (32px button). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Issue: C2 global-footer loads C2 modal.css whenever there's a hash in URL (line 489: loadStyle for region picker modal). This overrides ACE1205 modal.css since both have equal CSS specificity. Fix: Add !important to ACE1205 close button styles to ensure 48px button displays even when C2 modal.css loads after. Root cause: global-footer.js:489 loads C2 modal.css on any hash, including #tour. ACE1205 doesn't have its own global-footer, so C2's version runs. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
**Eyebrow text ("Sales"):**
- Changed to body-sm typography (14px, regular weight)
- Color: content-eyebrow (rgba(0,0,0,0.64))
- Font family: body-font-family (Adobe Clean Regular)
- Separated styling from heading (was incorrectly using title-6)
- Figma ref: node 10311:290761
**Close button:**
- Background: #f2f2f2 (was transparent)
- Border: 1px solid rgba(0,0,0,0.1) (was none)
- Border-radius: 6px (was 8px)
- Figma ref: node 11757:17990
Both changes align implementation with Figma design specs.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
**Issue 1: Section 3 text not centered on mobile** - Counter "( 3/3 )" and text were left-aligned - Added text-align: center to .tour-section:last-of-type .tour-content - Matches Figma mobile design (node 9506:107159) **Issue 2: Free trial button cramped on mobile** - Reduced .tour-cta padding from 40px to 16px for mobile - Desktop retains 24px padding (var(--s2a-spacing-lg)) - Better horizontal spacing on narrow viewports QA issues reported by Biljana Cvijanovic. Screenshot: Screenshot 2026-05-21 at 00.09.23.png Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Per Narcis code review feedback: - Changed padding-bottom to padding-block: 0 24px for section:even - Changed padding-top to padding-block: 124px 0 for section:odd Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
sirivuri
left a comment
There was a problem hiding this comment.
✅ Fixed in commit aa99615 - Changed padding-bottom: 24px; to padding-block: 0 24px; to use the standard shorthand property.
Apologies for the incorrect previous response where I said "only bottom padding needed" — you're absolutely right that we should still use padding-block: 0 24px; rather than the single-direction property.
|
|
||
|
|
||
| /* Promo CTA — Figma: lOFnBFhsYyFWPbSdiPa9us 12438:6158 */ | ||
| .promo-cta { |
There was a problem hiding this comment.
@sirivuri
As discussed, since the CTA (.promo-cta) styling will now be part of the shared styles, I wanted to discuss a few design-related points:
-
The current hover state only changes the background color. However, if you refer to the offer-hub prototype, both the box background color and the arrow color change on hover. I think we should maintain the same interaction pattern everywhere this CTA is used to ensure a consistent experience.
-
I still noticed a few styling differences that may need adjustment for the CTA:
- The current CTA height is 58px, whereas the design specifies 56px.
- The arrow container size is currently 34px, but according to the design it should be 32px.
- There are also hide/show animations associated with this CTA. I can handle those changes from my side since they are specific to my use case.
To better understand the expected behavior and styling, please refer to the offer-hub Figma and prototype links below:
Figma:
https://www.figma.com/design/q87sUm2fvForRQzxGum5wE/Offer-%E2%80%94-A.com?node-id=13572-2777&t=kCV1394MGWsesMk6-0
Prototype:
https://acom-offer.vercel.app/
I just want to ensure that the CTA maintains a consistent design and interaction experience across all implementations.
Please let me know if you had like to discuss any of these points further.
There was a problem hiding this comment.
Also I would separate arrow cta and not style it as ::after , from what I understood X button should have the same styles as arrow button, also I am working on a play/pause button for side-2-side videos that looks the same just with different icon, so maybe we can consolidate all these in styles.css, applying one class will style the button and on block level it can be modified and different icons can be added.
Address all QE feedback for tour block modal: - Fix modal width to 596px across all viewports - Fix close button size (48×48px) and positioning (16px from edges) - Add RTL support for close button positioning - Fix CTA button centering and remove focus outlines - Fix promo-cta hover/active states to match Figma Component Playground - Fix section 1 spacing using S2A layout tokens (124px) - Fix section 1 text width (287px) and image width (286-387px) - Restore Z-pattern layout with section 1 positioned right, content left-aligned - Fix title vertical alignment with close button on mobile and desktop Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Restore equal padding-block on tour-title so text is vertically centered. Title container starts at 16px from top (aligned with close button): - Mobile: 13px tour padding + 3px grab handle = 16px - Desktop: 16px tour padding (no grab handle) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Set title container to fixed 48px height matching close button. Use flexbox centering instead of padding to vertically center text content. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adjust mobile padding-top from 16px to 13px to account for 3px grab handle. Combined (13px + 3px = 16px) aligns title container with close button at 16px from top. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
@Deva309 Thanks for flagging the dimensions. After reviewing the Figma spec with design: Height (58px vs 56px): Our current implementation uses S2A design tokens for all spacing/typography:
To achieve exactly 56px would require hardcoding Arrow container (32×32): ✅ Already matches spec For the hover behavior (background + arrow color change), should we align with the offer-hub interaction pattern? If so, could you share the specific hover state specs or point us to the relevant Figma frame? cc: @rgclayton @kyletroutman for design system alignment |
- Verified all states against Figma (lOFnBFhsYyFWPbSdiPa9us): - Default: background-knockout, transparent-white-16 arrow box - Hover: arrow box lightens to transparent-white-24 only - Active: arrow box inverts (white bg, black arrow) - Added variant support: arrow-down, arrow-left, arrow-up, size-small, full-width, no-icon - Tour block now supports block-level variants (e.g., tour (arrow-down)) - Removed focus/disabled states not present in Figma design - Fixed hover behavior: main button background stays constant across all states - Ensures consistent promo-cta experience for reuse across blocks Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove button-lg, button-md, button-sm when converting to promo-cta - These classes were added by decorateBlockText via C2_TEXT_CONFIG - button-lg adds min-height: 40px and padding: 0 24px, conflicting with promo-cta - Promo-cta should use padding: 12px (var(--s2a-spacing-sm)) per Figma specs - Fixes height from 58px to 56px as designed Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Changed from var(--s2a-spacing-sm) to var(--s2a-spacing-12) - Reason: spacing-sm was resolving to 24px instead of 12px in browser - Figma specs (11390:25185, 11390:25706): both standard and size-small use 12px padding - Consolidated padding-block/padding-inline into single padding shorthand - Both variants now correctly use 12px gap and 12px padding on all sides - Both variants should render at 56px height with 12px padding Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added box-sizing: border-box to ::after pseudo-element - Arrow box was rendering as 34x34px due to border adding 2px (1px each side) - Now correctly renders at 32x32px total (border included in dimensions) - Also applied to size-small variant (24x24px total) - Figma spec: border-box should be 32×32 including the 1px border Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added focus-visible outline for keyboard navigation accessibility - Fixed active state not showing white arrow box when clicked - Changed hover to :hover:not(:active) to prevent interference - Added !important to active state to ensure it overrides hover - Active state now properly inverts: black bg → white, white arrow → black Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Changed from background shorthand to background-color + background-image - Use explicit #fff (white) instead of token + invert for more reliable rendering - Filter still inverts arrow from white to black - Should resolve issue where active state wasn't showing white arrow box Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Created promo-arrow-right-black.svg for active state - Updated active state to use black arrow instead of filter: invert() - Uses S2A token var(--s2a-color-content-knockout) for white background This approach is more reliable than CSS filters and follows proper asset management. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Resolved conflict in libs/utils/utils.js by including both 'social-proof' and 'tour' in C2_BLOCKS array in alphabetical order. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Hi @sirivuri |
| .promo-cta:hover:not(:active)::after { | ||
| background-color: var(--s2a-color-transparent-white-24); | ||
| background-image: url('../assets/img/promo-arrow-right.svg'); | ||
| } | ||
|
|
||
| /* Active state - Figma 11390:25227 - white bg with black arrow */ | ||
| .promo-cta:active::after { | ||
| background-color: var(--s2a-color-content-knockout) !important; | ||
| background-image: url('../assets/img/promo-arrow-right-black.svg') !important; | ||
| border-color: var(--s2a-color-content-knockout) !important; | ||
| } |
There was a problem hiding this comment.
Do we need :not(:active) and !important it should work without it, right ?
| .promo-cta:hover:not(:active)::after { | |
| background-color: var(--s2a-color-transparent-white-24); | |
| background-image: url('../assets/img/promo-arrow-right.svg'); | |
| } | |
| /* Active state - Figma 11390:25227 - white bg with black arrow */ | |
| .promo-cta:active::after { | |
| background-color: var(--s2a-color-content-knockout) !important; | |
| background-image: url('../assets/img/promo-arrow-right-black.svg') !important; | |
| border-color: var(--s2a-color-content-knockout) !important; | |
| } | |
| .promo-cta:hover::after { | |
| background-color: var(--s2a-color-transparent-white-24); | |
| background-image: url('../assets/img/promo-arrow-right.svg'); | |
| } | |
| /* Active state - Figma 11390:25227 - white bg with black arrow */ | |
| .promo-cta:active::after { | |
| background-color: var(--s2a-color-content-knockout); | |
| background-image: url('../assets/img/promo-arrow-right-black.svg'); | |
| border-color: var(--s2a-color-content-knockout); | |
| } |
| .tour-title h1, | ||
| .tour-title h2, | ||
| .tour-title h3, | ||
| .tour-title h4, | ||
| .tour-title h5, | ||
| .tour-title h6 { |
There was a problem hiding this comment.
This can be simplified by using :is
.tour-title :is(h1, h2, h3, h4, h5, h6)
| color: var(--s2a-color-content-label); | ||
| font-family: var(--heading-font-family); | ||
| font-size: var(--s2a-typography-font-size-title-6); | ||
| font-weight: 900; |
There was a problem hiding this comment.
variable could be used here --s2a-font-weight-heading
| .tour-counter { | ||
| color: var(--s2a-color-background-knockout); | ||
| font-size: var(--s2a-typography-font-size-label); | ||
| font-weight: 700; |
| } | ||
| } | ||
| } | ||
| actionArea.remove(); |
There was a problem hiding this comment.
| actionArea.remove(); | |
| actionArea?.remove(); |
Per reviewer feedback, separate the arrow icon from ::after pseudo-element to create a reusable .icon-button utility component. Changes: - Add .icon-button component in styles.css with base styles - Add icon type modifiers: .arrow, .close, .play, .pause, .plus - Add arrow direction variants: .down, .left, .up - Add size variant: .small (24×24px) - Add hover/active/focus states - Remove all .promo-cta::after pseudo-element styles - Update tour.js to create <span class="icon-button arrow"> element - Maintain 100% backward compatibility with DA authoring Benefits: - Reusable across blocks (modal close, video controls, etc.) - More flexible for styling and animation - Better accessibility with proper HTML structure - Easier to maintain and extend Addresses feedback from PR review by @zagi25. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Summary
hub-hero-modalc2 block underlibs/c2/blocks/hub-hero-modal/C2_BLOCKSinlibs/utils/utils.jsdata-start-slide(1-based) for Hub Hero deep-link to a specific slidedata-start-slide, and ARIA attributesJIRA
MWPW-194632
Test page
https://main--da-dc--adobecom.aem.page/drafts/sirivuri/mwpw-194632-hub-hero-modal?milolibs=MWPW-194632--milo--sirivuri&mep=%2Fdc-shared%2Ffragments%2Ftests%2F2026%2Fq2%2Face1205%2Fdc1205-template-sekhar.json--all#tour
Test plan
🤖 Generated with Claude Code