Skip to content

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

🔥 Remove premium poll fake door test (#3067)

Luke Vella89a877c380d0
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index caa85d7b3..81dcb36d1 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -624,17 +624,6 @@
"poweredByRallly": "Powered by <a>{name}</a>",
"preferences": "Preferences",
"preferencesDescription": "Manage your preferences",
- "premiumPoll": "Premium poll",
- "premiumPollBadge": "This poll only",
- "premiumPollComingSoonDescription": "One-time purchases aren't available yet, but your interest helps us decide what to build next. Pro includes all of this on unlimited polls.",
- "premiumPollComingSoonTitle": "Premium polls are coming soon",
- "premiumPollLifetime": "Keep this poll forever",
- "premiumPollLifetimeDescription": "This poll is exempt from the 30 day retention limit",
- "premiumPollOneTime": "one time",
- "premiumPollPrivacy": "Participant privacy",
- "premiumPollPrivacyDescription": "Hide participant names and votes from respondents",
- "premiumPollTabDescription": "Pro features for this poll only",
- "premiumPollUpgradeButton": "Upgrade this poll",
"preview": "Preview",
"previousMonth": "Previous month",
"previousWeek": "Previous week",
@@ -843,7 +832,6 @@
"updateEventTypeError": "Failed to update event type",
"upgradePromptTitle": "Upgrade to Pro",
"upgradeToPro": "Upgrade to Pro",
- "upgradeToProInstead": "Upgrade to Pro instead",
"uploadImage": "Upload",
"upToDate": "Up to date",
"url": "URL",
diff --git a/apps/web/src/features/billing/components/pay-wall-dialog.tsx b/apps/web/src/features/billing/components/pay-wall-dialog.tsx
index 666bf9800..f8f6eebd1 100644
--- a/apps/web/src/features/billing/components/pay-wall-dialog.tsx
+++ b/apps/web/src/features/billing/components/pay-wall-dialog.tsx
@@ -1,8 +1,7 @@
"use client";
import { pricingData } from "@rallly/billing/pricing";
-import { posthog, useFeatureFlagEnabled } from "@rallly/posthog/client";
-import { Badge } from "@rallly/ui/badge";
+import { posthog } from "@rallly/posthog/client";
import { Button } from "@rallly/ui/button";
import {
Dialog,
@@ -23,7 +22,6 @@ import {
ClockIcon,
EyeOffIcon,
LifeBuoyIcon,
- MailCheckIcon,
PaletteIcon,
SparklesIcon,
TimerResetIcon,
@@ -111,15 +109,6 @@ const currencyFormatter = new Intl.NumberFormat("en-US", {
maximumFractionDigits: 2,
});
-const PREMIUM_POLL_FAKE_DOOR_FLAG = "premium-poll-fake-door";
-
-// Pegged to one month of Pro on purpose: the one-off replaces the
-// subscribe-once-and-cancel path, so pricing below it would only discount
-// behavior that already happens at full monthly price.
-const premiumPollPriceCents = pricingData.monthly.amount;
-
-type PlanOption = SpaceTier | "premium-poll";
-
export function PayWallDialog({
isOpen,
onOpenChange,
@@ -127,39 +116,11 @@ export function PayWallDialog({
isOpen: boolean;
onOpenChange: (open: boolean) => void;
}) {
- const [selectedPlan, setSelectedPlan] = React.useState<PlanOption>("pro");
+ const [selectedPlan, setSelectedPlan] = React.useState<SpaceTier>("pro");
const [isAnnual, setIsAnnual] = React.useState(true);
- const [isComingSoonVisible, setIsComingSoonVisible] = React.useState(false);
const trigger = usePayWallStore((state) => state.trigger);
- const isFakeDoorEnabled = useFeatureFlagEnabled(PREMIUM_POLL_FAKE_DOOR_FLAG);
- const showPremiumPoll =
- !!isFakeDoorEnabled &&
- (trigger?.from === "poll-settings" || trigger?.from === "manage-poll");
-
- React.useEffect(() => {
- if (!isOpen || !showPremiumPoll) {
- return;
- }
- const { trigger: currentTrigger } = usePayWallStore.getState();
- posthog?.capture("paywall:premium_poll_option_view", {
- from: currentTrigger?.from,
- setting: currentTrigger?.setting,
- action: currentTrigger?.action,
- poll_id: currentTrigger?.pollId,
- });
- }, [isOpen, showPremiumPoll]);
const handleChangePlan = (value: string) => {
- if (value === "premium-poll") {
- posthog?.capture("paywall:premium_poll_option_select", {
- from: trigger?.from,
- setting: trigger?.setting,
- action: trigger?.action,
- poll_id: trigger?.pollId,
- });
- setSelectedPlan("premium-poll");
- return;
- }
setSelectedPlan(spaceTierSchema.parse(value));
};
@@ -182,7 +143,6 @@ export function PayWallDialog({
if (!open) {
setSelectedPlan("pro");
setIsAnnual(true);
- setIsComingSoonVisible(false);
}
}}
>
@@ -237,29 +197,6 @@ export function PayWallDialog({
)
}
/>
- {showPremiumPoll && (
- <PlanRadioGroupItem
- value="premium-poll"
- id="premium-poll"
- title={
- <span className="flex items-center gap-2">
- <Trans i18nKey="premiumPoll" defaults="Premium poll" />
- <Badge size="sm" variant="secondary">
- <Trans
- i18nKey="premiumPollBadge"
- defaults="This poll only"
- />
- </Badge>
- </span>
- }
- price={currencyFormatter.format(
- premiumPollPriceCents / 100,
- )}
- priceLabel={
- <Trans i18nKey="premiumPollOneTime" defaults="one time" />
- }
- />
- )}
</RadioGroup>
</div>
@@ -325,64 +262,6 @@ export function PayWallDialog({
</UpgradeButton>
</TabsContent>
)}
- {selectedPlan === "premium-poll" &&
- (isComingSoonVisible ? (
- <div className="space-y-3 rounded-2xl bg-gray-50 p-4 ring ring-button-outline ring-inset dark:bg-gray-700/50">
- <div className="font-medium text-sm">
- <Trans
- i18nKey="premiumPollComingSoonTitle"
- defaults="Premium polls are coming soon"
- />
- </div>
- <div className="text-muted-foreground text-sm">
- <Trans
- i18nKey="premiumPollComingSoonDescription"
- defaults="One-time purchases aren't available yet, but your interest helps us decide what to build next. Pro includes all of this on unlimited polls."
- />
- </div>
- <UpgradeButton
- className="w-full"
- annual={isAnnual}
- onClick={() => {
- posthog?.capture("paywall:upgrade_button_click", {
- from: trigger?.from,
- setting: trigger?.setting,
- action: trigger?.action,
- poll_id: trigger?.pollId,
- plan: "pro",
- interval: isAnnual ? "year" : "month",
- premium_poll_fallback: true,
- });
- }}
- >
- <Trans
- i18nKey="upgradeToProInstead"
- defaults="Upgrade to Pro instead"
- />
- </UpgradeButton>
- </div>
- ) : (
- <Button
- size="xl"
- variant="primary"
- className="w-full"
- onClick={() => {
- posthog?.capture("paywall:premium_poll_upgrade_click", {
- from: trigger?.from,
- setting: trigger?.setting,
- action: trigger?.action,
- poll_id: trigger?.pollId,
- price: premiumPollPriceCents,
- });
- setIsComingSoonVisible(true);
- }}
- >
- <Trans
- i18nKey="premiumPollUpgradeButton"
- defaults="Upgrade this poll"
- />
- </Button>
- ))}
{selectedPlan === "hobby" && (
<Button disabled={true} size="xl" className="w-full">
<Trans i18nKey="currentPlan" defaults="Current plan" />
@@ -546,88 +425,6 @@ export function PayWallDialog({
</KeyBenefits>
</div>
</TabsContent>
- {showPremiumPoll && (
- <TabsContent value="premium-poll" className="space-y-6">
- <DialogHeader>
- <DialogTitle>
- <Trans i18nKey="premiumPoll" defaults="Premium poll" />
- </DialogTitle>
- <DialogDescription>
- <Trans
- i18nKey="premiumPollTabDescription"
- defaults="Pro features for this poll only"
- />
- </DialogDescription>
- </DialogHeader>
- <div className="space-y-3">
- <SubHeading>
- <Trans i18nKey="keyBenefits" defaults="Key benefits" />
- </SubHeading>
- <KeyBenefits>
- <KeyBenefitsItem
- icon={<CalendarCheckIcon />}
- title={
- <Trans
- i18nKey="featureNameSchedule"
- defaults="Schedule poll"
- />
- }
- description={
- <Trans
- i18nKey="schedulePollDescription"
- defaults="Select a final date for your event."
- />
- }
- />
- <KeyBenefitsItem
- icon={<EyeOffIcon />}
- title={
- <Trans
- i18nKey="premiumPollPrivacy"
- defaults="Participant privacy"
- />
- }
- description={
- <Trans
- i18nKey="premiumPollPrivacyDescription"
- defaults="Hide participant names and votes from respondents"
- />
- }
- />
- <KeyBenefitsItem
- icon={<MailCheckIcon />}
- title={
- <Trans
- i18nKey="requireParticipantEmailTitle"
- defaults="Require email"
- />
- }
- description={
- <Trans
- i18nKey="requireParticipantEmailDescription"
- defaults="Participants must provide an email address to respond."
- />
- }
- />
- <KeyBenefitsItem
- icon={<ClockIcon />}
- title={
- <Trans
- i18nKey="premiumPollLifetime"
- defaults="Keep this poll forever"
- />
- }
- description={
- <Trans
- i18nKey="premiumPollLifetimeDescription"
- defaults="This poll is exempt from the 30 day retention limit"
- />
- }
- />
- </KeyBenefits>
- </div>
- </TabsContent>
- )}
</div>
</Tabs>
</DialogContent>