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

RTL layout compatibility: bridges list on room settings page #8243

Merged
merged 22 commits into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
157 changes: 86 additions & 71 deletions res/css/views/dialogs/_RoomSettingsDialogBridges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,84 +22,99 @@ limitations under the License.
margin: 0;
padding: 0;
}
}

.mx_RoomSettingsDialog_BridgeList li {
list-style-type: none;
padding: 5px;
margin-bottom: 8px;
border-width: 1px 1px;
border-color: $primary-hairline-color;
border-style: solid;
border-radius: 5px;
li {
list-style-type: none;

.column-icon {
float: left;
padding-right: 10px;
&.mx_RoomSettingsDialog_BridgeList_listItem {
display: flex;
flex-wrap: wrap;
gap: $spacing-8;
padding: 5px;
margin-bottom: $spacing-8;

* {
// border-style around each bridge list item
border-width: 1px 1px;
border-color: $primary-hairline-color;
border-style: solid;
border-radius: 5px;
border: 1px solid $input-darker-bg-color;
}

.noProtocolIcon {
width: 48px;
height: 48px;
background: $input-darker-bg-color;
border-radius: 5px;
}

.protocol-icon {
float: left;
margin-right: 5px;
img {
border-radius: 5px;
border-width: 1px 1px;
border-color: $primary-hairline-color;
.column_icon {
.protocolIcon,
.protocolIcon span,
.noProtocolIcon {
box-sizing: border-box;
border-radius: 5px;
border: 1px solid $input-darker-bg-color;
}

.noProtocolIcon,
.protocolIcon img {
border-radius: 5px;
}

.noProtocolIcon {
width: 48px;
height: 48px;
background: $input-darker-bg-color;
}

.protocolIcon {
img {
border-width: 1px 1px;
border-color: $primary-hairline-color;
}

span {
/* Correct letter placement */
left: auto;
Copy link
Contributor Author

@luixxiul luixxiul Apr 6, 2022

Choose a reason for hiding this comment

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

This might be no longer necessary thanks to box-sizing above, but I'll keep this for now.

}
}
}
span {
/* Correct letter placement */
left: auto;
}
}
}

.column-data {
display: inline-block;
width: 85%;

> h3 {
margin-top: 0px;
margin-bottom: 0px;
font-size: 16pt;
color: $primary-content;
}

> * {
margin-top: 4px;
margin-bottom: 0;
}

.workspace-channel-details {
color: $primary-content;
font-weight: 600;

.channel {
margin-left: 5px;
}
}

.metadata {
color: $muted-fg-color;
margin-bottom: 0;
overflow-y: visible;
text-overflow: ellipsis;
white-space: normal;
padding: 0;

> li {
padding: 0;
border: 0;
.column_data {
display: inline-block;
width: 85%;

.column_data_details,
.column_data_metadata,
.column_data_metadata li,
.column_data_protocolName {
margin-bottom: 0;
}

.column_data_details,
.column_data_metadata {
margin-top: $spacing-4;
}

.column_data_metadata li {
margin-top: $spacing-8;
}

.column_data_protocolName {
margin-top: 0;
font-size: 16pt;
color: $primary-content;
}

.workspace_channel_details {
color: $primary-content;
font-weight: 600;
t3chguy marked this conversation as resolved.
Show resolved Hide resolved

.channel {
margin-inline-start: 5px;
}
}

.metadata {
color: $muted-fg-color;
margin-bottom: 0;
overflow-y: visible;
text-overflow: ellipsis;
white-space: normal;
padding: 0;
}
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions src/components/views/settings/BridgeTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default class BridgeTile extends React.PureComponent<IProps> {
if (protocol.avatar_url) {
const avatarUrl = mediaFromMxc(protocol.avatar_url).getSquareThumbnailHttp(64);

networkIcon = <BaseAvatar className="protocol-icon"
networkIcon = <BaseAvatar className="protocolIcon"
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
width={48}
height={48}
resizeMethod='crop'
Expand Down Expand Up @@ -146,19 +146,19 @@ export default class BridgeTile extends React.PureComponent<IProps> {
}

const id = this.props.ev.getId();
return (<li key={id}>
<div className="column-icon">
return (<li key={id} className="mx_RoomSettingsDialog_BridgeList_listItem">
<div className="column_icon">
{ networkIcon }
</div>
<div className="column-data">
<h3>{ protocolName }</h3>
<p className="workspace-channel-details">
<div className="column_data">
<h3 className="column_data_protocolName">{ protocolName }</h3>
<p className="column_data_details workspace_channel_details">
{ networkItem }
<span className="channel">{ _t("Channel: <channelLink/>", {}, {
channelLink: () => channelLink,
}) }</span>
</p>
<ul className="metadata">
<ul className="column_data_metadata metadata">
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
{ creator } { bot }
</ul>
</div>
Expand Down