From 2b1e0b0281144f3da4167fdba56c022dfeeae08c Mon Sep 17 00:00:00 2001 From: Walter Galvao Date: Wed, 29 Jan 2025 21:48:55 -0300 Subject: [PATCH] fix(web): digests form ux --- .../digest-base-fields/digest-base-fields.tsx | 46 ++++++++++++++----- .../digests/settings/team-metrics/page.tsx | 2 +- .../[id]/digests/settings/team-wip/page.tsx | 2 +- .../app/teams/[id]/digests/settings/types.ts | 7 ++- 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/apps/web/src/app/teams/[id]/digests/settings/components/digest-base-fields/digest-base-fields.tsx b/apps/web/src/app/teams/[id]/digests/settings/components/digest-base-fields/digest-base-fields.tsx index 33a3829..7358691 100644 --- a/apps/web/src/app/teams/[id]/digests/settings/components/digest-base-fields/digest-base-fields.tsx +++ b/apps/web/src/app/teams/[id]/digests/settings/components/digest-base-fields/digest-base-fields.tsx @@ -4,16 +4,17 @@ import { Stack, Title, Switch, - TextInput, Divider, Select, Box, InputLabel, Chip, Group, + Input, + Text, } from "@mantine/core"; import { DigestFrequency } from "@sweetr/graphql-types/api"; -import { IconBrandSlack, IconClock, IconWorld } from "@tabler/icons-react"; +import { IconClock, IconInfoCircle, IconWorld } from "@tabler/icons-react"; import { BoxSetting } from "../../../../../../../components/box-setting"; import { SelectHour } from "../../../../../../../components/select-hour"; import { SelectTimezone } from "../../../../../../../components/select-timezone/select-timezone"; @@ -51,14 +52,34 @@ export const DigestBaseFields = ({ form }: DigestBaseFieldsProps) => { {isEnabled && ( - } - placeholder="#team" - {...form.getInputProps("channel")} - /> + <> + + Channel + + + #} + flex="1" + {...form.getInputProps("channel")} + /> + {form.getInputProps("channel").error && ( + + {form.getInputProps("channel").error} + + )} + + + + )} + + + + Tip: Sweetr is only able to auto join public channels. You must + manually invite @Sweetr to private channels. + + {isEnabled && ( @@ -69,7 +90,8 @@ export const DigestBaseFields = ({ form }: DigestBaseFieldsProps) => { Schedule