[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} handleClose={handleHide}
/> />
<main className='channel-notifications-settings-modal__body'> <main className='channel-notifications-settings-modal__body'>
<ModalSection <fieldset aria-labelledby='channel-notifications-settings-modal-legend'>
title={formatMessage({ <ModalSection
id: 'channel_notifications.muteAndIgnore', title={
defaultMessage: 'Mute or ignore', <legend
})} style={{all: 'unset'}}
content={muteOrIgnoreSectionContent} id='channel-notifications-settings-modal-legend'
/> >
{formatMessage({
id: 'channel_notifications.muteAndIgnore',
defaultMessage: 'Mute or ignore',
})}
</legend>
}
content={muteOrIgnoreSectionContent}
/>
</fieldset>
{desktopAndMobileNotificationSectionContent} {desktopAndMobileNotificationSectionContent}
{props.collapsedReplyThreads && {props.collapsedReplyThreads &&
<> <>

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

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

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

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