Skip to content

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

🔥 Remove comments phase-out notice and legacy badge (#3080)

Luke Vellaea5628d37c5a
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index 1d52b991c..3fb15a64f 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -149,8 +149,6 @@
"commentPlaceholder": "Leave a comment on this poll (visible to everyone)",
"comments": "Comments",
"commentsSettingDescription": "Allow participants to post public comments on the poll.",
- "commentsSettingLegacyBadge": "Legacy",
- "commentsSettingPhaseOutHint": "Comments are being phased out. Participants can include a note with their response instead.",
"commentsSettingTitle": "Comments",
"commentsSheetDescription": "View and add comments on this poll",
"commentsSheetEmpty": "No comments yet",
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.tsx
index e1801e60b..d2645f6e6 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
@@ -32,39 +32,21 @@ function TestForm({ enableComments = false }: { enableComments?: boolean }) {
}
describe("PollSettingsForm comments setting", () => {
- it("shows comments off by default with a legacy badge and no hint", () => {
+ it("shows comments off by default", () => {
render(<TestForm />);
- const commentsSwitch = screen.getByRole("switch", { name: /comments/i });
- expect(commentsSwitch).not.toBeChecked();
- expect(screen.getByText("Legacy")).toBeInTheDocument();
- expect(
- screen.queryByText(/comments are being phased out/i),
- ).not.toBeInTheDocument();
+ expect(screen.getByRole("switch", { name: /comments/i })).not.toBeChecked();
});
- it("reveals the phase out hint when comments are switched on", async () => {
+ it("can be switched on", async () => {
const user = userEvent.setup();
render(<TestForm />);
const commentsSwitch = screen.getByRole("switch", { name: /comments/i });
await user.click(commentsSwitch);
expect(commentsSwitch).toBeChecked();
- expect(
- screen.getByText(/participants can include a note with their response/i),
- ).toBeInTheDocument();
});
- it("shows the hint immediately for polls that already have comments enabled", () => {
+ it("reflects polls that already have comments enabled", () => {
render(<TestForm enableComments={true} />);
expect(screen.getByRole("switch", { name: /comments/i })).toBeChecked();
- expect(
- screen.getByText(/comments are being phased out/i),
- ).toBeInTheDocument();
- });
-
- it("renders the phase out hint as an alert", () => {
- render(<TestForm enableComments={true} />);
- expect(screen.getByRole("alert")).toHaveTextContent(
- /comments are being phased out/i,
- );
});
});
diff --git a/apps/web/src/features/poll/components/forms/poll-settings.tsx b/apps/web/src/features/poll/components/forms/poll-settings.tsx
index 2a683073b..5fdf4a52b 100644
--- a/apps/web/src/features/poll/components/forms/poll-settings.tsx
+++ b/apps/web/src/features/poll/components/forms/poll-settings.tsx
@@ -1,8 +1,6 @@
"use client";
import { posthog } from "@rallly/posthog/client";
-import { Alert, AlertDescription } from "@rallly/ui/alert";
-import { Badge } from "@rallly/ui/badge";
import { Card, CardContent, CardTitle } from "@rallly/ui/card";
import {
Field,
@@ -15,7 +13,6 @@ import { FormField } from "@rallly/ui/form";
import { Switch } from "@rallly/ui/switch";
import {
BarChart2Icon,
- InfoIcon,
MailIcon,
MessageCircleIcon,
VenetianMaskIcon,
@@ -161,54 +158,32 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
control={form.control}
name="enableComments"
render={({ field }) => (
- <div className="flex flex-col gap-3">
- <Field orientation="horizontal">
- <SettingIcon>
- <MessageCircleIcon />
- </SettingIcon>
- <FieldContent>
- <FieldLabel htmlFor="enable-comments">
- <Trans
- i18nKey="commentsSettingTitle"
- defaults="Comments"
- />
- <Badge size="sm">
- <Trans
- i18nKey="commentsSettingLegacyBadge"
- defaults="Legacy"
- />
- </Badge>
- </FieldLabel>
- <FieldDescription>
- <Trans
- i18nKey="commentsSettingDescription"
- defaults="Allow participants to post public comments on the poll."
- />
- </FieldDescription>
- </FieldContent>
- <Switch
- id="enable-comments"
- checked={!!field.value}
- onCheckedChange={(checked) => {
- field.onChange(checked);
- posthog?.capture("poll_settings:comments_toggle_click", {
- enabled: checked,
- });
- }}
- />
- </Field>
- {field.value ? (
- <Alert variant="info">
- <InfoIcon />
- <AlertDescription>
- <Trans
- i18nKey="commentsSettingPhaseOutHint"
- defaults="Comments are being phased out. Participants can include a note with their response instead."
- />
- </AlertDescription>
- </Alert>
- ) : null}
- </div>
+ <Field orientation="horizontal">
+ <SettingIcon>
+ <MessageCircleIcon />
+ </SettingIcon>
+ <FieldContent>
+ <FieldLabel htmlFor="enable-comments">
+ <Trans i18nKey="commentsSettingTitle" defaults="Comments" />
+ </FieldLabel>
+ <FieldDescription>
+ <Trans
+ i18nKey="commentsSettingDescription"
+ defaults="Allow participants to post public comments on the poll."
+ />
+ </FieldDescription>
+ </FieldContent>
+ <Switch
+ id="enable-comments"
+ checked={!!field.value}
+ onCheckedChange={(checked) => {
+ field.onChange(checked);
+ posthog?.capture("poll_settings:comments_toggle_click", {
+ enabled: checked,
+ });
+ }}
+ />
+ </Field>
)}
/>
</FieldGroup>