Conversation
tomrf1
commented
Oct 6, 2025
| )} | ||
| <div css={styles.ctaContainer(isCollapsed)}> | ||
| <LinkButton | ||
| href={getChoiceCardUrl( |
Member
Author
There was a problem hiding this comment.
Previously we were not adding tracking params to the url if the choice card had destinationUrl set. This is fixed here, because we now call enrichSupportUrl as well
tomrf1
commented
Oct 8, 2025
| tracking: Tracking; | ||
| submitComponentEvent?: (componentEvent: ComponentEvent) => void; | ||
| design?: ConfigurableDesign; | ||
| promoCodes?: string[]; |
Member
Author
There was a problem hiding this comment.
we now have to pass this field through to the banner component for use by enrichSupportUrl
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
tomrf1
commented
Oct 8, 2025
| )}`; | ||
| }; | ||
|
|
||
| export const addChoiceCardsParams = ( |
tomrf1
commented
Oct 8, 2025
| import type { Tracking } from '@guardian/support-dotcom-components/dist/shared/types'; | ||
| import { addChoiceCardsParams, enrichSupportUrl } from './tracking'; | ||
|
|
||
| describe('addChoiceCardsParams', () => { |
Member
Author
There was a problem hiding this comment.
removed tests for an unused function
juabara
approved these changes
Oct 8, 2025
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.
What does this change?
The choice cards config from SDC now includes a
destinationfield instead ofdestinationUrl: guardian/support-dotcom-components#1431The
destinationfield will simply beLandingPageorCheckout, and DCR builds the url.This is because we've changed our mind about how this should be configured from the tool. It simplifies things for MRR users of the tool, and also in the client (DCR).
The main change here is to the
getChoiceCardUrlfunction, which no longer takes abaseUrlparameter. It builds the right Support site url based on the given choice card settings.Testing
In addition to the new unit tests, I configured some choice cards in the CODE RRCP and tested both landing page and checkout links work