feat(pdp): add product detail page block - #1
Merged
Merged
Conversation
Renders the PDP from product-pipeline markup and the JSON-LD custom payload, covering the gallery, purchase card, specifications, condition report and similar listings at both breakpoints. The hero image is flipped to eager with a media-scoped preload and then moved rather than cloned into the gallery, so the LCP candidate is fetched once and the painted node is the one already in flight.
A bare `header { height }` selector also matched any <header> a block renders inside <main>, clamping it to the nav height and clipping its content; scoping it to `body > header` fixes that class of bug for every block. Also drops a redundant deprecated `clip` fallback and annotates the carousel's no-descending-specificity warnings, which all compare selectors with disjoint ancestor chains, so `npm run lint` passes repo-wide.
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
|
Replaces the pointer-delta swipe with a CSS scroll-snap track, so dragging, momentum, rubber-banding and snapping all come from the browser and stay on the compositor; the hero picture is still moved rather than cloned into the first slide, keeping the LCP element stable and fetched once. The sticky purchase bar now stays hidden while the inline Contact Dealer button is still reachable and only appears once it scrolls above the viewport, since direction-aware hiding would withdraw the call to action from exactly the engaged readers most likely to act on it.
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.
Fix #
Renders the PDP from product-pipeline markup and the JSON-LD
custompayload, covering the gallery, purchase card, specifications, condition report and similar listings at both breakpoints.The hero image is flipped to eager with a media-scoped preload and then moved rather than cloned into the gallery, so the LCP candidate is fetched exactly once and the painted node is the one already in flight. The pipeline emits every image as
loading="lazy", including the first, so without this nothing fetches the LCP candidate at all.Also scopes
header { height }tobody > header. The bare selector matched any<header>a block renders inside<main>, clamping it to the nav height and clipping its content. Clears the remaining stylelint debt sonpm run lintpasses repo-wide.Test URLs:
Product pages only render on the pipeline origin, so the PDP itself is best reviewed at:
Notes for review
scripts.js—prioritizeHeroImage()runs from the first line ofloadEagerbefore anyawait.buildPDPBlock()identity-checks the document's own<main>, becauseloadFragmentalso runsdecorateMainover nav and footer fragments.MOCK:in source: protections, attachments, spec groups, stats bar, similar listings, and per-item condition detail for 11 of 12 categories. Real: title, price, year, hours, serial, dealer, location, accessories, condition grades, undercarriage wear.priceCurrency, and this listing is SGD.widgets/equipment-search/currencies.jsonlanded onmainin parallel and is probably the shared source of truth to wire in.