Skip to content

Add gallery affiliate link disclaimer#14303

Merged
marjisound merged 8 commits intomainfrom
add-gallery-affiliate-link-disclaimer
Aug 5, 2025
Merged

Add gallery affiliate link disclaimer#14303
marjisound merged 8 commits intomainfrom
add-gallery-affiliate-link-disclaimer

Conversation

@marjisound
Copy link
Contributor

@marjisound marjisound commented Jul 29, 2025

What does this change?

This PR adds the affiliate links disclaimer to the gallery article only for Web (since I couldn't find the disclaimer on the app version)

The styling is the same as the frontend version, though dark mode styling was added as well. You can find the story in the published storybook here

Relevant frontend PR is: guardian/frontend#28122

This fixes part of #12292

@marjisound marjisound force-pushed the add-gallery-affiliate-link-disclaimer branch from 3490286 to 1e31a8f Compare July 29, 2025 15:31
@github-actions
Copy link

github-actions bot commented Jul 29, 2025

Using the container we can give it a padding-bottom and also share the
grid columns and the left border styling.
@marjisound marjisound force-pushed the add-gallery-affiliate-link-disclaimer branch from 1e31a8f to 57c3c0d Compare July 29, 2025 15:33
@marjisound marjisound added the run_chromatic Runs chromatic when label is applied label Jul 29, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Jul 29, 2025
@github-actions
Copy link

github-actions bot commented Jul 29, 2025

@marjisound marjisound self-assigned this Jul 29, 2025
@marjisound marjisound marked this pull request as ready for review July 29, 2025 15:53
@github-actions
Copy link

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.

@marjisound marjisound force-pushed the add-gallery-affiliate-link-disclaimer branch from 399a448 to 5424d90 Compare July 30, 2025 10:31
rel={
isSkimlink(href)
? 'sponsored'
: getAttrs(node)?.getNamedItem('rel')?.value
Copy link
Member

Choose a reason for hiding this comment

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

We might want to set this to undefined if not a skimlink?

Or we could check with CP how they expect rel attributes to be propagated on caption links in DCR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes, we had made the change together in the call, but I'd forgotten to push to repo :)
For now lets leave it as undefined (not to impose any change to the existing functionality in prod), but I'll email CP and ask about this

Copy link
Member

@arelra arelra left a comment

Choose a reason for hiding this comment

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

Great work ✨

Co-authored-by: Ravi <7014230+arelra@users.noreply.github.com>
@marjisound marjisound added the run_chromatic Runs chromatic when label is applied label Aug 1, 2025
@marjisound marjisound linked an issue Aug 1, 2025 that may be closed by this pull request
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Aug 1, 2025
@marjisound marjisound added the run_chromatic Runs chromatic when label is applied label Aug 1, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Aug 1, 2025
@marjisound marjisound added the run_chromatic Runs chromatic when label is applied label Aug 4, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Aug 4, 2025
@marjisound marjisound added the run_chromatic Runs chromatic when label is applied label Aug 5, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Aug 5, 2025
Also fix paddings for gallery image and caption
@marjisound marjisound force-pushed the add-gallery-affiliate-link-disclaimer branch from 0994665 to c9ac19c Compare August 5, 2025 08:41
@marjisound marjisound added the run_chromatic Runs chromatic when label is applied label Aug 5, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Aug 5, 2025
}
`;

const webMetaAndDisclaimerContainer = css`
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this "web" specific? It looks like it wraps both apps and web?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You have amazing eyes, just fixed it 👍

@marjisound marjisound added the run_chromatic Runs chromatic when label is applied label Aug 5, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Aug 5, 2025
@marjisound marjisound merged commit b241cf8 into main Aug 5, 2025
31 checks passed
@marjisound marjisound deleted the add-gallery-affiliate-link-disclaimer branch August 5, 2025 15:05
@prout-bot
Copy link

Seen on PROD (merged by @marjisound 18 minutes and 9 seconds ago) Please check your changes!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Affiliate Links On Galleries

4 participants