Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
✨ Make require participant email free and on by default for new polls (#3619)
Luke Vella00bc6224babf
diff --git a/apps/landing/public/llms.txt b/apps/landing/public/llms.txtindex 5a565aa26..9ed3665c2 100644--- a/apps/landing/public/llms.txt+++ b/apps/landing/public/llms.txt@@ -17,6 +17,7 @@ Rallly is pronounced like "rally", spelled with three L's.- Unlimited polls and unlimited participants- Up to 3 polls collecting votes at the same time (1 without an account). A poll stops counting once it is finalized or closed.- Finalizing polls and calendar invites+- Require participants to leave an email (on by default)- Video calls with Google Meet, Zoom, Microsoft Teams and Webex- CSV export- No ads@@ -28,7 +29,7 @@ Pro is $10 per seat per month, or $72 per seat per year (prices vary by currency- Unlimited open polls, kept indefinitely- Email invites with per-person response tracking-- Require email, hide participant names, hide votes until someone has voted+- Hide participant names, hide votes until someone has voted- Duplicate polls- Team collaboration in a shared space with seat-based billing- Custom branding and removing "Powered by Rallly"diff --git a/apps/landing/public/locales/en/pricing.json b/apps/landing/public/locales/en/pricing.jsonindex 3c3f4a738..0019d9b44 100644--- a/apps/landing/public/locales/en/pricing.json+++ b/apps/landing/public/locales/en/pricing.json@@ -1,6 +1,6 @@{"advancedPollSettings": "Advanced poll settings",- "advancedPollSettingsDescription": "Require participant emails, hide participant names, and hide votes",+ "advancedPollSettingsPrivacyDescription": "Hide participant names and hide votes","apiAccess": "API access","apiAccessDescription": "Create polls and read results from your own systems. <a>Read the API docs</a>","apiAndWebhooks": "API and webhooks",diff --git a/apps/landing/src/app/[locale]/(main)/pricing/page.tsx b/apps/landing/src/app/[locale]/(main)/pricing/page.tsxindex 8a8f6dee2..e587dcbe5 100644--- a/apps/landing/src/app/[locale]/(main)/pricing/page.tsx+++ b/apps/landing/src/app/[locale]/(main)/pricing/page.tsx@@ -657,8 +657,8 @@ export default async function Page(props: {<Transt={t}ns="pricing"- i18nKey="advancedPollSettingsDescription"- defaults="Require participant emails, hide participant names, and hide votes"+ i18nKey="advancedPollSettingsPrivacyDescription"+ defaults="Hide participant names and hide votes"/></CompareTableFeatureDescription></CompareTableFeature>diff --git a/apps/landing/src/posts/participant-email-by-default.md b/apps/landing/src/posts/participant-email-by-default.mdnew file mode 100644index 000000000..ab3e7b9d8--- /dev/null+++ b/apps/landing/src/posts/participant-email-by-default.md@@ -0,0 +1,26 @@+---+title: Participants now leave an email by default+date: "2026-10-28"+category: Product+excerpt: New polls ask participants for an email, so you can tell everyone the final time and they can change their response later.+---++New polls now ask participants to enter an email address when they respond. That way you can notify everyone when you finalize, and every participant gets a link to change their response later.++## Why++When you [finalize a poll](/blog/finalizing-polls-is-now-free), Rallly sends a calendar invite to everyone who left an email. Until now, leaving one was optional unless you were on Pro and turned on **Require email** before sharing the poll. Most people never did, so polls often ended with a few participants who couldn't be notified, and by the time you noticed it was too late to ask.++Participants lose out too. Without an email there's no link to come back to, so changing a response means finding the original device and browser, or asking the organizer to do it for them.++## What changes++- **Require email** is on by default for new polls you create in Rallly, on every plan. Polls created through the API keep their current default.+- Participants can click **Why?** next to the email field to see what they get for leaving one.+- Existing polls keep their current setting.++If you'd rather let people respond with just their name, for a quick poll in a group chat for example, turn off **Require email** under **Settings** when you create or edit the poll.++If you have any feedback, I'd love to hear it at [[email protected]](mailto:[email protected]).++Happy scheduling :)diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.jsonindex 9725ff01c..15ad5097a 100644--- a/apps/web/public/locales/en/app.json+++ b/apps/web/public/locales/en/app.json@@ -631,6 +631,8 @@"newParticipantDialogSuccessTitle": "Your response has been saved","newParticipantFormAddNote": "Add a note","newParticipantFormDescription": "Fill in the form below to submit your votes.",+ "newParticipantFormEmailDescription": "We'll email you a link to change your response, and the organizer can let you know the final time.",+ "newParticipantFormEmailWhy": "Why?","newParticipantFormErrorPollFull": "This poll is no longer accepting responses.","newParticipantFormErrorTooManyRequests": "You have made too many attempts. Please wait a while and try again.","newParticipantFormErrorUnauthorized": "We couldn't verify your session. Please refresh the page and try again.",@@ -859,6 +861,7 @@"pollResponsesListEmpty": "No responses","pollResponsesListEmptyDescription": "Responses will show up here once participants vote.","pollResponsesListNote": "Note",+ "pollSettingsAdvanced": "Advanced","polls": "Polls","pollsListActions": "Actions","pollsListDates": "Dates",diff --git a/apps/web/src/features/poll/components/create-poll.tsx b/apps/web/src/features/poll/components/create-poll.tsxindex 2fe339e2f..28c3dfcd4 100644--- a/apps/web/src/features/poll/components/create-poll.tsx+++ b/apps/web/src/features/poll/components/create-poll.tsx@@ -160,6 +160,7 @@ export const CreatePoll = ({options: [],hideScores: false,hideParticipants: false,+ requireParticipantEmail: true,enableComments: false,allowTentativeVotes: true,duration: 60,diff --git a/apps/web/src/features/poll/components/forms/poll-settings.test.tsx b/apps/web/src/features/poll/components/forms/poll-settings.test.tsxindex 197fb8184..af45b0c4c 100644--- a/apps/web/src/features/poll/components/forms/poll-settings.test.tsx+++ b/apps/web/src/features/poll/components/forms/poll-settings.test.tsx@@ -1,34 +1,38 @@import { Form } from "@rallly/ui/form";import userEvent from "@testing-library/user-event";import { useForm } from "react-hook-form";-import { describe, expect, it, vi } from "vitest";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { PollSettingsForm } from "@/features/poll/components/forms/poll-settings";import type { PollSettingsFormData } from "@/features/poll/components/forms/types";-import { render, screen } from "@/test/test-utils";+import { render, screen, within } from "@/test/test-utils";vi.mock("@rallly/posthog/client", () => ({posthog: { capture: vi.fn() },}));+const billing = vi.hoisted(() => ({ isFree: false, showPayWall: vi.fn() }));+vi.mock("@/features/billing/client", () => ({- useIsFree: () => false,- showPayWall: vi.fn(),+ useIsFree: () => billing.isFree,+ showPayWall: billing.showPayWall,}));function TestForm({enableComments = false,allowTentativeVotes = true,hasTentativeVotes = false,+ requireParticipantEmail = false,}: {enableComments?: boolean;allowTentativeVotes?: boolean;hasTentativeVotes?: boolean;+ requireParticipantEmail?: boolean;}) {const form = useForm<PollSettingsFormData>({defaultValues: {enableComments,allowTentativeVotes,- requireParticipantEmail: false,+ requireParticipantEmail,hideParticipants: false,hideScores: false,},@@ -40,6 +44,61 @@ function TestForm({);}+describe("PollSettingsForm require email setting on a free space", () => {+ beforeEach(() => {+ billing.isFree = true;+ billing.showPayWall.mockClear();+ });++ afterEach(() => {+ billing.isFree = false;+ });++ it("switches on without the pay wall", async () => {+ const user = userEvent.setup();+ render(<TestForm />);+ const emailSwitch = screen.getByRole("switch", { name: /require email/i });+ await user.click(emailSwitch);+ expect(emailSwitch).toBeChecked();+ expect(billing.showPayWall).not.toHaveBeenCalled();+ });++ it("switches off without the pay wall", async () => {+ const user = userEvent.setup();+ render(<TestForm requireParticipantEmail={true} />);+ const emailSwitch = screen.getByRole("switch", { name: /require email/i });+ await user.click(emailSwitch);+ expect(emailSwitch).not.toBeChecked();+ expect(billing.showPayWall).not.toHaveBeenCalled();+ });++ it("labels the advanced section as Pro instead of each setting", () => {+ render(<TestForm />);+ const advanced = screen.getByRole("group", { name: /advanced/i });+ expect(+ within(advanced).getByText("Unlock with Rallly Pro"),+ ).toBeInTheDocument();+ expect(screen.getAllByText("Unlock with Rallly Pro")).toHaveLength(1);+ expect(+ within(advanced).getByRole("switch", { name: /hide participant names/i }),+ ).toBeInTheDocument();+ expect(+ within(advanced).getByRole("switch", { name: /hide votes/i }),+ ).toBeInTheDocument();+ });++ it("keeps hide participant names behind the pay wall", async () => {+ const user = userEvent.setup();+ render(<TestForm />);+ await user.click(+ screen.getByRole("switch", { name: /hide participant names/i }),+ );+ expect(billing.showPayWall).toHaveBeenCalledWith(+ expect.objectContaining({ setting: "hideParticipants" }),+ );+ });+});+describe("PollSettingsForm comments setting", () => {it("shows comments off by default", () => {render(<TestForm />);diff --git a/apps/web/src/features/poll/components/forms/poll-settings.tsx b/apps/web/src/features/poll/components/forms/poll-settings.tsxindex 0f29d5040..becbd7743 100644--- a/apps/web/src/features/poll/components/forms/poll-settings.tsx+++ b/apps/web/src/features/poll/components/forms/poll-settings.tsx@@ -8,6 +8,8 @@ import {FieldDescription,FieldGroup,FieldLabel,+ FieldLegend,+ FieldSet,} from "@rallly/ui/field";import { FormField } from "@rallly/ui/form";import {@@ -81,7 +83,7 @@ export const PollSettingsForm = ({<Trans i18nKey="settings" /></CardTitle></div>- <CardContent>+ <CardContent className="flex flex-col gap-6"><FieldGroup variant="divided"><FormFieldcontrol={form.control}@@ -97,7 +99,6 @@ export const PollSettingsForm = ({i18nKey="requireParticipantEmailTitle"defaults="Require email"/>- {isFree ? <ProBadge /> : null}</FieldLabel><FieldDescription><Trans@@ -109,93 +110,7 @@ export const PollSettingsForm = ({<Switchid="require-participant-email"checked={!!field.value}- onCheckedChange={(checked) => {- if (checked && isFree) {- showPayWall({- from: "poll-settings",- setting: "requireParticipantEmail",- });- } else {- field.onChange(checked);- }- }}- />- </Field>- )}- />- <FormField- control={form.control}- name="hideParticipants"- render={({ field }) => (- <Field orientation="horizontal">- <SettingIcon>- <VenetianMaskIcon />- </SettingIcon>- <FieldContent>- <FieldLabel htmlFor="hide-participants">- <Trans- i18nKey="hideParticipantsTitle"- defaults="Hide participant names"- />- {isFree ? <ProBadge /> : null}- </FieldLabel>- <FieldDescription>- <Trans- i18nKey="hideParticipantsDescription"- defaults="Participants will not be able to see the names of other respondents."- />- </FieldDescription>- </FieldContent>- <Switch- id="hide-participants"- checked={!!field.value}- onCheckedChange={(checked) => {- if (checked && isFree) {- showPayWall({- from: "poll-settings",- setting: "hideParticipants",- });- } else {- field.onChange(checked);- }- }}- />- </Field>- )}- />- <FormField- control={form.control}- name="hideScores"- render={({ field }) => (- <Field orientation="horizontal">- <SettingIcon>- <BarChart2Icon />- </SettingIcon>- <FieldContent>- <FieldLabel htmlFor="hide-scores">- <Trans i18nKey="hideScoresTitle" defaults="Hide votes" />- {isFree ? <ProBadge /> : null}- </FieldLabel>- <FieldDescription>- <Trans- i18nKey="hideScoresDescription"- defaults="Hide everyone's votes from a participant until they cast their own."- />- </FieldDescription>- </FieldContent>- <Switch- id="hide-scores"- checked={!!field.value}- onCheckedChange={(checked) => {- if (checked && isFree) {- showPayWall({- from: "poll-settings",- setting: "hideScores",- });- } else {- field.onChange(checked);- }- }}+ onCheckedChange={field.onChange}/></Field>)}@@ -324,6 +239,101 @@ export const PollSettingsForm = ({}}/></FieldGroup>+ {/* Plan gated settings share one Pro label on the section instead of+ a badge per row. Each switch still opens the pay wall on a free+ space, so the controls stay enabled. The divider sits on a wrapper+ because a legend cuts into its own fieldset's border. */}+ <div className="border-t pt-4">+ <FieldSet className="gap-0">+ <FieldLegend+ variant="label"+ className="mb-4 flex items-center gap-2"+ >+ <Trans i18nKey="pollSettingsAdvanced" defaults="Advanced" />+ {isFree ? <ProBadge /> : null}+ </FieldLegend>+ <FieldGroup variant="divided">+ <FormField+ control={form.control}+ name="hideParticipants"+ render={({ field }) => (+ <Field orientation="horizontal">+ <SettingIcon>+ <VenetianMaskIcon />+ </SettingIcon>+ <FieldContent>+ <FieldLabel htmlFor="hide-participants">+ <Trans+ i18nKey="hideParticipantsTitle"+ defaults="Hide participant names"+ />+ </FieldLabel>+ <FieldDescription>+ <Trans+ i18nKey="hideParticipantsDescription"+ defaults="Participants will not be able to see the names of other respondents."+ />+ </FieldDescription>+ </FieldContent>+ <Switch+ id="hide-participants"+ checked={!!field.value}+ onCheckedChange={(checked) => {+ if (checked && isFree) {+ showPayWall({+ from: "poll-settings",+ setting: "hideParticipants",+ });+ } else {+ field.onChange(checked);+ }+ }}+ />+ </Field>+ )}+ />+ <FormField+ control={form.control}+ name="hideScores"+ render={({ field }) => (+ <Field orientation="horizontal">+ <SettingIcon>+ <BarChart2Icon />+ </SettingIcon>+ <FieldContent>+ <FieldLabel htmlFor="hide-scores">+ <Trans+ i18nKey="hideScoresTitle"+ defaults="Hide votes"+ />+ </FieldLabel>+ <FieldDescription>+ <Trans+ i18nKey="hideScoresDescription"+ defaults="Hide everyone's votes from a participant until they cast their own."+ />+ </FieldDescription>+ </FieldContent>+ <Switch+ id="hide-scores"+ checked={!!field.value}+ onCheckedChange={(checked) => {+ if (checked && isFree) {+ showPayWall({+ from: "poll-settings",+ setting: "hideScores",+ });+ } else {+ field.onChange(checked);+ }+ }}+ />+ </Field>+ )}+ />+ </FieldGroup>+ </FieldSet>+ </div></CardContent>{children}</Card>diff --git a/apps/web/src/features/poll/components/new-participant-modal.tsx b/apps/web/src/features/poll/components/new-participant-modal.tsxindex 0eff1e0f4..f6b46bb79 100644--- a/apps/web/src/features/poll/components/new-participant-modal.tsx+++ b/apps/web/src/features/poll/components/new-participant-modal.tsx@@ -21,6 +21,7 @@ import {import { Input } from "@rallly/ui/input";import { Label } from "@rallly/ui/label";import { MaxCharLength } from "@rallly/ui/max-char-length";+import { Popover, PopoverContent, PopoverTrigger } from "@rallly/ui/popover";import { SuccessCheck, SuccessCheckIcon } from "@rallly/ui/success-check";import { Textarea } from "@rallly/ui/textarea";import { PlusIcon } from "lucide-react";@@ -184,6 +185,12 @@ export const NewParticipantForm = (props: NewParticipantModalProps) => {});}};+ const emailDescription = (+ <Trans+ i18nKey="newParticipantFormEmailDescription"+ defaults="We'll email you a link to change your response, and the organizer can let you know the final time."+ />+ );const noteLength = watch("note")?.length ?? 0;const [showNote, setShowNote] = React.useState(false);const addParticipant = useAddParticipant();@@ -327,12 +334,35 @@ export const NewParticipantForm = (props: NewParticipantModalProps) => {name="email"render={({ field }) => (<FormItem>- <FormLabel>- {t("email")}- {!isEmailRequired- ? ` ${t("optional", { defaultValue: "(optional)" })}`- : null}- </FormLabel>+ <div className="flex items-center justify-between">+ <FormLabel>+ {t("email")}+ {!isEmailRequired+ ? ` ${t("optional", { defaultValue: "(optional)" })}`+ : null}+ </FormLabel>+ <Popover>+ <PopoverTrigger+ openOnHover={true}+ render={+ <Button+ type="button"+ variant="link"+ size="sm"+ className="h-auto p-0 text-muted-foreground hover:text-foreground"+ />+ }+ >+ <Trans+ i18nKey="newParticipantFormEmailWhy"+ defaults="Why?"+ />+ </PopoverTrigger>+ <PopoverContent side="top" align="end" className="w-64">+ {emailDescription}+ </PopoverContent>+ </Popover>+ </div><FormControl><InputclassName="w-full"@@ -342,6 +372,9 @@ export const NewParticipantForm = (props: NewParticipantModalProps) => {{...field}/></FormControl>+ <FormDescription className="sr-only">+ {emailDescription}+ </FormDescription><FormMessage /></FormItem>)}diff --git a/apps/web/tests/create-delete-poll.spec.ts b/apps/web/tests/create-delete-poll.spec.tsindex 00f61eb66..d60a81599 100644--- a/apps/web/tests/create-delete-poll.spec.ts+++ b/apps/web/tests/create-delete-poll.spec.ts@@ -16,7 +16,12 @@ test.describe.serial(() => {test("create a new poll", async () => {const newPollPage = new NewPollPage(page);await newPollPage.goto();- const pollPage = await newPollPage.create({ name: "Monthly Meetup" });+ // Leaves the require email switch at its default, so the stored value+ // checks what an untouched form submits.+ const pollPage = await newPollPage.create({+ name: "Monthly Meetup",+ requireEmail: true,+ });await pollPage.closeShareDialog();await expect(@@ -24,6 +29,12 @@ test.describe.serial(() => {).toBeVisible();pollId = page.url().match(/\/poll\/([a-zA-Z0-9]+)/)?.[1] ?? "";expect(pollId).not.toBe("");+ expect(+ await prisma.poll.findUnique({+ where: { id: pollId },+ select: { requireParticipantEmail: true },+ }),+ ).toEqual({ requireParticipantEmail: true });});// delete the poll we just createddiff --git a/apps/web/tests/new-poll-page.ts b/apps/web/tests/new-poll-page.tsindex b941a96b6..00e909325 100644--- a/apps/web/tests/new-poll-page.ts+++ b/apps/web/tests/new-poll-page.ts@@ -13,11 +13,17 @@ export class NewPollPage {name,enableComments,allDay,+ requireEmail = false,}: {name: string;enableComments?: boolean;/** Creates a date poll rather than the default time poll. */allDay?: boolean;+ /**+ * Keeps the default of requiring a participant email. Off unless asked+ * for, so specs can respond with just a name.+ */+ requireEmail?: boolean;}): Promise<PollPage> {const page = this.page;@@ -61,6 +67,15 @@ export class NewPollPage {await page.getByTestId("all-day-option").click();}+ const requireEmailSwitch = page.getByRole("switch", {+ name: /require email/i,+ });+ await expect(requireEmailSwitch).toBeChecked();+ if (!requireEmail) {+ await requireEmailSwitch.click();+ await expect(requireEmailSwitch).not.toBeChecked();+ }+if (enableComments) {// Comments are off by default; opt in to the legacy comments settingawait page.getByRole("switch", { name: /comments/i }).click();