From d8e22f91671ccb0445cbd499b2474504629489b8 Mon Sep 17 00:00:00 2001
From: Ayush Kumar <2580ayush2580@gmail.com>
Date: Tue, 19 Jan 2021 19:41:18 +0530
Subject: [PATCH 001/864] Improve room directory UX for mobile devices
---
res/css/structures/_RoomDirectory.scss | 37 ++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/res/css/structures/_RoomDirectory.scss b/res/css/structures/_RoomDirectory.scss
index 29e6fecd34..a683c1d8f7 100644
--- a/res/css/structures/_RoomDirectory.scss
+++ b/res/css/structures/_RoomDirectory.scss
@@ -161,3 +161,40 @@ limitations under the License.
padding: 0;
}
}
+
+@media screen and (max-width: 600px) {
+ .mx_RoomDirectory_table tr {
+ margin-bottom: 15px !important;
+ }
+
+ .mx_RoomDirectory_roomMemberCount {
+ padding: 0px;
+ }
+
+ .mx_AccessibleButton_kind_secondary {
+ padding: 0px !important;
+ }
+
+ .mx_RoomDirectory_join {
+ margin-left: 0px;
+ }
+
+ .mx_RoomDirectory_alias {
+ margin-top: 10px;
+ margin-bottom: 10px;
+ }
+
+ .mx_RoomDirectory_roomDescription {
+ padding-bottom: 0px;
+ }
+
+ .mx_RoomDirectory_name {
+ margin-bottom: 5px;
+ }
+
+ .mx_RoomDirectory_table tr td {
+ margin-top: 5px !important;
+ display: block;
+ text-align: left;
+ }
+}
\ No newline at end of file
From 498bcafd88344389e46927318ff17d263072e716 Mon Sep 17 00:00:00 2001
From: Ayush Kumar <2580ayush2580@gmail.com>
Date: Tue, 19 Jan 2021 20:45:25 +0530
Subject: [PATCH 002/864] removed style-link error
---
res/css/structures/_RoomDirectory.scss | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/res/css/structures/_RoomDirectory.scss b/res/css/structures/_RoomDirectory.scss
index a683c1d8f7..c7a660da43 100644
--- a/res/css/structures/_RoomDirectory.scss
+++ b/res/css/structures/_RoomDirectory.scss
@@ -197,4 +197,4 @@ limitations under the License.
display: block;
text-align: left;
}
-}
\ No newline at end of file
+}
From 131f499c25828b0c52401ca7556c14b78f23bbbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
+ " It’s not recommended to make end-to-end encrypted rooms public. It " +
+ "means anyone can find and join this room, so anyone can read messages. You’ll " +
+ "get none of the benefits of encryption. Encrypting messages in a public room " +
+ "will also likely make receiving and sending messages slower than necessary.",
+ null,
+ { "b": (sub) => { sub } },
+ )} { _t(
+ "To avoid these issues, create a new public room for the conversation " +
+ "you plan to have.",
+ null,
+ { "a": (sub) => {
+ dialog.close();
+ this.createNewRoom(true);
+ }}> {sub} },
+ )} { _t(
+ " It’s not recommended to turn on encryption on for public rooms. " +
+ "Anyone can find and join public rooms, so anyone can read messages. You’ll " +
+ "get none of the benefits of encryption, and you won't be able to turn it " +
+ "off later. Encrypting messages in a public room will also likely make " +
+ "receiving and sending messages slower than necessary.",
+ null,
+ { "b": (sub) => { sub } },
+ )} { _t(
+ "To avoid these issues, create a new private encrypted room for " +
+ "the conversation you plan to have.",
+ null,
+ { "a": (sub) => {
+ dialog.close();
+ this.createNewRoom(false, true);
+ }}> {sub} },
+ )}
{ _t( - " It’s not recommended to turn on encryption on for public rooms. " + - "Anyone can find and join public rooms, so anyone can read messages. You’ll " + - "get none of the benefits of encryption, and you won't be able to turn it " + - "off later. Encrypting messages in a public room will also likely make " + - "receiving and sending messages slower than necessary.", + " It’s not recommended to add encryption to public rooms. " + + "Anyone can find and join public rooms, so anyone can read messages in them. " + + "You’ll get none of the benefits of encryption, and you won’t be able to turn it " + + "off later. Encrypting messages in a public room will make receiving and sending " + + "messages slower.", null, { "b": (sub) => { sub } }, ) }
@@ -236,10 +236,10 @@ export default class SecurityRoomSettingsTab extends React.Component{ _t( - " It’s not recommended to make end-to-end encrypted rooms public. It " + - "means anyone can find and join this room, so anyone can read messages. You’ll " + - "get none of the benefits of encryption. Encrypting messages in a public room " + - "will also likely make receiving and sending messages slower than necessary.", + " It’s not recommended to make encrypted rooms public. It " + + "It will mean anyone can find and join the room, so anyone can read messages. " + + "You’ll get none of the benefits of encryption. Encrypting messages in a public " + + "room will make receiving and sending messages slower.", null, { "b": (sub) => { sub } }, ) }
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 2ab0ea56a4..fc97f9d0ec 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1427,13 +1427,13 @@ "Permissions": "Permissions", "Select the roles required to change various parts of the room": "Select the roles required to change various parts of the room", "Are you sure you want to add encryption to this public room?": "Are you sure you want to add encryption to this public room?", - " It’s not recommended to turn on encryption on for public rooms. Anyone can find and join public rooms, so anyone can read messages. You’ll get none of the benefits of encryption, and you won't be able to turn it off later. Encrypting messages in a public room will also likely make receiving and sending messages slower than necessary.": " It’s not recommended to turn on encryption on for public rooms. Anyone can find and join public rooms, so anyone can read messages. You’ll get none of the benefits of encryption, and you won't be able to turn it off later. Encrypting messages in a public room will also likely make receiving and sending messages slower than necessary.", + " It’s not recommended to add encryption to public rooms. Anyone can find and join public rooms, so anyone can read messages in them. You’ll get none of the benefits of encryption, and you won’t be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to add encryption to public rooms. Anyone can find and join public rooms, so anyone can read messages in them. You’ll get none of the benefits of encryption, and you won’t be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.", "To avoid these issues, create a new private encrypted room for the conversation you plan to have.": "To avoid these issues, create a new private encrypted room for the conversation you plan to have.", "Enable encryption?": "Enable encryption?", "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.": "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.", "This upgrade will allow members of selected spaces access to this room without an invite.": "This upgrade will allow members of selected spaces access to this room without an invite.", "Are you sure you want to make this encrypted room public?": "Are you sure you want to make this encrypted room public?", - " It’s not recommended to make end-to-end encrypted rooms public. It means anyone can find and join this room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will also likely make receiving and sending messages slower than necessary.": " It’s not recommended to make end-to-end encrypted rooms public. It means anyone can find and join this room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will also likely make receiving and sending messages slower than necessary.", + " It’s not recommended to make encrypted rooms public. It It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to make encrypted rooms public. It It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.", "To avoid these issues, create a new public room for the conversation you plan to have.": "To avoid these issues, create a new public room for the conversation you plan to have.", "To link to this room, please add an address.": "To link to this room, please add an address.", "Private (invite only)": "Private (invite only)", From 168a32902e8da185184fef34722936e144c45076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- "To avoid these issues, create a new private encrypted room for " +
+ "To avoid these issues, create a new encrypted room for " +
"the conversation you plan to have.",
null,
{ "a": (sub) => {
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index fc97f9d0ec..a00a8e1c9b 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1428,7 +1428,7 @@
"Select the roles required to change various parts of the room": "Select the roles required to change various parts of the room",
"Are you sure you want to add encryption to this public room?": "Are you sure you want to add encryption to this public room?",
" It’s not recommended to add encryption to public rooms. Anyone can find and join public rooms, so anyone can read messages in them. You’ll get none of the benefits of encryption, and you won’t be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to add encryption to public rooms. Anyone can find and join public rooms, so anyone can read messages in them. You’ll get none of the benefits of encryption, and you won’t be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.",
- "To avoid these issues, create a new private encrypted room for the conversation you plan to have.": "To avoid these issues, create a new private encrypted room for the conversation you plan to have.",
+ "To avoid these issues, create a new encrypted room for the conversation you plan to have.": "To avoid these issues, create a new encrypted room for the conversation you plan to have.",
"Enable encryption?": "Enable encryption?",
"Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.": "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.",
"This upgrade will allow members of selected spaces access to this room without an invite.": "This upgrade will allow members of selected spaces access to this room without an invite.",
From e0762827feac962267fa8f59e18d9b8a81d126b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- " It’s not recommended to make encrypted rooms public. It " +
+ " It’s not recommended to make encrypted rooms public. " +
"It will mean anyone can find and join the room, so anyone can read messages. " +
"You’ll get none of the benefits of encryption. Encrypting messages in a public " +
"room will make receiving and sending messages slower.",
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index a00a8e1c9b..f20d7db6c8 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1433,7 +1433,7 @@
"Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.": "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.",
"This upgrade will allow members of selected spaces access to this room without an invite.": "This upgrade will allow members of selected spaces access to this room without an invite.",
"Are you sure you want to make this encrypted room public?": "Are you sure you want to make this encrypted room public?",
- " It’s not recommended to make encrypted rooms public. It It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to make encrypted rooms public. It It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.",
+ " It’s not recommended to make encrypted rooms public. It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to make encrypted rooms public. It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.",
"To avoid these issues, create a new public room for the conversation you plan to have.": "To avoid these issues, create a new public room for the conversation you plan to have.",
"To link to this room, please add an address.": "To link to this room, please add an address.",
"Private (invite only)": "Private (invite only)",
From 6f37e8b223cb99fa7a36fab883b5f411e184e2f4 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 29 Jul 2021 12:16:59 +0100
Subject: [PATCH 050/864] Use getChildren instead of getSpaceSummary as MSC2946
has moved on
---
.../structures/SpaceRoomDirectory.tsx | 51 ++++++++++---------
src/stores/SpaceStore.tsx | 22 ++++----
test/test-utils.js | 4 +-
3 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/src/components/structures/SpaceRoomDirectory.tsx b/src/components/structures/SpaceRoomDirectory.tsx
index 038c1df514..195c31e959 100644
--- a/src/components/structures/SpaceRoomDirectory.tsx
+++ b/src/components/structures/SpaceRoomDirectory.tsx
@@ -18,7 +18,7 @@ import React, { ReactNode, useMemo, useState } from "react";
import { Room } from "matrix-js-sdk/src/models/room";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { EventType, RoomType } from "matrix-js-sdk/src/@types/event";
-import { ISpaceSummaryRoom, ISpaceSummaryEvent } from "matrix-js-sdk/src/@types/spaces";
+import { IRoomChild, IRoomChildState } from "matrix-js-sdk/src/@types/spaces";
import classNames from "classnames";
import { sortBy } from "lodash";
@@ -50,11 +50,11 @@ interface IHierarchyProps {
initialText?: string;
refreshToken?: any;
additionalButtons?: ReactNode;
- showRoom(room: ISpaceSummaryRoom, viaServers?: string[], autoJoin?: boolean): void;
+ showRoom(room: IRoomChild, viaServers?: string[], autoJoin?: boolean): void;
}
interface ITileProps {
- room: ISpaceSummaryRoom;
+ room: IRoomChild;
suggested?: boolean;
selected?: boolean;
numChildRooms?: number;
@@ -205,7 +205,7 @@ const Tile: React.FC { _t("Your server does not support showing space hierarchies.") } { _t("Your server does not support showing space hierarchies.") } { _t("Your server does not support showing space hierarchies.") } { _t("Your server does not support showing space hierarchies.") } { _t(
"To avoid these issues, create a new encrypted room for " +
From 67062dab88707b4c1fe26553969c08efb1cfed20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- " It’s not recommended to add encryption to public rooms. " +
+ "It's not recommended to add encryption to public rooms." +
"Anyone can find and join public rooms, so anyone can read messages in them. " +
"You’ll get none of the benefits of encryption, and you won’t be able to turn it " +
"off later. Encrypting messages in a public room will make receiving and sending " +
From 94f915a4363dc4379e9e92b0ba02881581951fc6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- "To avoid these issues, create a new encrypted room for " +
+ "To avoid these issues, create a new encrypted room for " +
"the conversation you plan to have.",
null,
{ "a": (sub) => {
From 1e9437db7bd17c686cec55cd2b69551542243e9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- " It’s not recommended to make encrypted rooms public. " +
+ "It's not recommended to make encrypted rooms public. " +
"It will mean anyone can find and join the room, so anyone can read messages. " +
- "You’ll get none of the benefits of encryption. Encrypting messages in a public " +
+ "You'll get none of the benefits of encryption. Encrypting messages in a public " +
"room will make receiving and sending messages slower.",
null,
- { "b": (sub) => { sub } },
+ { "b": (sub) => { sub } },
) } { _t(
- "To avoid these issues, create a new public room for the conversation " +
+ "To avoid these issues, create a new public room for the conversation " +
"you plan to have.",
null,
{
From 1b8aae9556814e977e776d8cb8bbed3429af554f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?=
- { _t("You can also create a Space from a community.", {}, {
+ { _t("You can also make Spaces from communities.", {}, {
a: sub => FLn
}
@@ -571,8 +569,6 @@ export const SpaceHierarchy: React.FC
}
>;
} else {
- results = { _t("No results found") }
{ _t("Explore rooms") }
- { _t("No results found") }
From a3ca2abae386eb921c54f0f528219c8584bbb59d Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Fri, 30 Jul 2021 11:11:21 +0100
Subject: [PATCH 054/864] i18n
---
src/i18n/strings/en_EN.json | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index ef4537bddf..a960af9f79 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -2812,8 +2812,6 @@
"No results found": "No results found",
"You may want to try a different search or check for typos.": "You may want to try a different search or check for typos.",
"Search names and descriptions": "Search names and descriptions",
- "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.",
- "Create room": "Create room",
"Spaces are a beta feature.": "Spaces are a beta feature.",
"Public space": "Public space",
"Private space": "Private space",
From 1c2dc13fa330fe2de05d6bfabaaf1028428e8c66 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Fri, 30 Jul 2021 12:12:49 +0100
Subject: [PATCH 055/864] factor our observer hook
---
src/components/structures/SpaceHierarchy.tsx | 48 +++++++++++---------
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a/src/components/structures/SpaceHierarchy.tsx b/src/components/structures/SpaceHierarchy.tsx
index f1f5d70fa6..f13fc7f208 100644
--- a/src/components/structures/SpaceHierarchy.tsx
+++ b/src/components/structures/SpaceHierarchy.tsx
@@ -365,6 +365,31 @@ export const useSpaceSummary = (space: Room): {
return { loading, rooms, hierarchy, loadMore };
};
+const useIntersectionObserver = (callback: () => void) => {
+ const handleObserver = (entries: IntersectionObserverEntry[]) => {
+ const target = entries[0];
+ if (target.isIntersecting) {
+ callback();
+ }
+ };
+
+ const observerRef = useRef{ _t("Invite people") }
From 79cf69bedb776175c3c7409394091f3bef76c24e Mon Sep 17 00:00:00 2001
From: Paulo Pinto x=aMkkM*yXWUhCaEDgO9L-
zk4n2$3(7geye0(JDgW_Yvb_Ui4J@O>>i4UG@0o@IRt%rWO(3YztomiZXsaf`^3P%t
znrZ?y=m9Lq4YCQ0hYmFojUj$D7+985E0hutfOQDR18OHQ?FPYSnT{`w4B=ZEY6PZd
znjx@n0!77wmiEK9-ud}>2&@=BxSt2LTj^@;9BAdxciq-PCNOo>IjR7)
zC#4uO#_kfD+fHhDW_D)UZABkbb!IYYW%`Q4#ne%gsq>eWd3kMWZG%wt&1c_y_4TLr
zQNtMh`ZVvGUi)C
FVgj<&T_8eAId6<9Gl(128oD(>?O
zfYh5n6_kfo=9d5