Skip to content

Commit 8a2c0d1

Browse files
committed
fix(site): avoid showing disabled fields in group settings page
Previously we allowed interaction with the icon setter and showed confusing help text under the disabled "Display Name" field.
1 parent 2f6687a commit 8a2c0d1

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

site/src/pages/GroupsPage/SettingsGroupPageView.tsx

+25-19
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,33 @@ const UpdateGroupForm: FC<{
5757
autoFocus
5858
fullWidth
5959
label="Name"
60-
disabled={group.id === group.organization_id}
61-
/>
62-
<TextField
63-
{...getFieldHelpers(
64-
"display_name",
65-
"Optional: keep empty to default to the name.",
66-
)}
67-
onChange={onChangeTrimmed(form)}
68-
autoComplete="display_name"
69-
autoFocus
70-
fullWidth
71-
label="Display Name"
7260
disabled={isEveryoneGroup(group)}
7361
/>
74-
<LazyIconField
75-
{...getFieldHelpers("avatar_url")}
76-
onChange={onChangeTrimmed(form)}
77-
fullWidth
78-
label={t("form.fields.icon")}
79-
onPickEmoji={(value) => form.setFieldValue("avatar_url", value)}
80-
/>
62+
{isEveryoneGroup(group) ? (
63+
<></>
64+
) : (
65+
<>
66+
<TextField
67+
{...getFieldHelpers(
68+
"display_name",
69+
"Optional: keep empty to default to the name.",
70+
)}
71+
onChange={onChangeTrimmed(form)}
72+
autoComplete="display_name"
73+
autoFocus
74+
fullWidth
75+
label="Display Name"
76+
disabled={isEveryoneGroup(group)}
77+
/>
78+
<LazyIconField
79+
{...getFieldHelpers("avatar_url")}
80+
onChange={onChangeTrimmed(form)}
81+
fullWidth
82+
label={t("form.fields.icon")}
83+
onPickEmoji={(value) => form.setFieldValue("avatar_url", value)}
84+
/>
85+
</>
86+
)}
8187
<TextField
8288
{...getFieldHelpers(
8389
"quota_allowance",

0 commit comments

Comments
 (0)