Skip to content

Add product card image to lightbox and enable product links#16418

Open
rcrphillips wants to merge 9 commits into
mainfrom
rp-product-element-lightbox
Open

Add product card image to lightbox and enable product links#16418
rcrphillips wants to merge 9 commits into
mainfrom
rp-product-element-lightbox

Conversation

@rcrphillips

Copy link
Copy Markdown
Contributor

Adds the ability for images within product cards to be show within a lightbox as well as main product images. This then also pulls through the product links, giving readers another option for clicking through to a merchants site. Note that the button styling is different between the main column product buttons and the left col product buttons because of a mismatch in the composer data model. We will need to update this at a later point.
Screenshot 2026-07-20 at 14 20 01
Screenshot 2026-07-20 at 14 20 23
Screenshot 2026-07-20 at 14 19 53

@github-actions

Copy link
Copy Markdown

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@rcrphillips rcrphillips added dotcom-rendering maintenance Departmental tracking: maintenance work, not a fix or a feature The Filter labels Jul 20, 2026
@rcrphillips rcrphillips added the run_chromatic Runs chromatic when label is applied label Jul 20, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jul 20, 2026
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

xCustComponentId="lightbox"
themeOverrides={{
backgroundTertiary:
palette.neutral[100],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't this just go in the current theme object?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Given that the lightbox is always a dark background, we want to have the overrides.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess my question is more - is the background of the secondary button in the leftCol card deliberately transparent or should it just be white like this?

Comment thread dotcom-rendering/src/components/LightboxLayout.island.tsx
* Any elements that are off screen, such as caption links for images that are not
* currently showing, are ignored
*/
const getTabbableElements = (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are the product buttons tabbable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They are, but the tabbing does actually stop working so will fix that.

*/
const FILTER_PAGE_ID_PREFIXES = ['thefilter/', 'thefilter-us/'];

export const isFilterPageId = (pageId: string): boolean =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For some other elements we are checking the tags for "tracking/commissioningdesk/the-filter" or "tracking/commissioningdesk/filter-us".

But - why check if it's a Filter article? Shouldn't the presence of ProductBlockElement be enough to tell us that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In the future we might wannt to enable product elements to exist on non-filter content. However, we would want to only narrow the 'don't show info functionality' to filter articles. Therefore, I think it still makes sense.

@andrewHEguardian andrewHEguardian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 but let's wait til #16202 is in we can test the carousel images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dotcom-rendering maintenance Departmental tracking: maintenance work, not a fix or a feature The Filter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants