Skip to content

MPP-4160: Modify Popup Banner - 4 Mask Limit #5546

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

Merged
merged 1 commit into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 2 additions & 4 deletions frontend/pendingTranslations.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,8 @@ mask-deletion-warning-sign-ins = If you use this mask to sign in to any accounts
## 4-mask upsell banner

upsell-banner-4-masks-button-close-label = close
upsell-banner-4-masks-us-heading = Get maximum email and phone protection
upsell-banner-4-masks-non-us-heading = Get maximum email protection
upsell-banner-4-masks-us-description = { -brand-name-relay-premium } gives you a phone mask to protect your real number, plus unlimited email masks and the ability to block promotional emails.
upsell-banner-4-masks-non-us-description = { -brand-name-relay-premium } gives you unlimited email masks, spam blocking, a custom { -brand-name-relay } email domain, and the ability to reply to forwarded messages.
upsell-banner-4-masks-us-heading-2 = Get maximum email protection
upsell-banner-4-masks-us-description-2 = Unlock unlimited email masks, reply directly from them, and create new ones instantly with your own { -brand-name-relay } subdomain — anytime, anywhere.
upsell-banner-4-masks-us-cta = Upgrade to { -brand-name-relay-premium }

-brand-name-mozilla-monitor = Mozilla Monitor
Expand Down
16 changes: 4 additions & 12 deletions frontend/src/components/dashboard/CornerNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import Image from "../Image";
import { ProfileData } from "../../hooks/api/profile";
import { useLocalDismissal } from "../../hooks/localDismissal";
import UpsellBannerNonUs from "../../pages/accounts/images/upsell-banner-nonus.svg";
import UpsellBannerUs from "../../pages/accounts/images/upsell-banner-us.svg";
import { useGaViewPing } from "../../hooks/gaViewPing";
import { RuntimeData } from "../../hooks/api/runtimeData";
import { isFlagActive } from "../../functions/waffle";
import { useGaEvent } from "../../hooks/gaEvent";
import { useL10n } from "../../hooks/l10n";
import { LinkButton } from "../Button";
import { isPhonesAvailableInCountry } from "../../functions/getPlan";
import { AliasData } from "../../hooks/api/aliases";

export type Props = {
Expand All @@ -29,21 +27,15 @@ export const CornerNotification = (props: Props) => {
const dismissal = useLocalDismissal(
`corner_notification_masks_upsell_${props.profile.id}`,
);
const isPhonesAvailable = isPhonesAvailableInCountry(runtimeData);
const aliases = props.aliases;
const ctaRef = useGaViewPing({
category: "Purchase Button",
label: "4-mask-limit-upsell",
});
const gaEvent = useGaEvent();

const title = l10n.getString(
`upsell-banner-4-masks-${isPhonesAvailable ? "us" : "non-us"}-heading`,
);
const description = l10n.getString(
`upsell-banner-4-masks-${isPhonesAvailable ? "us" : "non-us"}-description`,
);
const illustration = isPhonesAvailable ? UpsellBannerUs : UpsellBannerNonUs;
const title = l10n.getString(`upsell-banner-4-masks-us-heading-2`);
const description = l10n.getString(`upsell-banner-4-masks-us-description-2`);

if (
isFlagActive(runtimeData, "four_mask_limit_upsell") &&
Expand Down Expand Up @@ -71,14 +63,14 @@ export const CornerNotification = (props: Props) => {
height={20}
/>
</button>
<Image src={illustration} alt="" />
<Image src={UpsellBannerNonUs} alt="" />
</div>
<div className={styles["card-content"]}>
<p className={styles["card-title"]}>{title}</p>
<p className={styles["card-description"]}>{description}</p>
<LinkButton
className={styles["card-cta"]}
href="/premium#pricing"
href="/premium/?utm_medium=referral&utm_source=relay-dashboard&utm_campaign=4-masks-modal#pricing"
ref={ctaRef}
onClick={() => {
gaEvent({
Expand Down