Skip to content

Commit e343c24

Browse files
Make goal copy in ticker configurable (#2065)
## What are you changing? The PR is to make the goal copy in ticker configurable ie the word "goal" after 50,000 on this ticker <img width="462" alt="image" src="https://github.com/user-attachments/assets/86b7d348-c82c-4d4f-a548-098869dc78b4" /> ## Why? This is to change word "goal" after 50,000 on this ticker to "readers" to show that it's for supporter count
2 parents 2c79866 + 0791b4b commit e343c24

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.changeset/fast-wombats-post.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@guardian/source-development-kitchen': minor
3+
---
4+
5+
Make the goalCopy in tickerCopy configurable

libs/@guardian/source-development-kitchen/src/react-components/ticker/Ticker.stories.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ const Template: StoryFn<typeof Ticker> = (args: TickerSettings) => (
2424
export const HalfwayContributed: StoryFn<typeof Ticker> = Template.bind({});
2525
HalfwayContributed.args = {
2626
currencySymbol: '£',
27-
copy: {},
27+
copy: {
28+
goalCopy: 'goal',
29+
},
2830
tickerData: {
2931
total: 50000,
3032
goal: 100000,
@@ -38,6 +40,7 @@ SmallDonationsSoFar.args = {
3840
currencySymbol: '£',
3941
copy: {
4042
headline: 'Help us reach our end-of-year goal',
43+
goalCopy: 'goal',
4144
},
4245
tickerData: {
4346
total: 99,
@@ -52,6 +55,7 @@ ContributionGoalMet.args = {
5255
currencySymbol: '£',
5356
copy: {
5457
headline: 'Help us reach our end-of-year goal',
58+
goalCopy: 'goal',
5559
},
5660
tickerData: {
5761
total: 10000000,

libs/@guardian/source-development-kitchen/src/react-components/ticker/Ticker.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { useTicker } from './useTicker';
1313

1414
interface TickerCopy {
1515
headline?: string;
16+
goalCopy?: string;
1617
}
1718

1819
export interface TickerData {
@@ -186,7 +187,7 @@ export const Ticker = ({
186187
{runningTotal.toLocaleString()}
187188
</span>{' '}
188189
of {currencySymbol}
189-
{tickerData.goal.toLocaleString()} goal
190+
{tickerData.goal.toLocaleString()} {copy.goalCopy ?? 'goal'}
190191
</div>
191192
</div>
192193
</div>

0 commit comments

Comments
 (0)