Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into florianduros/eleme…
Browse files Browse the repository at this point in the history
…nt-r/cross-user-verification
  • Loading branch information
richvdh committed Sep 7, 2023
2 parents c73f212 + d30c857 commit 156b354
Show file tree
Hide file tree
Showing 130 changed files with 12,496 additions and 11,018 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
run: |
echo "sha=$(cat webapp/sha)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# XXX: We're checking out untrusted code in a secure context
# We need to be careful to not trust anything this code outputs/may do
Expand All @@ -163,7 +163,7 @@ jobs:
echo "CYPRESS_RUST_CRYPTO=1" >> "$GITHUB_ENV"
- name: Run Cypress tests
uses: cypress-io/github-action@fa88e4afe551e64c8827a4b9e379afc63d8f691a
uses: cypress-io/github-action@2558ee6af05072a19de2ce92cb68b38616132726
with:
working-directory: matrix-react-sdk
# The built-in Electron runner seems to grind to a halt trying to run the tests, so use chrome.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/element-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ inputs.react-sdk-repository || github.repository }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/i18n_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Get modified files"
id: changed_files
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'RiotTranslateBot' && github.event.pull_request.user.login != 't3chguy'
uses: tj-actions/changed-files@1c26215f3fbd51eba03bc199e5cbabdfc3584ce3 # v38
uses: tj-actions/changed-files@48566bbcc22ceb7c5809ebdd27377309f2c3de8c # v39
with:
files: |
src/i18n/strings/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/netlify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- name: ☁️ Deploy to Netlify
id: netlify
uses: nwtgck/actions-netlify@5da65c9f74c7961c5501a3ba329b8d0912f39c03 # v2.0
uses: nwtgck/actions-netlify@7a92f00dde8c92a5a9e8385ec2919775f7647352 # v2.1
with:
publish-dir: webapp
deploy-message: "Deploy from GitHub Actions"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify-element-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'matrix-org/matrix-react-sdk'
steps:
- name: Notify element-web repo that a new SDK build is on develop
uses: peter-evans/repository-dispatch@26b39ed245ab8f31526069329e112ab2fb224588 # v2
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 # v2
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
repository: vector-im/element-web
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/static_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: "Typescript Syntax Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
name: "Rethemendex Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- run: ./res/css/rethemendex.sh

Expand All @@ -71,7 +71,7 @@ jobs:
name: "ESLint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
Expand All @@ -88,7 +88,7 @@ jobs:
name: "Style Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
Expand All @@ -105,7 +105,7 @@ jobs:
name: "Analyse Dead Code"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ inputs.matrix-js-sdk-sha && 'matrix-org/matrix-react-sdk' || github.repository }}

Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
name: Element Web Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ inputs.matrix-js-sdk-sha && 'matrix-org/matrix-react-sdk' || github.repository }}

Expand Down
15 changes: 14 additions & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,29 @@ limitations under the License.
*/

import { defineConfig } from "cypress";
import * as fs from "node:fs";

export default defineConfig({
videoUploadOnPasses: false,
video: true,
projectId: "ppvnzg",
experimentalInteractiveRunEvents: true,
experimentalMemoryManagement: true,
defaultCommandTimeout: 10000,
chromeWebSecurity: false,
e2e: {
setupNodeEvents(on, config) {
// Delete videos of passing tests
on("after:spec", (spec, results) => {
if (results && results.video) {
const failures = results.tests.some((test) =>
test.attempts.some((attempt) => attempt.state === "failed"),
);
if (!failures) {
fs.unlinkSync(results.video);
}
}
});

return require("./cypress/plugins/index.ts").default(on, config);
},
baseUrl: "http://localhost:8080",
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/spotlight/spotlight.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ describe("Spotlight", () => {
cy.spotlightSearch().type("{backspace}");
cy.get(".mx_SpotlightDialog_filter").should("not.exist");

cy.spotlightSearch().type("{downArrow}");
cy.spotlightSearch().type("{downArrow}");
cy.get("#mx_SpotlightDialog_button_explorePublicRooms").should("have.attr", "aria-selected", "true");
cy.spotlightSearch().type("{enter}");
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"emojibase-regex": "15.0.0",
"escape-html": "^1.0.3",
"file-saver": "^2.0.5",
"filesize": "10.0.7",
"filesize": "10.0.12",
"focus-visible": "^5.2.0",
"gfm.css": "^1.1.2",
"glob-to-regexp": "^0.4.1",
Expand All @@ -106,7 +106,7 @@
"opus-recorder": "^8.0.3",
"pako": "^2.0.3",
"png-chunks-extract": "^1.0.0",
"posthog-js": "1.73.1",
"posthog-js": "1.77.2",
"proposal-temporal": "^0.9.0",
"qrcode": "1.5.3",
"re-resizable": "^6.9.0",
Expand Down Expand Up @@ -159,7 +159,7 @@
"@types/fs-extra": "^11.0.0",
"@types/geojson": "^7946.0.8",
"@types/glob-to-regexp": "^0.4.1",
"@types/jest": "29.5.3",
"@types/jest": "29.5.4",
"@types/katex": "^0.16.0",
"@types/lodash": "^4.14.168",
"@types/modernizr": "^3.5.3",
Expand All @@ -185,19 +185,19 @@
"babel-jest": "^29.0.0",
"blob-polyfill": "^7.0.0",
"chokidar": "^3.5.1",
"cypress": "^12.0.0",
"cypress": "^13.0.0",
"cypress-axe": "^1.0.0",
"cypress-multi-reporters": "^1.6.1",
"cypress-real-events": "^1.7.1",
"cypress-terminal-report": "^5.3.2",
"eslint": "8.45.0",
"eslint": "8.48.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-deprecate": "^0.7.0",
"eslint-plugin-deprecate": "0.7.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-matrix-org": "1.2.0",
"eslint-plugin-matrix-org": "1.2.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-unicorn": "^48.0.0",
Expand Down
2 changes: 1 addition & 1 deletion res/css/compound/_SuccessDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
text-align: center;

.mx_Icon {
mask-border: $spacing-16;
margin-bottom: $spacing-16;
}

.mx_Dialog_header {
Expand Down
32 changes: 13 additions & 19 deletions src/LegacyCallHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ export default class LegacyCallHandler extends EventEmitter {
}

Modal.createDialog(ErrorDialog, {
title: _t("Call Failed"),
title: _t("voip|call_failed"),
description: err.message,
});
});
Expand Down Expand Up @@ -708,7 +708,7 @@ export default class LegacyCallHandler extends EventEmitter {
title = _t("User Busy");
description = _t("The user you called is busy.");
} else {
title = _t("Call Failed");
title = _t("voip|call_failed");
description = _t("The call could not be established");
}

Expand Down Expand Up @@ -856,23 +856,17 @@ export default class LegacyCallHandler extends EventEmitter {
let description;

if (call.type === CallType.Voice) {
title = _t("Unable to access microphone");
description = (
<div>
{_t(
"Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.",
)}
</div>
);
title = _t("voip|unable_to_access_microphone");
description = <div>{_t("voip|call_failed_microphone")}</div>;
} else if (call.type === CallType.Video) {
title = _t("Unable to access webcam / microphone");
title = _t("voip|unable_to_access_media");
description = (
<div>
{_t("Call failed because webcam or microphone could not be accessed. Check that:")}
{_t("voip|call_failed_media")}
<ul>
<li>{_t("A microphone and webcam are plugged in and set up correctly")}</li>
<li>{_t("Permission is granted to use the webcam")}</li>
<li>{_t("No other application is using the webcam")}</li>
<li>{_t("voip|call_failed_media_connected")}</li>
<li>{_t("voip|call_failed_media_permissions")}</li>
<li>{_t("voip|call_failed_media_applications")}</li>
</ul>
</div>
);
Expand Down Expand Up @@ -914,8 +908,8 @@ export default class LegacyCallHandler extends EventEmitter {
this.addCallForRoom(roomId, call);
} catch (e) {
Modal.createDialog(ErrorDialog, {
title: _t("Already in call"),
description: _t("You're already in a call with this person."),
title: _t("voip|already_in_call"),
description: _t("voip|already_in_call_person"),
});
return;
}
Expand Down Expand Up @@ -956,8 +950,8 @@ export default class LegacyCallHandler extends EventEmitter {
// if the runtime env doesn't do VoIP, whine.
if (!cli.supportsVoip()) {
Modal.createDialog(ErrorDialog, {
title: _t("Calls are unsupported"),
description: _t("You cannot place calls in this browser."),
title: _t("voip|unsupported"),
description: _t("voip|unsupported_browser"),
});
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/accessibility/KeyboardShortcutUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const getUIOnlyShortcuts = (): IKeyboardShortcuts => {
key: Key.ENTER,
ctrlOrCmdKey: ctrlEnterToSend,
},
displayName: _td("Send message"),
displayName: _td("composer|send_button_title"),
},
[KeyBindingAction.NewLine]: {
default: {
Expand Down
1 change: 1 addition & 0 deletions src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2205,6 +2205,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
knocked={myMembership === "knock" || this.state.knocked}
onSubmitAskToJoin={this.onSubmitAskToJoin}
onCancelAskToJoin={this.onCancelAskToJoin}
onForgetClick={this.onForgetClick}
/>
</ErrorBoundary>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/beacon/RoomCallBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const RoomCallBannerInner: React.FC<RoomCallBannerProps> = ({ roomId, call }) =>
return (
<div className="mx_RoomCallBanner" onClick={onClick}>
<div className="mx_RoomCallBanner_text">
<span className="mx_RoomCallBanner_label">{_t("Video call")}</span>
<span className="mx_RoomCallBanner_label">{_t("voip|video_call")}</span>
<GroupCallDuration groupCall={call.groupCall} />
</div>

Expand Down
27 changes: 6 additions & 21 deletions src/components/views/dialogs/AnalyticsLearnMoreDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const AnalyticsLearnMoreDialog: React.FC<IProps> = ({
const privacyPolicyLink = privacyPolicyUrl ? (
<span>
{_t(
"You can read all our terms <PrivacyPolicyUrl>here</PrivacyPolicyUrl>",
"analytics|privacy_policy",
{},
{
PrivacyPolicyUrl: (sub) => {
Expand All @@ -71,33 +71,18 @@ export const AnalyticsLearnMoreDialog: React.FC<IProps> = ({
<BaseDialog
className="mx_AnalyticsLearnMoreDialog"
contentId="mx_AnalyticsLearnMore"
title={_t("Help improve %(analyticsOwner)s", { analyticsOwner })}
title={_t("analytics|enable_prompt", { analyticsOwner })}
onFinished={onFinished}
>
<div className="mx_Dialog_content">
<div className="mx_AnalyticsLearnMore_image_holder" />
<div className="mx_AnalyticsLearnMore_copy">
{_t(
"Help us identify issues and improve %(analyticsOwner)s by sharing anonymous usage data. To understand how people use multiple devices, we'll generate a random identifier, shared by your devices.",
{ analyticsOwner },
)}
{_t("analytics|pseudonymous_usage_data", { analyticsOwner })}
</div>
<ul className="mx_AnalyticsLearnMore_bullets">
<li>
{_t(
"We <Bold>don't</Bold> record or profile any account data",
{},
{ Bold: (sub) => <b>{sub}</b> },
)}
</li>
<li>
{_t(
"We <Bold>don't</Bold> share information with third parties",
{},
{ Bold: (sub) => <b>{sub}</b> },
)}
</li>
<li>{_t("You can turn this off anytime in settings")}</li>
<li>{_t("analytics|bullet_1", {}, { Bold: (sub) => <b>{sub}</b> })}</li>
<li>{_t("analytics|bullet_2", {}, { Bold: (sub) => <b>{sub}</b> })}</li>
<li>{_t("analytics|disable_prompt")}</li>
</ul>
{privacyPolicyLink}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/dialogs/DevtoolsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ enum Category {
}

const categoryLabels: Record<Category, TranslationKey> = {
[Category.Room]: _td("common|room"),
[Category.Other]: _td("Other"),
[Category.Room]: _td("devtools|category_room"),
[Category.Other]: _td("devtools|category_other"),
};

export type Tool = React.FC<IDevtoolsProps> | ((props: IDevtoolsProps) => JSX.Element);
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/dialogs/SessionRestoreErrorDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class SessionRestoreErrorDialog extends React.Component<IProps> {
if (SdkConfig.get().bug_report_endpoint_url) {
dialogButtons = (
<DialogButtons
primaryButton={_t("Send Logs")}
primaryButton={_t("bug_reporting|send_logs")}
onPrimaryButtonClick={this.sendBugReport}
focus={true}
hasCancel={false}
Expand Down
Loading

0 comments on commit 156b354

Please sign in to comment.