Skip to content
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

feat: Add client-side feature flag for Follow+Notes functionality #3440

Merged
merged 5 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/client/public/deploy-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ window.APP_CONFIG.overrideFeatureFlag = (flagName, overrideValue) => {
}
overrides[flagName] = overrideValue;
window.sessionStorage.setItem(storageKey, JSON.stringify(overrides));
console.log('New feature flag overrides in page session:',
window.sessionStorage.getItem(storageKey));
// Reformatted according to common ESLint rules
/* eslint-disable no-console */
// console.log('New feature flag overrides in page session:', window.sessionStorage.getItem(storageKey));
console.log(`New feature flag overrides in page session: ${window.sessionStorage.getItem(storageKey)}`);
/* eslint-enable no-console */
Comment on lines +16 to +20
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Reformatted according to common ESLint rules
/* eslint-disable no-console */
// console.log('New feature flag overrides in page session:', window.sessionStorage.getItem(storageKey));
console.log(`New feature flag overrides in page session: ${window.sessionStorage.getItem(storageKey)}`);
/* eslint-enable no-console */
/* eslint-disable no-console */
console.log(`New feature flag overrides in page session: ${window.sessionStorage.getItem(storageKey)}`);

};

// For local development only. Register feature flags for Staging and Production by
Expand All @@ -23,6 +26,7 @@ window.APP_CONFIG.featureFlags = {
newTerminologyEnabled: true,
newGrantsDetailPageEnabled: true,
shareTerminologyEnabled: true,
followNotesEnabled: true,
};

// Setting a GOOGLE_TAG_ID enables Google Analytics.
Expand Down
4 changes: 4 additions & 0 deletions packages/client/src/helpers/featureFlags/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ export function newGrantsDetailPageEnabled() {
export function shareTerminologyEnabled() {
return getFeatureFlags().shareTerminologyEnabled === true;
}

export function followNotesEnabled() {
return getFeatureFlags().followNotesEnabled === true;
}
1 change: 1 addition & 0 deletions terraform/prod.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ website_feature_flags = {
newTerminologyEnabled = true,
newGrantsDetailPageEnabled = true,
shareTerminologyEnabled = true,
followNotesEnabled = false,
}

// Google Analytics Account ID: 233192355, Property ID: 321194851, Stream ID: 3802896350
Expand Down
1 change: 1 addition & 0 deletions terraform/staging.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ website_feature_flags = {
newTerminologyEnabled = true,
newGrantsDetailPageEnabled = true,
shareTerminologyEnabled = true,
followNotesEnabled = false,
}

// Google Analytics Account ID: 233192355, Property ID: 429910307, Stream ID: 7590745080
Expand Down
Loading