From 8d203043d40ad6959405b4b115893213ed7b6a16 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 12:47:27 +0000 Subject: [PATCH] Remove hide/show behaviour --- .../dialogs/_RoomSettingsDialogBridges.scss | 18 ++++------- src/components/views/settings/BridgeTile.tsx | 32 ++++++------------- 2 files changed, 15 insertions(+), 35 deletions(-) diff --git a/res/css/views/dialogs/_RoomSettingsDialogBridges.scss b/res/css/views/dialogs/_RoomSettingsDialogBridges.scss index a1793cc75e..c97a3b69b7 100644 --- a/res/css/views/dialogs/_RoomSettingsDialogBridges.scss +++ b/res/css/views/dialogs/_RoomSettingsDialogBridges.scss @@ -89,24 +89,18 @@ limitations under the License. } } - .mx_showMore { - display: block; - text-align: left; - margin-top: 10px; - } - .metadata { color: $muted-fg-color; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; margin-bottom: 0; - } - - .metadata.visible { overflow-y: visible; text-overflow: ellipsis; white-space: normal; + padding: 0; + + > li { + padding: 0; + border: 0; + } } } } diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index f38e97ee9b..ae8faec489 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -33,26 +33,16 @@ interface IProps { room: Room; } -interface IState { - visible: boolean; +/** } @replaceableComponentTs("views.settings.BridgeTile") -export default class BridgeTile extends React.PureComponent { +export default class BridgeTile extends React.PureComponent { static propTypes = { ev: PropTypes.object.isRequired, room: PropTypes.object.isRequired, } - state = { - visible: false, - } - - _toggleVisible() { - this.setState({ - visible: !this.state.visible, - }); - } render() { const content = this.props.ev.getContent(); @@ -63,24 +53,24 @@ export default class BridgeTile extends React.PureComponent { let creator = null; if (content.creator) { - creator = _t("This bridge was provisioned by .", {}, { + creator =
  • {_t("This bridge was provisioned by .", {}, { user: () => , - }); + })}
  • ; } - const bot = _t("This bridge is managed by .", {}, { + const bot =
  • {_t("This bridge is managed by .", {}, { user: () => , - }); + })}
  • ; let networkIcon; @@ -103,7 +93,6 @@ export default class BridgeTile extends React.PureComponent { } const id = this.props.ev.getId(); - const metadataClassname = "metadata" + (this.state.visible ? " visible" : ""); return (
  • {networkIcon} @@ -114,12 +103,9 @@ export default class BridgeTile extends React.PureComponent { {_t("Workspace: %(networkName)s", {networkName})} {_t("Channel: %(channelName)s", {channelName})}

    -

    +

      {creator} {bot} -

      - - { this.state.visible ? _t("Show less") : _t("Show more") } - +
  • ); }