[MA-50]: Provide fieldsets for groups of form controls (#29905)

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Saurabh Sharma
2025-01-28 21:43:38 +05:30
коммит произвёл GitHub
родитель b333902bef
Коммит 1999ff9263
4 изменённых файлов: 535 добавлений и 420 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@@ -364,13 +364,22 @@ export default function ChannelNotificationsModal(props: Props) {
handleClose={handleHide}
/>
<main className='channel-notifications-settings-modal__body'>
<ModalSection
title={formatMessage({
id: 'channel_notifications.muteAndIgnore',
defaultMessage: 'Mute or ignore',
})}
content={muteOrIgnoreSectionContent}
/>
<fieldset aria-labelledby='channel-notifications-settings-modal-legend'>
<ModalSection
title={
<legend
style={{all: 'unset'}}
id='channel-notifications-settings-modal-legend'
>
{formatMessage({
id: 'channel_notifications.muteAndIgnore',
defaultMessage: 'Mute or ignore',
})}
</legend>
}
content={muteOrIgnoreSectionContent}
/>
</fieldset>
{desktopAndMobileNotificationSectionContent}
{props.collapsedReplyThreads &&
<>

Просмотреть файл

@@ -60,12 +60,16 @@
&__fieldset-checkbox-ctr {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 5px;
gap: 8px;
}
&__fieldset-checkbox {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 0;
cursor: pointer;
font-size: 14px;
gap: 8px;

Просмотреть файл

@@ -37,22 +37,26 @@ export default function CheckboxSettingItem({
descriptionAboveContent = false,
}: Props) {
const content = (
<fieldset
<div
key={inputFieldData.name}
className='mm-modal-generic-section-item__fieldset-checkbox-ctr'
>
<label className='mm-modal-generic-section-item__fieldset-checkbox'>
<input
className='mm-modal-generic-section-item__input-checkbox'
data-testid={inputFieldData.dataTestId}
type='checkbox'
name={inputFieldData.name}
checked={inputFieldValue}
onChange={(e) => handleChange(e.target.checked)}
/>
<input
className='mm-modal-generic-section-item__input-checkbox'
data-testid={inputFieldData.dataTestId}
type='checkbox'
name={inputFieldData.name}
id={inputFieldData.name.replaceAll(' ', '-')}
checked={inputFieldValue}
onChange={(e) => handleChange(e.target.checked)}
/>
<label
htmlFor={inputFieldData.name.replaceAll(' ', '-')}
className='mm-modal-generic-section-item__fieldset-checkbox'
>
{inputFieldTitle}
</label>
</fieldset>
</div>
);
return (