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

Add flag logic to Tracker Removal item in Whats New list #2117

Merged
merged 2 commits into from
Jun 23, 2022

Conversation

maxxcrawford
Copy link
Contributor

@maxxcrawford maxxcrawford commented Jun 23, 2022

Related to #2116

@maxxcrawford maxxcrawford requested review from lloan and say-yawn June 23, 2022 22:04
Copy link
Contributor

@say-yawn say-yawn left a comment

Choose a reason for hiding this comment

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

Change requested

@@ -307,7 +310,10 @@ export const WhatsNewMenu = (props: Props) => {
},
};
// Only show its announcement if tracker removal is live:
if (typeof props.profile.remove_level_one_email_trackers === "boolean") {
if (
typeof props.profile.remove_level_one_email_trackers === "boolean" &&
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
typeof props.profile.remove_level_one_email_trackers === "boolean" &&

We do not need to check the profile to see if user has enabled remove email tracker since this is news.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This wasn't a check to see whether the user has it enabled (it doesn't check for true or false), but just if the back-end provides the value in general (i.e. whether it's of type boolean rather than undefined) 🙂

@maxxcrawford maxxcrawford requested a review from say-yawn June 23, 2022 22:09
Copy link
Contributor

@say-yawn say-yawn left a comment

Choose a reason for hiding this comment

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

Code makes sense, local env is not working so testing in Stage.

@say-yawn say-yawn merged commit 6c22f0d into main Jun 23, 2022
@say-yawn say-yawn deleted the MPP-2104-tracker-removal-ui-behind-flag branch June 23, 2022 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants