From 85caabaedf3b42a58bf65925ba161e3dec0bdaa1 Mon Sep 17 00:00:00 2001 From: gintil Date: Sun, 29 Dec 2024 14:59:31 -0500 Subject: [PATCH] Group checkboxes together with fieldset --- .../CopyUserFeedSettingsDialog/index.tsx | 112 +++++++++------- .../index.tsx | 122 ++++++++++-------- 2 files changed, 129 insertions(+), 105 deletions(-) diff --git a/services/backend-api/client/src/features/feed/components/CopyUserFeedSettingsDialog/index.tsx b/services/backend-api/client/src/features/feed/components/CopyUserFeedSettingsDialog/index.tsx index 2bb9f5b2e..c09a13473 100644 --- a/services/backend-api/client/src/features/feed/components/CopyUserFeedSettingsDialog/index.tsx +++ b/services/backend-api/client/src/features/feed/components/CopyUserFeedSettingsDialog/index.tsx @@ -148,6 +148,7 @@ export const CopyUserFeedSettingsDialog = ({ isOpen, onClose, onCloseRef }: Prop return ( onCheckCategoryChange(category, e.target.checked)} @@ -164,6 +165,7 @@ export const CopyUserFeedSettingsDialog = ({ isOpen, onClose, onCloseRef }: Prop onCheckSettingChange(setting as CopyableUserFeedSettings, e.target.checked) } @@ -206,60 +208,70 @@ export const CopyUserFeedSettingsDialog = ({ isOpen, onClose, onCloseRef }: Prop - - - Settings to Copy - - - {otherSettings.map((setting) => { - const settingDescription = CopyableSettingDescriptions[setting]; +
+ + + + Settings to Copy + + + + {otherSettings.map((setting) => { + const settingDescription = CopyableSettingDescriptions[setting]; - return ( - onCheckSettingChange(setting, e.target.checked)} - isChecked={checkedSettings.includes(setting)} - key={setting} - > - {settingDescription.description} -
- {settingDescription.hint && ( - - {settingDescription.hint} - - )} -
- ); - })} - {checkboxesByCategories} + return ( + onCheckSettingChange(setting, e.target.checked)} + isChecked={checkedSettings.includes(setting)} + key={setting} + > + {settingDescription.description} +
+ {settingDescription.hint && ( + + {settingDescription.hint} + + )} +
+ ); + })} + {checkboxesByCategories} +
- - - - Target Feeds - - - The feeds that will have their settings overwritten with the selected settings from - the source feed. - - - - - - +
+
+ + + + + Target Feeds + + + The feeds that will have their settings overwritten with the selected settings + from the source feed. + + + + + + + + + - - {error && ( - - )} +
+ {error && ( + + )} diff --git a/services/backend-api/client/src/features/feedConnections/components/CopyDiscordChannelConnectingSettingsDialog/index.tsx b/services/backend-api/client/src/features/feedConnections/components/CopyDiscordChannelConnectingSettingsDialog/index.tsx index ce4deef4b..40be0c13c 100644 --- a/services/backend-api/client/src/features/feedConnections/components/CopyDiscordChannelConnectingSettingsDialog/index.tsx +++ b/services/backend-api/client/src/features/feedConnections/components/CopyDiscordChannelConnectingSettingsDialog/index.tsx @@ -239,6 +239,7 @@ export const CopyDiscordChannelConnectionSettingsDialog = ({ return ( onCheckCategoryChange(category, e.target.checked)} @@ -268,6 +269,7 @@ export const CopyDiscordChannelConnectionSettingsDialog = ({ return ( onCheckSettingChange( @@ -321,65 +323,75 @@ export const CopyDiscordChannelConnectionSettingsDialog = ({ {connection?.name} - - - Settings to Copy - - Settings to copy from the source connection. - - {checkboxesByCategories} - {otherSettings.map((setting) => { - const settingDescription = CopyableSettingDescriptions[setting]; +
+ + + + + Settings to Copy + + Settings to copy from the source connection. + + + + {checkboxesByCategories} + {otherSettings.map((setting) => { + const settingDescription = CopyableSettingDescriptions[setting]; - if ( - setting === CopyableConnectionDiscordChannelSettings.Channel && - !connection.details.channel - ) { - return null; - } + if ( + setting === CopyableConnectionDiscordChannelSettings.Channel && + !connection.details.channel + ) { + return null; + } - return ( - onCheckSettingChange(setting, e.target.checked)} - isChecked={checkedSettings.includes(setting)} - key={setting} - > - {settingDescription.description} -
- {settingDescription.hint && ( - - {settingDescription.hint} - - )} -
- ); - })} + return ( + onCheckSettingChange(setting, e.target.checked)} + isChecked={checkedSettings.includes(setting)} + key={setting} + > + {settingDescription.description} +
+ {settingDescription.hint && ( + + {settingDescription.hint} + + )} +
+ ); + })} +
- - - - Target Connections - - - The connections that will have their settings overwritten with the selected settings - from the source connection. - - - - - - - +
+
+ + + + Target Connections + + + The connections that will have their settings overwritten with the selected + settings from the source connection. + + + + + + + + + - +
{error && (