diff --git a/res/css/structures/_RoomSearch.scss b/res/css/structures/_RoomSearch.scss index e1902dca179..b3679ca05b6 100644 --- a/res/css/structures/_RoomSearch.scss +++ b/res/css/structures/_RoomSearch.scss @@ -97,12 +97,15 @@ limitations under the License. } &.mx_RoomSearch_minimized { - height: auto; - width: auto; - padding: 5px; + height: 32px; + min-height: 32px; + width: 32px; + box-sizing: border-box; .mx_RoomSearch_icon { - margin-left: 0; + margin: 0 auto; + padding: 1px; + align-self: center; } &:hover { diff --git a/src/components/structures/RoomSearch.tsx b/src/components/structures/RoomSearch.tsx index 80b50245dd4..c7854c74532 100644 --- a/src/components/structures/RoomSearch.tsx +++ b/src/components/structures/RoomSearch.tsx @@ -188,7 +188,7 @@ export default class RoomSearch extends React.PureComponent { 'mx_RoomSearch_inputExpanded': this.state.query || this.state.focused, }); - let icon = ( + const icon = (
); @@ -207,29 +207,12 @@ export default class RoomSearch extends React.PureComponent { /> ); - let clearButton = ( - - ); - let shortcutPrompt =
{ isMac ? "⌘ K" : _t(ALTERNATE_KEY_NAME[Key.CONTROL]) + " K" }
; if (this.props.isMinimized) { - icon = ( - - ); input = null; - clearButton = null; shortcutPrompt = null; } @@ -241,6 +224,14 @@ export default class RoomSearch extends React.PureComponent {
} { shortcutPrompt } ; + } else if (this.props.isMinimized) { + return + { icon } + ; } return ( @@ -248,7 +239,12 @@ export default class RoomSearch extends React.PureComponent { { icon } { input } { shortcutPrompt } - { clearButton } + ); } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 74f10b80008..eabf4de6875 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -3097,8 +3097,8 @@ "If you can't find the room you're looking for, ask for an invite or Create a new room.": "If you can't find the room you're looking for, ask for an invite or Create a new room.", "Explore rooms in %(communityName)s": "Explore rooms in %(communityName)s", "Filter": "Filter", - "Clear filter": "Clear filter", "Filter rooms and people": "Filter rooms and people", + "Clear filter": "Clear filter", "You can't send any messages until you review and agree to our terms and conditions.": "You can't send any messages until you review and agree to our terms and conditions.", "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.": "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.", "Your message wasn't sent because this homeserver has been blocked by it's administrator. Please contact your service administrator to continue using the service.": "Your message wasn't sent because this homeserver has been blocked by it's administrator. Please contact your service administrator to continue using the service.",