Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🔥 Remove the custom branding prompt (#2905)

Luke Vella7f771a5ae625
diff --git a/apps/web/public/images/branded-poll.webp b/apps/web/public/images/branded-poll.webp
deleted file mode 100644
index 86ebfd5ea..000000000
Binary files a/apps/web/public/images/branded-poll.webp and /dev/null differ
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index 9cddd7b94..ced7260f2 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -191,9 +191,6 @@
"customBranding": "Custom branding",
"customBrandingAlertDescription": "Custom branding is available to Enterprise license holders as a paid add-on.",
"customBrandingDescription": "Show your logo and brand colors to your participants",
- "customBrandingPromptCta": "Set up now",
- "customBrandingPromptDescription": "Get professional scheduling polls with your own logo and colors.",
- "customBrandingPromptTitle": "Custom branding",
"customBrandingSettingLabel": "Show your logo and colors to participants.",
"customBrandingSettingTitle": "Custom branding",
"dangerZone": "Danger zone",
@@ -250,7 +247,6 @@
"disabled": "Disabled",
"disconnectCalendar": "Disconnect calendar",
"disconnectingCalendar": "Disconnecting calendar...",
- "dismiss": "Dismiss",
"dismissPasswordSetup": "Don't show again",
"done": "Done",
"downloadICSFile": "Download ICS file",
@@ -462,7 +458,6 @@
"name": "Name",
"namePlaceholder": "Jessie Smith",
"neverUsed": "Never used",
- "new": "New",
"newEventType": "New event type",
"newParticipant": "New participant",
"newParticipantDialogBackToPoll": "Back to poll",
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx
index 0ec26f9db..dc1ec783d 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx
@@ -13,7 +13,6 @@ import {
} from "@rallly/ui/sidebar";
import { SettingsIcon } from "lucide-react";
import Link from "next/link";
-import { CustomBrandingPrompt } from "@/features/branding/components/custom-branding-prompt";
import { LicenseLimitWarning } from "@/features/licensing/components/license-limit-warning";
import { CommandMenu } from "@/features/navigation/components/command-menu";
import { SpaceDropdown } from "@/features/space/components/space-dropdown";
@@ -77,7 +76,6 @@ export default async function Layout({
</Sidebar>
<SidebarInset id="main-content" tabIndex={-1} className="min-w-0">
<LicenseLimitWarning />
- <CustomBrandingPrompt />
<div className="flex flex-1 flex-col">
<div className="flex flex-1 flex-col">{children}</div>
</div>
diff --git a/apps/web/src/features/branding/components/custom-branding-prompt.tsx b/apps/web/src/features/branding/components/custom-branding-prompt.tsx
deleted file mode 100644
index 53b99d009..000000000
--- a/apps/web/src/features/branding/components/custom-branding-prompt.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-"use client";
-
-import { posthog } from "@rallly/posthog/client";
-import { Badge } from "@rallly/ui/badge";
-import { Button } from "@rallly/ui/button";
-import Image from "next/image";
-import Link from "next/link";
-import React from "react";
-import { useLocalStorage } from "react-use";
-import { useSpace } from "@/features/space/client";
-import { useUser } from "@/features/user/client";
-import { Trans, useTranslation } from "@/i18n/client";
-import { isBusinessEmail } from "@/lib/utils/is-business-email";
-
-export function CustomBrandingPrompt() {
- const { t } = useTranslation();
- const { data: space } = useSpace();
- const { user } = useUser();
-
- const [isDismissed, setIsDismissed] = useLocalStorage(
- "custom-branding-prompt-dismissed",
- false,
- );
-
- const [showPrompt, setShowPrompt] = React.useState(false);
-
- const hasBusinessEmail = user?.email ? isBusinessEmail(user.email) : false;
-
- React.useEffect(() => {
- if (space.showBranding) {
- return;
- }
- if (hasBusinessEmail) {
- setShowPrompt(true);
- }
- }, [space.showBranding, hasBusinessEmail]);
-
- if (isDismissed || !showPrompt) {
- return null;
- }
-
- return (
- <div className="fixed right-4 bottom-4 z-50 w-96 overflow-hidden rounded-xl border border-popover-border bg-popover shadow-lg">
- <div className="relative h-40">
- <Image
- src="/images/branded-poll.webp"
- alt={t("customBrandingPromptTitle", {
- defaultValue: "Custom branding",
- })}
- fill
- sizes="384px"
- style={{
- objectFit: "cover",
- objectPosition: "top",
- }}
- />
- </div>
- <div className="p-4">
- <div className="flex items-center gap-x-2">
- <h2 className="font-semibold text-sm">
- <Trans
- i18nKey="customBrandingPromptTitle"
- defaults="Custom branding"
- />
- </h2>
- <Badge size="sm" variant="secondary">
- <Trans i18nKey="new" defaults="New" />
- </Badge>
- </div>
- <p className="mt-2 text-muted-foreground text-sm leading-relaxed">
- <Trans
- i18nKey="customBrandingPromptDescription"
- defaults="Get professional scheduling polls with your own logo and colors."
- />
- </p>
- <div className="mt-6 flex gap-2">
- <Button
- variant="primary"
- className="flex-1"
- nativeButton={false}
- render={<Link href="/settings/general" />}
- onClick={() =>
- posthog?.capture("custom_branding_prompt:setup_click")
- }
- >
- <Trans i18nKey="customBrandingPromptCta" defaults="Set up now" />
- </Button>
- <Button
- className="flex-1"
- onClick={() => {
- posthog?.capture("custom_branding_prompt:dismiss_click");
- setIsDismissed(true);
- }}
- >
- <Trans i18nKey="dismiss" defaults="Dismiss" />
- </Button>
- </div>
- </div>
- </div>
- );
-}
diff --git a/apps/web/src/lib/utils/is-business-email.ts b/apps/web/src/lib/utils/is-business-email.ts
deleted file mode 100644
index 5ee1a61c5..000000000
--- a/apps/web/src/lib/utils/is-business-email.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-const FREE_EMAIL_DOMAINS = new Set([
- // Google
- "gmail.com",
- "googlemail.com",
- // Microsoft
- "outlook.com",
- "hotmail.com",
- "hotmail.co.uk",
- "hotmail.fr",
- "live.com",
- "live.co.uk",
- "msn.com",
- // Apple
- "icloud.com",
- "me.com",
- "mac.com",
- // Yahoo
- "yahoo.com",
- "yahoo.co.uk",
- "yahoo.fr",
- "yahoo.de",
- "yahoo.es",
- "yahoo.it",
- "yahoo.com.au",
- "yahoo.com.br",
- "yahoo.ca",
- "ymail.com",
- // Proton
- "proton.me",
- "protonmail.com",
- "protonmail.ch",
- "pm.me",
- // Other popular free providers
- "aol.com",
- "aim.com",
- "mail.com",
- "zoho.com",
- "gmx.com",
- "gmx.de",
- "gmx.net",
- "web.de",
- "t-online.de",
- "freenet.de",
- "yandex.com",
- "yandex.ru",
- "mail.ru",
- "inbox.com",
- "fastmail.com",
- "fastmail.fm",
- "hey.com",
- "tutanota.com",
- "tutamail.com",
- "tuta.io",
- // Telecom / ISP providers
- "verizon.net",
- "att.net",
- "bellsouth.net",
- "comcast.net",
- "sbcglobal.net",
- "cox.net",
- "charter.net",
- "earthlink.net",
- "optonline.net",
- "btinternet.com",
- "virginmedia.com",
- "sky.com",
- "ntlworld.com",
- "talktalk.net",
- "orange.fr",
- "free.fr",
- "sfr.fr",
- "laposte.net",
- "wanadoo.fr",
- "bbox.fr",
- "numericable.fr",
-]);
-
-export function isBusinessEmail(email: string): boolean {
- const domain = email.split("@")[1]?.toLowerCase();
- if (!domain) return false;
- return !FREE_EMAIL_DOMAINS.has(domain);
-}