From ca4d506391d796e51b49394b247e33024a641070 Mon Sep 17 00:00:00 2001 From: wmwragg Date: Mon, 22 Aug 2016 22:47:00 +0100 Subject: [PATCH] Header wording for capped truncation count updated --- src/components/structures/RoomSubList.js | 10 +++++++++- .../vector/css/vector-web/structures/RoomSubList.css | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index e4ca6edbf..a60951f9e 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -328,16 +328,24 @@ var RoomSubList = React.createClass({ _getHeaderJsx: function() { var TintableSvg = sdk.getComponent("elements.TintableSvg"); + var chevronClasses = classNames({ 'mx_RoomSubList_chevron': true, 'mx_RoomSubList_chevronUp': this.state.hidden, 'mx_RoomSubList_chevronRight': !this.state.hidden && this.state.capTruncate, 'mx_RoomSubList_chevronDown': !this.state.hidden && !this.state.capTruncate, }); + + var roomCount = this.props.list.length > 0 ? this.props.list.length : ''; + var isTruncatable = this.props.list.length > TRUNCATE_AT; + if (!this.state.hidden && this.state.capTruncate && isTruncatable) { + roomCount = TRUNCATE_AT + " of " + roomCount; + } + return (
{ this.props.collapsed ? '' : this.props.label } -
{this.props.list.length > 0 ? this.props.list.length : ''}
+
{roomCount}
0
diff --git a/src/skins/vector/css/vector-web/structures/RoomSubList.css b/src/skins/vector/css/vector-web/structures/RoomSubList.css index 974cf3e71..aeef4a424 100644 --- a/src/skins/vector/css/vector-web/structures/RoomSubList.css +++ b/src/skins/vector/css/vector-web/structures/RoomSubList.css @@ -44,6 +44,7 @@ limitations under the License. font-weight: normal; color: #76cfa6; padding-left: 5px; + text-transform: none; } .collapsed .mx_RoomSubList_roomCount {