-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use gu_hide_support_messaging cookie as the only source of truth for support messaging #13037
base: main
Are you sure you want to change the base?
Conversation
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. |
@@ -51,8 +51,6 @@ const validateResponse = ( | |||
isObject(response) && | |||
isBoolean(response.showSupportMessaging) && | |||
isObject(response.contentAccess) && | |||
isBoolean(response.contentAccess.paidMember) && | |||
isBoolean(response.contentAccess.recurringContributor) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were just missed in #12983
@@ -176,30 +103,30 @@ describe('withinLocalNoBannerCachePeriod', () => { | |||
}); | |||
}); | |||
|
|||
describe('hasSupporterCookie', () => { | |||
describe('shouldHideSupportMessaging', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldHideSupportMessging
is exactly equivalent to hasSupporterCookie
now the one-time stuff has been removed, so hasSupporterCookie
is no longer needed.
Size Change: -1.22 kB (-0.13%) Total Size: 930 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, much simpler 👍
Now that guardian/support-frontend#6643 has been merged we need to wait 90 days before merging to ensure that all one-time contributors who are entitled to fewer support asks have the correct cookie set.
#6643 added the new cookie to the old checkout, this PR adds it to the new generic one time checkout. We can merge this on 9th April 2025 |
What does this change?
Stop using the one time contributor cookie which is set by support-frontend on the thank you page to work out whether a user should see support messaging or not. From now on we will only use the 'hide support messaging' cookie, and support-frontend will be updated to set this instead of the other.
I have also removed the 90 day age check which was carried out on the previous cookie and will just set the hide support messaging cookie to expire after 90 days when creating it.