Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX improvements for XSSS #453

Merged
merged 9 commits into from
Mar 16, 2023
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/matrix-react-sdk/src/components/structures/MatrixChat.tsx b/node_modules/matrix-react-sdk/src/components/structures/MatrixChat.tsx
index 97d623a..2a02d90 100644
index 97d623a..ed0daf5 100644
--- a/node_modules/matrix-react-sdk/src/components/structures/MatrixChat.tsx
+++ b/node_modules/matrix-react-sdk/src/components/structures/MatrixChat.tsx
@@ -32,6 +32,8 @@ import { throttle } from "lodash";
Expand Down Expand Up @@ -28,7 +28,7 @@ index 97d623a..2a02d90 100644
+ //this listener can be forced with forceLegacyIncomingRoomKeyVerification
+ //or is added only if the xs is not active
+ if(TchapUIFeature.forceLegacyIncomingRoomKeyVerification ||
+ !TchapUIFeature.isCrossSigningAndSecureStorageActive()){
+ !TchapUIFeature.isCrossSigningAndSecureStorageActive){
odelcroi marked this conversation as resolved.
Show resolved Hide resolved
+ const krh = new KeyRequestHandler(cli);
+ cli.on(CryptoEvent.RoomKeyRequest, (req) => {
+ krh.handleKeyRequest(req);
Expand All @@ -44,7 +44,7 @@ index 97d623a..2a02d90 100644
if (MatrixClientPeg.get().isCryptoEnabled()) {
const blacklistEnabled = SettingsStore.getValueAt(
diff --git a/node_modules/matrix-react-sdk/src/components/views/settings/CrossSigningPanel.tsx b/node_modules/matrix-react-sdk/src/components/views/settings/CrossSigningPanel.tsx
index b04714e..8adbba3 100644
index b04714e..30c9c24 100644
--- a/node_modules/matrix-react-sdk/src/components/views/settings/CrossSigningPanel.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/settings/CrossSigningPanel.tsx
@@ -28,6 +28,7 @@ import ConfirmDestroyCrossSigningDialog from "../dialogs/security/ConfirmDestroy
Expand All @@ -60,7 +60,7 @@ index b04714e..8adbba3 100644
}

+ // :TCHAP: hide cross-signing actions if cross-signing is not supported
+ if (!TchapUIFeature.isCrossSigningAndSecureStorageActive()) {
+ if (!TchapUIFeature.isCrossSigningAndSecureStorageActive) {
odelcroi marked this conversation as resolved.
Show resolved Hide resolved
+ actionRow = null;
+ }
+ // end :TCHAP:
Expand Down Expand Up @@ -115,7 +115,7 @@ index 56fdb5e..d67fb6d 100644
return this.state.crossSigningInfo
.checkDeviceTrust(this.state.crossSigningInfo, deviceInfo, false, true)
diff --git a/node_modules/matrix-react-sdk/src/components/views/settings/SecureBackupPanel.tsx b/node_modules/matrix-react-sdk/src/components/views/settings/SecureBackupPanel.tsx
index 2e6e6fb..dae664a 100644
index 2e6e6fb..4eb56f2 100644
--- a/node_modules/matrix-react-sdk/src/components/views/settings/SecureBackupPanel.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/settings/SecureBackupPanel.tsx
@@ -30,6 +30,7 @@ import AccessibleButton from "../elements/AccessibleButton";
Expand All @@ -126,16 +126,82 @@ index 2e6e6fb..dae664a 100644

interface IState {
loading: boolean;
@@ -460,6 +461,12 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
@@ -244,25 +245,27 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
if (MatrixClientPeg.get().getKeyBackupEnabled()) {
statusDescription = <p>✅ {_t("This session is backing up your keys. ")}</p>;
} else {
- statusDescription = (
odelcroi marked this conversation as resolved.
Show resolved Hide resolved
- <>
- <p>
- {_t(
- "This session is <b>not backing up your keys</b>, " +
- "but you do have an existing backup you can restore from " +
- "and add to going forward.",
- {},
- { b: (sub) => <b>{sub}</b> },
- )}
- </p>
- <p>
- {_t(
- "Connect this session to key backup before signing out to avoid " +
- "losing any keys that may only be on this session.",
- )}
- </p>
- </>
- );
+ // :TCHAP remove unecessary complex text
+ // statusDescription = (
+ // <>
+ // <p>
+ // {_t(
+ // "This session is <b>not backing up your keys</b>, " +
+ // "but you do have an existing backup you can restore from " +
+ // "and add to going forward.",
+ // {},
+ // { b: (sub) => <b>{sub}</b> },
+ // )}
+ // </p>
+ // <p>
+ // {_t(
+ // "Connect this session to key backup before signing out to avoid " +
+ // "losing any keys that may only be on this session.",
+ // )}
+ // </p>
+ // </>
+ // );
+ // :end TCHAP
restoreButtonCaption = _t("Connect this session to Key Backup");
}

@@ -460,17 +463,30 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
let actionRow;
if (actions.length) {
actionRow = <div className="mx_SecureBackupPanel_buttonRow">{actions}</div>;
+ // :TCHAP: hide action buttons if secure storage is not supported
+ // actionRow = <div className="mx_SecureBackupPanel_buttonRow">{actions}</div>;
+ if (!TchapUIFeature.isCrossSigningAndSecureStorageActive()) {
+ if (!TchapUIFeature.isCrossSigningAndSecureStorageActive) {
odelcroi marked this conversation as resolved.
Show resolved Hide resolved
+ actionRow = null;
+ }
+ // end :TCHAP:
}

return (
<div>
- <p>
+ {/* TCHAP change complex text to simpler one
+ <p>
{_t(
odelcroi marked this conversation as resolved.
Show resolved Hide resolved
"Back up your encryption keys with your account data in case you " +
"lose access to your sessions. Your keys will be secured with a " +
"unique Security Key.",
)}
</p>
+ */}
+ <p>
+ {_t("This function allows you to save your messages automatically and retrieve them anytime thanks to a recovery Code.")}
+ </p>
+ {/* end TCHAP */}
+
{statusDescription}
<details>
<summary>{_t("Advanced")}</summary>
35 changes: 21 additions & 14 deletions patches/patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
]
},
"change-keys-in-room-summary-card": {
"comments" : "add RoomContextMenu and SpacePreferencesDialog under the same patch (same update)",
"github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/365",
"comments": "add RoomContextMenu and SpacePreferencesDialog under the same patch (same update)",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/365",
"package": "matrix-react-sdk",
"files": [
"src/components/views/right_panel/RoomSummaryCard.tsx",
Expand All @@ -142,8 +142,8 @@
]
},
"cross-signing-ui": {
"comments" : "reword cross-signing dialogs and remove confirmation dialog",
"github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/406",
"comments": "reword cross-signing dialogs and remove confirmation dialog",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/406",
"package": "matrix-react-sdk",
"files": [
"src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx",
Expand All @@ -153,40 +153,40 @@
]
},
"temp-settings-remove-enable-email-notifications-option": {
"comments" : "Notifications by email is currently not activated on Tchap backend. So we must remove this option.",
"github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/405",
"comments": "Notifications by email is currently not activated on Tchap backend. So we must remove this option.",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/405",
"package": "matrix-react-sdk",
"files": [
"src/components/views/settings/Notifications.tsx"
]
},
"green-confirmation-shield" : {
"comments" : "When finishing a session verification with mobile using the QR code, we need the shield image to be green on all clients.",
"github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/432",
"comments": "When finishing a session verification with mobile using the QR code, we need the shield image to be green on all clients.",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/432",
"package": "matrix-react-sdk",
"files": [
"res/css/views/rooms/_E2EIcon.pcss"
]
},
"fix-inviting-a-person-already-present-in-the-room" : {
"comments" : "When inviting by its email adress someone already in the room, the error message was wrong and break the invitation process",
"github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/394",
"comments": "When inviting by its email adress someone already in the room, the error message was wrong and break the invitation process",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/394",
"package": "matrix-react-sdk",
"files": [
"src/utils/MultiInviter.ts"
]
},
"activate-cross-signing-and-secure-storage-js": {
"comments" : "introduce a feature flag for activating cross signing and secure storage",
"github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/433",
"comments": "introduce a feature flag for activating cross signing and secure storage",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/433",
"package": "matrix-js-sdk",
"files": [
"src/client.ts"
]
},
"activate-cross-signing-and-secure-storage-react": {
"comments" : "introduce a feature flag for activating cross signing and secure storage (unify previous patches)",
"github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/433",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/433",
"package": "matrix-react-sdk",
"files": [
"src/components/views/settings/SecureBackupPanel.tsx",
Expand All @@ -196,11 +196,18 @@
]
},
"add-a-help-tab-in-menu-to-redirect-to-external-tchap-faq": {
"github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/395",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/395",
"package": "matrix-react-sdk",
"files": [
"src/components/structures/UserMenu.tsx",
"res/css/structures/_UserMenu.pcss"
]
},
"ux-improvements-for-xsss": {
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/442",
"package": "matrix-react-sdk",
"files": [
"src/components/views/dialogs/security/AccessSecretStorageDialog.tsx"
]
}
}
21 changes: 21 additions & 0 deletions patches/ux-improvements-for-xsss/matrix-react-sdk+3.63.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/node_modules/matrix-react-sdk/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx b/node_modules/matrix-react-sdk/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx
index 586ce4a..1c0942c 100644
--- a/node_modules/matrix-react-sdk/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx
@@ -428,6 +428,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
</div>
</div>
{recoveryKeyFeedback}
+ {/* :TCHAP: hide for csss feature
<DialogButtons
primaryButton={_t("Continue")}
onPrimaryButtonClick={this.onRecoveryKeyNext}
@@ -439,6 +440,8 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
primaryDisabled={!this.state.recoveryKeyValid}
additive={resetButton}
/>
+ :end TCHAP
+ */}
</form>
</div>
);
Loading