Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix spacing regression in user settings - roles & permissions #10993

Merged
merged 4 commits into from
May 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion res/css/views/settings/_JoinRuleSettings.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ limitations under the License.

.mx_JoinRuleSettings_radioButton {
padding-top: 16px;
margin-bottom: 8px;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrapper sets gap so this is not needed.


.mx_StyledRadioButton_content {
margin-left: 14px;
Expand Down
2 changes: 2 additions & 0 deletions res/css/views/settings/_ProfileSettings.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ limitations under the License.
}

.mx_ProfileSettings_profile_controls_topic {
margin-top: $spacing-8;

& > textarea {
font-family: inherit;
resize: vertical;
Expand Down
6 changes: 6 additions & 0 deletions res/css/views/settings/_SettingsFieldset.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ limitations under the License.
}
}
}

.mx_SettingsFieldset_content {
display: flex;
flex-direction: column;
gap: $spacing-8;
}
2 changes: 1 addition & 1 deletion src/components/views/settings/SettingsFieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const SettingsFieldset: React.FC<Props> = ({ legend, className, children, descri
<SettingsSubsectionText>{description}</SettingsSubsectionText>
</div>
)}
{children}
<div className="mx_SettingsFieldset_content">{children}</div>
</fieldset>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
label = _t("Send %(eventType)s events", { eventType });
}
return (
<div className="" key={eventType}>
<div key={eventType}>
<PowerSelector
label={label}
value={eventsLevels[eventType]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ exports[`<SettingsFieldset /> renders fieldset with plain text description 1`] =
Changes to who can read history.
</div>
</div>
<div>
test
<div
class="mx_SettingsFieldset_content"
>
<div>
test
</div>
</div>
</fieldset>
</DocumentFragment>
Expand Down Expand Up @@ -54,8 +58,12 @@ exports[`<SettingsFieldset /> renders fieldset with react description 1`] = `
</a>
</div>
</div>
<div>
test
<div
class="mx_SettingsFieldset_content"
>
<div>
test
</div>
</div>
</fieldset>
</DocumentFragment>
Expand All @@ -72,8 +80,12 @@ exports[`<SettingsFieldset /> renders fieldset without description 1`] = `
>
Who can read history?
</legend>
<div>
test
<div
class="mx_SettingsFieldset_content"
>
<div>
test
</div>
</div>
</fieldset>
</DocumentFragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@ exports[`RolesRoomSettingsTab Banned users renders banned users 1`] = `
>
Banned users
</legend>
<ul
class="mx_RolesRoomSettingsTab_bannedList"
<div
class="mx_SettingsFieldset_content"
>
<li>
<span
title="Banned by @alice:server.org"
>
<strong>
@bob:server.org
</strong>

Reason: just testing
</span>
</li>
</ul>
<ul
class="mx_RolesRoomSettingsTab_bannedList"
>
<li>
<span
title="Banned by @alice:server.org"
>
<strong>
@bob:server.org
</strong>

Reason: just testing
</span>
</li>
</ul>
</div>
</fieldset>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -18,91 +18,95 @@ exports[`<SecurityRoomSettingsTab /> history visibility uses shared as default h
Changes to who can read history will only apply to future messages in this room. The visibility of existing history will be unchanged.
</div>
</div>
<label
class="mx_StyledRadioButton mx_StyledRadioButton_enabled"
<div
class="mx_SettingsFieldset_content"
>
<input
id="historyVis-world_readable"
name="historyVis"
type="radio"
value="world_readable"
/>
<div>
<div />
</div>
<div
class="mx_StyledRadioButton_content"
<label
class="mx_StyledRadioButton mx_StyledRadioButton_enabled"
>
Anyone
</div>
<div
class="mx_StyledRadioButton_spacer"
/>
</label>
<label
class="mx_StyledRadioButton mx_StyledRadioButton_enabled mx_StyledRadioButton_checked"
>
<input
checked=""
id="historyVis-shared"
name="historyVis"
type="radio"
value="shared"
/>
<div>
<div />
</div>
<div
class="mx_StyledRadioButton_content"
<input
id="historyVis-world_readable"
name="historyVis"
type="radio"
value="world_readable"
/>
<div>
<div />
</div>
<div
class="mx_StyledRadioButton_content"
>
Anyone
</div>
<div
class="mx_StyledRadioButton_spacer"
/>
</label>
<label
class="mx_StyledRadioButton mx_StyledRadioButton_enabled mx_StyledRadioButton_checked"
>
Members only (since the point in time of selecting this option)
</div>
<div
class="mx_StyledRadioButton_spacer"
/>
</label>
<label
class="mx_StyledRadioButton mx_StyledRadioButton_enabled"
>
<input
id="historyVis-invited"
name="historyVis"
type="radio"
value="invited"
/>
<div>
<div />
</div>
<div
class="mx_StyledRadioButton_content"
<input
checked=""
id="historyVis-shared"
name="historyVis"
type="radio"
value="shared"
/>
<div>
<div />
</div>
<div
class="mx_StyledRadioButton_content"
>
Members only (since the point in time of selecting this option)
</div>
<div
class="mx_StyledRadioButton_spacer"
/>
</label>
<label
class="mx_StyledRadioButton mx_StyledRadioButton_enabled"
>
Members only (since they were invited)
</div>
<div
class="mx_StyledRadioButton_spacer"
/>
</label>
<label
class="mx_StyledRadioButton mx_StyledRadioButton_enabled"
>
<input
id="historyVis-joined"
name="historyVis"
type="radio"
value="joined"
/>
<div>
<div />
</div>
<div
class="mx_StyledRadioButton_content"
<input
id="historyVis-invited"
name="historyVis"
type="radio"
value="invited"
/>
<div>
<div />
</div>
<div
class="mx_StyledRadioButton_content"
>
Members only (since they were invited)
</div>
<div
class="mx_StyledRadioButton_spacer"
/>
</label>
<label
class="mx_StyledRadioButton mx_StyledRadioButton_enabled"
>
Members only (since they joined)
</div>
<div
class="mx_StyledRadioButton_spacer"
/>
</label>
<input
id="historyVis-joined"
name="historyVis"
type="radio"
value="joined"
/>
<div>
<div />
</div>
<div
class="mx_StyledRadioButton_content"
>
Members only (since they joined)
</div>
<div
class="mx_StyledRadioButton_spacer"
/>
</label>
</div>
</fieldset>
`;

Expand Down
Loading