From 36120738525816f8442ab49aded73a7e0f96f766 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 2 Apr 2020 15:12:19 +0100 Subject: [PATCH 1/3] Nuke the icon_person.svg DM Indicator as it causes more confusion than it solves. Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- res/img/icon_person.svg | 23 ------------------- src/components/views/rooms/RoomBreadcrumbs.js | 12 ---------- src/components/views/rooms/RoomTile.js | 14 ----------- 3 files changed, 49 deletions(-) delete mode 100644 res/img/icon_person.svg diff --git a/res/img/icon_person.svg b/res/img/icon_person.svg deleted file mode 100644 index 4be70df0db..0000000000 --- a/res/img/icon_person.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - 815EF7DE-169A-4322-AE2A-B65CBE91DCED - Created with sketchtool. - - - - - - - - - - - - - - - - - - diff --git a/src/components/views/rooms/RoomBreadcrumbs.js b/src/components/views/rooms/RoomBreadcrumbs.js index 1d433c9a40..86c0d7ca96 100644 --- a/src/components/views/rooms/RoomBreadcrumbs.js +++ b/src/components/views/rooms/RoomBreadcrumbs.js @@ -363,17 +363,6 @@ export default class RoomBreadcrumbs extends React.Component { badge =
{r.formattedCount}
; } - let dmIndicator; - if (this._isDmRoom(r.room) && !SettingsStore.isFeatureEnabled("feature_cross_signing")) { - dmIndicator = {_t("Direct; - } - return ( {badge} - {dmIndicator} {tooltip} ); diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 0b06be48af..448f856b50 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -479,20 +479,7 @@ export default createReactClass({ let ariaLabel = name; - let dmIndicator; let dmOnline; - /* Post-cross-signing we don't show DM indicators at all, instead relying on user - context to let them know when that is. */ - if (dmUserId && !SettingsStore.isFeatureEnabled("feature_cross_signing")) { - dmIndicator = dm; - } - const { room } = this.props; const member = room.getMember(dmUserId); if ( @@ -557,7 +544,6 @@ export default createReactClass({
- { dmIndicator } { e2eIcon }
From a28aa4c0b44702ede672f252e161aed37bd7aa03 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 2 Apr 2020 15:13:19 +0100 Subject: [PATCH 2/3] Tweak user online dot in room tile, make it occupy same space and inverse behaviour of the context menu button Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- res/css/views/rooms/_RoomTile.scss | 31 +++++++++++++++++-------- res/css/views/rooms/_UserOnlineDot.scss | 4 ++-- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/res/css/views/rooms/_RoomTile.scss b/res/css/views/rooms/_RoomTile.scss index 31d887cbbb..aa8a77de78 100644 --- a/res/css/views/rooms/_RoomTile.scss +++ b/res/css/views/rooms/_RoomTile.scss @@ -24,6 +24,20 @@ limitations under the License. margin: 0; padding: 0 8px 0 10px; position: relative; + + .mx_RoomTile_menuButton { + display: none; + flex: 0 0 16px; + height: 16px; + background-image: url('$(res)/img/icon_context.svg'); + background-repeat: no-repeat; + background-position: center; + } + + .mx_UserOnlineDot { + display: block; + margin-right: 5px; + } } .mx_RoomTile:focus { @@ -31,15 +45,6 @@ limitations under the License. background-color: $roomtile-focused-bg-color; } -.mx_RoomTile_menuButton { - display: none; - flex: 0 0 16px; - height: 16px; - background-image: url('$(res)/img/icon_context.svg'); - background-repeat: no-repeat; - background-position: center; -} - .mx_RoomTile_tooltip { display: inline-block; position: relative; @@ -151,7 +156,10 @@ limitations under the License. } .mx_RoomTile_menuButton { - display: none; //no design for this for now + display: none; // no design for this for now + } + .mx_UserOnlineDot { + display: none; // no design for this for now } } @@ -164,6 +172,9 @@ limitations under the License. .mx_RoomTile_menuButton { display: block; } + .mx_UserOnlineDot { + display: none; + } } .mx_RoomTile_unreadNotify .mx_RoomTile_badge, diff --git a/res/css/views/rooms/_UserOnlineDot.scss b/res/css/views/rooms/_UserOnlineDot.scss index 339e5cc48a..f9da8648ed 100644 --- a/res/css/views/rooms/_UserOnlineDot.scss +++ b/res/css/views/rooms/_UserOnlineDot.scss @@ -17,7 +17,7 @@ limitations under the License. .mx_UserOnlineDot { border-radius: 50%; background-color: $accent-color; - height: 5px; - width: 5px; + height: 6px; + width: 6px; display: inline-block; } From 1ae370b97eca7d9d6ef13b1c05fc6776968528ca Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 2 Apr 2020 15:20:35 +0100 Subject: [PATCH 3/3] Pull feature_presence_in_room_list out of labs. Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/RoomTile.js | 5 +---- src/i18n/strings/en_EN.json | 3 +-- src/settings/Settings.js | 6 ------ 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 448f856b50..87d288561c 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -482,10 +482,7 @@ export default createReactClass({ let dmOnline; const { room } = this.props; const member = room.getMember(dmUserId); - if ( - member && member.membership === "join" && room.getJoinedMemberCount() === 2 && - SettingsStore.isFeatureEnabled("feature_presence_in_room_list") - ) { + if (member && member.membership === "join" && room.getJoinedMemberCount() === 2) { const UserOnlineDot = sdk.getComponent('rooms.UserOnlineDot'); dmOnline = ; } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 24a6568d82..163b3ad341 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -393,7 +393,6 @@ "Render simple counters in room header": "Render simple counters in room header", "Multiple integration managers": "Multiple integration managers", "Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)", - "Show a presence dot next to DMs in the room list": "Show a presence dot next to DMs in the room list", "Support adding custom themes": "Support adding custom themes", "Enable cross-signing to verify per-user instead of per-session (in development)": "Enable cross-signing to verify per-user instead of per-session (in development)", "Enable local event indexing and E2EE search (requires restart)": "Enable local event indexing and E2EE search (requires restart)", @@ -1075,7 +1074,6 @@ "Seen by %(userName)s at %(dateTime)s": "Seen by %(userName)s at %(dateTime)s", "Seen by %(displayName)s (%(userName)s) at %(dateTime)s": "Seen by %(displayName)s (%(userName)s) at %(dateTime)s", "Replying": "Replying", - "Direct Chat": "Direct Chat", "Room %(name)s": "Room %(name)s", "Recent rooms": "Recent rooms", "No rooms to show": "No rooms to show", @@ -1815,6 +1813,7 @@ "Forget": "Forget", "Favourite": "Favourite", "Low Priority": "Low Priority", + "Direct Chat": "Direct Chat", "Clear status": "Clear status", "Update status": "Update status", "Set status": "Set status", diff --git a/src/settings/Settings.js b/src/settings/Settings.js index 0d72017878..df3bf91b17 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -131,12 +131,6 @@ export const SETTINGS = { supportedLevels: LEVELS_FEATURE, default: false, }, - "feature_presence_in_room_list": { - isFeature: true, - displayName: _td("Show a presence dot next to DMs in the room list"), - supportedLevels: LEVELS_FEATURE, - default: false, - }, "feature_custom_themes": { isFeature: true, displayName: _td("Support adding custom themes"),