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
removed references to 'user-features' module booting commercial bu… #1130
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: dac5397 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
eab8db3
to
a7ee269
Compare
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.
Nice work! My comments are mostly other things that look like they can be deleted
b60bd32
to
661c5d4
Compare
661c5d4
to
dc1d33f
Compare
🚀 0.0.0-beta-20231102170518 published to npm as a beta release |
This PR still needed @dskamiotis? |
I believe it is, but will need a few changes, i.e deleting user-features, and a rebase on main |
What does this change?
This pull request removes all references to the 'user-features' module from the project. The 'user-features' module was previously used for managing user-related data and features but is no longer needed in this codebase.
Important Note
Some functions from 'user-features' are still required for specific features like
adblock-ask.ts
andcommercial-features.ts
, which rely on functions like shouldHideSupportMessaging() and isAdFreeUser(). To accommodate this, a partial user-features.ts file has been retained for these functions.This may not be a desirable long term solution but allows us to successfully test the user-features being set in one place (dotcom-rendering)
A discussion could be had regarding a centralised place for these functions eg. https://github.com/guardian/csnx/tree/main/libs/%40guardian
Why?
The 'user-features' module is no longer needed in this codebase as its functionality has been ported over to the
dotcom-rendering
repository. This change prevents redundant setting and retrieval of cookies, as user state management is now handled by 'dotcom-rendering'.This revised version maintains the essential information while being somewhat more concise and to the point. It still explains the purpose and the reason for the change.
Testing