Skip to content

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

♻️ Use SettingIcon for the remaining setting rows (#2889)

Luke Vella10f592d5b79b
diff --git a/apps/web/src/app/[locale]/(space)/settings/general/page-client.tsx b/apps/web/src/app/[locale]/(space)/settings/general/page-client.tsx
index 16239b09b..8759a64fc 100644
--- a/apps/web/src/app/[locale]/(space)/settings/general/page-client.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/general/page-client.tsx
@@ -10,7 +10,6 @@ import {
FieldTitle,
} from "@rallly/ui/field";
import { EyeIcon, LogOutIcon, TrashIcon } from "lucide-react";
-import { PageIcon } from "@/components/page-icons";
import {
PageSection,
PageSectionContent,
@@ -19,6 +18,7 @@ import {
PageSectionHeader,
PageSectionTitle,
} from "@/components/page-layout";
+import { SettingIcon } from "@/components/setting-icon";
import {
SettingsPage,
SettingsPageContent,
@@ -85,11 +85,9 @@ export function GeneralSettingsPageClient() {
<FieldGroup variant="divided">
{!isOwner ? (
<Field orientation="responsive">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <LogOutIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <LogOutIcon />
+ </SettingIcon>
<FieldContent>
<FieldTitle>
<Trans i18nKey="leaveSpace" defaults="Leave space" />
@@ -109,11 +107,9 @@ export function GeneralSettingsPageClient() {
) : null}
{canDeleteSpace ? (
<Field orientation="responsive">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <TrashIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <TrashIcon />
+ </SettingIcon>
<FieldContent>
<FieldTitle>
<Trans
diff --git a/apps/web/src/app/[locale]/(space)/settings/notifications/notifications-page.tsx b/apps/web/src/app/[locale]/(space)/settings/notifications/notifications-page.tsx
index a254b1fa5..969ec7627 100644
--- a/apps/web/src/app/[locale]/(space)/settings/notifications/notifications-page.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/notifications/notifications-page.tsx
@@ -11,7 +11,6 @@ import { toast } from "@rallly/ui/sonner";
import { Switch } from "@rallly/ui/switch";
import { InboxIcon, MessageCircleIcon } from "lucide-react";
import React from "react";
-import { PageIcon } from "@/components/page-icons";
import {
PageSection,
PageSectionContent,
@@ -20,6 +19,7 @@ import {
PageSectionHeader,
PageSectionTitle,
} from "@/components/page-layout";
+import { SettingIcon } from "@/components/setting-icon";
import { updateNotificationPreferenceAction } from "@/features/notifications/actions";
import type {
ActivityEventType,
@@ -70,11 +70,9 @@ export function NotificationsPage({
<PageSectionContent>
<FieldGroup variant="divided">
<Field orientation="horizontal">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <InboxIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <InboxIcon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="notify-new-response">
<Trans i18nKey="notifyNewResponse" defaults="New response" />
@@ -95,11 +93,9 @@ export function NotificationsPage({
/>
</Field>
<Field orientation="horizontal">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <MessageCircleIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <MessageCircleIcon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="notify-new-comment">
<Trans i18nKey="notifyNewComment" defaults="New comment" />
diff --git a/apps/web/src/app/[locale]/(space)/settings/preferences/components/localization-preferences.tsx b/apps/web/src/app/[locale]/(space)/settings/preferences/components/localization-preferences.tsx
index 81896fc99..8990bfe32 100644
--- a/apps/web/src/app/[locale]/(space)/settings/preferences/components/localization-preferences.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/preferences/components/localization-preferences.tsx
@@ -26,7 +26,7 @@ import {
import Link from "next/link";
import React from "react";
import { LanguageSelect } from "@/components/language-selector";
-import { PageIcon } from "@/components/page-icons";
+import { SettingIcon } from "@/components/setting-icon";
import { TimeZoneSelect } from "@/components/time-zone-picker/time-zone-select";
import { updateLocalizationAction } from "@/features/user/actions";
import { Trans, useTranslation } from "@/i18n/client";
@@ -94,11 +94,9 @@ export const LocalizationPreferences = ({
<div>
<FieldGroup variant="divided">
<Field orientation="responsive">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <LanguagesIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <LanguagesIcon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="language-select">
<Trans i18nKey="language" defaults="Language" />
@@ -139,11 +137,9 @@ export const LocalizationPreferences = ({
/>
</Field>
<Field orientation="responsive">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <GlobeIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <GlobeIcon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="time-zone-select">
<Trans i18nKey="timeZone" defaults="Time zone" />
@@ -172,11 +168,9 @@ export const LocalizationPreferences = ({
/>
</Field>
<Field orientation="responsive">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <ClockIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <ClockIcon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="time-format-select">
<Trans i18nKey="timeFormat" defaults="Time format" />
@@ -216,11 +210,9 @@ export const LocalizationPreferences = ({
</Select>
</Field>
<Field orientation="responsive">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <CalendarIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <CalendarIcon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="week-start-select">
<Trans i18nKey="startOfWeek" defaults="Start of week" />
diff --git a/apps/web/src/app/[locale]/(space)/settings/profile/components/delete-account-setting.tsx b/apps/web/src/app/[locale]/(space)/settings/profile/components/delete-account-setting.tsx
index f76eca331..22dcfee71 100644
--- a/apps/web/src/app/[locale]/(space)/settings/profile/components/delete-account-setting.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/profile/components/delete-account-setting.tsx
@@ -6,7 +6,7 @@ import {
FieldTitle,
} from "@rallly/ui/field";
import { TriangleAlertIcon } from "lucide-react";
-import { PageIcon } from "@/components/page-icons";
+import { SettingIcon } from "@/components/setting-icon";
import { getScheduledDeletionDate } from "@/features/user/account-deletion/utils";
import { Trans } from "@/i18n/client";
import { getSession } from "@/lib/auth";
@@ -28,11 +28,9 @@ export async function PendingDeletionSetting({
return (
<Field orientation="responsive">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <TriangleAlertIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <TriangleAlertIcon />
+ </SettingIcon>
<FieldContent>
<FieldTitle>
<Trans i18nKey="deleteAccount" defaults="Delete account" />
@@ -57,11 +55,9 @@ export function DeleteAccountSetting({
}) {
return (
<Field orientation="responsive">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <TriangleAlertIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <TriangleAlertIcon />
+ </SettingIcon>
<FieldContent>
<FieldTitle>
<Trans i18nKey="deleteAccount" defaults="Delete account" />
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 faf116b62..2a683073b 100644
--- a/apps/web/src/features/poll/components/forms/poll-settings.tsx
+++ b/apps/web/src/features/poll/components/forms/poll-settings.tsx
@@ -21,7 +21,7 @@ import {
VenetianMaskIcon,
} from "lucide-react";
import { useFormContext } from "react-hook-form";
-import { PageIcon } from "@/components/page-icons";
+import { SettingIcon } from "@/components/setting-icon";
import { showPayWall, useIsFree } from "@/features/billing/client";
import { ProBadge } from "@/features/billing/components/pro-badge";
import type { PollSettingsFormData } from "@/features/poll/components/forms/types";
@@ -45,11 +45,9 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
name="requireParticipantEmail"
render={({ field }) => (
<Field orientation="horizontal">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <MailIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <MailIcon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="require-participant-email">
<Trans
@@ -87,11 +85,9 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
name="hideParticipants"
render={({ field }) => (
<Field orientation="horizontal">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <VenetianMaskIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <VenetianMaskIcon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="hide-participants">
<Trans
@@ -129,11 +125,9 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
name="hideScores"
render={({ field }) => (
<Field orientation="horizontal">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <BarChart2Icon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <BarChart2Icon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="hide-scores">
<Trans i18nKey="hideScoresTitle" defaults="Hide votes" />
@@ -169,11 +163,9 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
render={({ field }) => (
<div className="flex flex-col gap-3">
<Field orientation="horizontal">
- <div className="@md/field-group:block hidden">
- <PageIcon size="lg">
- <MessageCircleIcon />
- </PageIcon>
- </div>
+ <SettingIcon>
+ <MessageCircleIcon />
+ </SettingIcon>
<FieldContent>
<FieldLabel htmlFor="enable-comments">
<Trans