feat(hub-hero-modal): add hub-hero-modal C2 block (MWPW-194632)#5911
Closed
sirivuri wants to merge 2 commits into
Closed
feat(hub-hero-modal): add hub-hero-modal C2 block (MWPW-194632)#5911sirivuri wants to merge 2 commits into
sirivuri wants to merge 2 commits into
Conversation
Scrollable modal block with sticky title bar and sticky promo CTA, matching Figma spec 10311:248467 (Modal_Sales). Structure: - Row 0 → sticky .hub-hero-modal-title (eyebrow + headline) - Rows 1–N → .hub-hero-modal-section (scrollable, media + copy) - Single .hub-hero-modal-cta (frosted pill, sticky at modal bottom) Key implementation details: - Block has no overflow-y so position:sticky scopes to .dialog-modal - Z-pattern uses :nth-of-type/:last-of-type (not :nth-child) to avoid counting <div> title/CTA siblings skewing section ordinals - CTA extracted from row 1 only; later rows have CTAs stripped - <section> elements for content rows; <div> for title and CTA Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
SNOW Change Request Transaction ID: 0000019c1ef37582-dc3fff6 |
The block lives at libs/c2/blocks/hub-hero-modal/ but loadBlock() looks
for non-MILO_BLOCKS entries at {codeRoot}/blocks/{name}. On the DA test
page (main--da-dc--adobecom.aem.page) codeRoot points to that host which
has no hub-hero-modal block, causing "Failed loading hub-hero-modal block."
Add hub-hero-modal to MILO_BLOCKS so loadBlock() uses miloLibs
(MWPW-194632--milo--sirivuri branch URL) and create thin proxy files at
libs/blocks/hub-hero-modal/ that re-export from the c2 implementation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Closing - incorrect base branch. C2 block depends on --s2a-* design tokens not in main. Canonical PR is #5907 targeting site-redesign-foundation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hub-hero-modalC2 block — a scrollable modal with a sticky title bar and sticky frosted promo CTA, matching Figma spec 10311:248467 (Modal_Sales)mainBlock structure
.hub-hero-modal-titleposition: sticky; top: 0.hub-hero-modal-section.hub-hero-modal-ctaposition: sticky; bottom: 0(frosted pill)Key implementation notes
overflow-yon the block — sticky scopes to.dialog-modal(the Milo scroll container). Setting overflow on the block would trap sticky.:nth-of-typenot:nth-child—<div>title/CTA siblings would skew:nth-childordinals and invert the pattern.<section>elements witharia-label; title and CTA use<div>.Test plan
test/c2/blocks/hub-hero-modal/hub-hero-modal.test.js(17 assertions)test-pages/hub-hero-modal.html— verify sticky title, sticky CTA, scroll, Z-pattern alignmentmax-height: calc((100vh - 6px) - 2em)matches.dialog-modalheight at 900px and 1024px viewports🤖 Generated with Claude Code