diff --git a/.dockerignore b/.dockerignore index 75b1506fbb..70377fccdd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,6 +7,6 @@ karma-reports/ .idea/ .tmp/ config.json* -matrix-js-sdk/ -matrix-react-sdk/ -matrix-analytics-events/ \ No newline at end of file +# Exclude the playwright directory as much as we can as the snapshots are huge and we bind mount it in +playwright/ +!playwright/docker-entrypoint.sh diff --git a/.editorconfig b/.editorconfig index d3a02ce7fc..25844972f2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,16 +1,8 @@ +# Copyright 2024 New Vector Ltd. # Copyright 2017 Aviral Dasgupta # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only +# Please see LICENSE files in the repository root for full details. root = true @@ -26,4 +18,7 @@ trim_trailing_whitespace = true indent_size = 2 [package.json] -indent_size = 2 +indent_size = 4 + +[*.tsx.snap] +trim_trailing_whitespace = false diff --git a/.eslintignore b/.eslintignore index 5047dfe442..f7c70225cf 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,8 @@ src/vector/modernizr.js +test/end-to-end-tests/node_modules/ +test/end-to-end-tests/element/ +test/end-to-end-tests/synapse/ +test/end-to-end-tests/lib/ # Legacy skinning file that some people might still have src/component-index.js # Auto-generated file diff --git a/.eslintrc-module_system.js b/.eslintrc-module_system.js deleted file mode 100644 index cdf5cf64b5..0000000000 --- a/.eslintrc-module_system.js +++ /dev/null @@ -1,72 +0,0 @@ -module.exports = { - plugins: ["matrix-org"], - extends: ["./.eslintrc.js"], - parserOptions: { - project: ["./tsconfig.module_system.json"], - }, - overrides: [ - { - files: ["module_system/**/*.{ts,tsx}"], - extends: ["plugin:matrix-org/typescript", "plugin:matrix-org/react"], - // NOTE: These rules are frozen and new rules should not be added here. - // New changes belong in https://github.com/matrix-org/eslint-plugin-matrix-org/ - rules: { - // Things we do that break the ideal style - "prefer-promise-reject-errors": "off", - "quotes": "off", - - // We disable this while we're transitioning - "@typescript-eslint/no-explicit-any": "off", - // We're okay with assertion errors when we ask for them - "@typescript-eslint/no-non-null-assertion": "off", - - // Ban matrix-js-sdk/src imports in favour of matrix-js-sdk/src/matrix imports to prevent unleashing hell. - "no-restricted-imports": [ - "error", - { - paths: [ - { - name: "matrix-js-sdk", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-js-sdk/", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-js-sdk/src", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-js-sdk/src/", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-js-sdk/src/index", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-react-sdk", - message: "Please use matrix-react-sdk/src/index instead", - }, - { - name: "matrix-react-sdk/", - message: "Please use matrix-react-sdk/src/index instead", - }, - ], - patterns: [ - { - group: ["matrix-js-sdk/lib", "matrix-js-sdk/lib/", "matrix-js-sdk/lib/**"], - message: "Please use matrix-js-sdk/src/* instead", - }, - { - group: ["matrix-react-sdk/lib", "matrix-react-sdk/lib/", "matrix-react-sdk/lib/**"], - message: "Please use matrix-react-sdk/src/* instead", - }, - ], - }, - ], - }, - }, - ], -}; diff --git a/.eslintrc.js b/.eslintrc.js index 51f1304c16..0b21bb3e13 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { plugins: ["matrix-org"], - extends: ["plugin:matrix-org/babel", "plugin:matrix-org/react"], + extends: ["plugin:matrix-org/babel", "plugin:matrix-org/react", "plugin:matrix-org/a11y"], parserOptions: { project: ["./tsconfig.json"], }, @@ -8,19 +8,274 @@ module.exports = { browser: true, node: true, }, + globals: { + LANGUAGES_FILE: "readonly", + }, rules: { // Things we do that break the ideal style - quotes: "off", - }, - settings: { - react: { - version: "detect", - }, + "no-constant-condition": "off", + "prefer-promise-reject-errors": "off", + "no-async-promise-executor": "off", + "no-extra-boolean-cast": "off", + + // Bind or arrow functions in props causes performance issues (but we + // currently use them in some places). + // It's disabled here, but we should using it sparingly. + "react/jsx-no-bind": "off", + "react/jsx-key": ["error"], + + "no-restricted-properties": [ + "error", + ...buildRestrictedPropertiesOptions( + ["window.innerHeight", "window.innerWidth", "window.visualViewport"], + "Use UIStore to access window dimensions instead.", + ), + ...buildRestrictedPropertiesOptions( + ["*.mxcUrlToHttp", "*.getHttpUriForMxc"], + "Use Media helper instead to centralise access for customisation.", + ), + ...buildRestrictedPropertiesOptions(["window.setImmediate"], "Use setTimeout instead."), + ], + "no-restricted-globals": [ + "error", + { + name: "setImmediate", + message: "Use setTimeout instead.", + }, + ], + + "import/no-duplicates": ["error"], + // Ban matrix-js-sdk/src imports in favour of matrix-js-sdk/src/matrix imports to prevent unleashing hell. + // Ban compound-design-tokens raw svg imports in favour of their React component counterparts + "no-restricted-imports": [ + "error", + { + paths: [ + { + name: "@testing-library/react", + message: "Please use jest-matrix-react instead", + }, + { + name: "matrix-js-sdk", + message: "Please use matrix-js-sdk/src/matrix instead", + }, + { + name: "matrix-js-sdk/", + message: "Please use matrix-js-sdk/src/matrix instead", + }, + { + name: "matrix-js-sdk/src", + message: "Please use matrix-js-sdk/src/matrix instead", + }, + { + name: "matrix-js-sdk/src/", + message: "Please use matrix-js-sdk/src/matrix instead", + }, + { + name: "matrix-js-sdk/src/index", + message: "Please use matrix-js-sdk/src/matrix instead", + }, + { + name: "emojibase-regex", + message: + "This regex doesn't actually test for emoji. See the docs at https://emojibase.dev/docs/regex/ and prefer our own EMOJI_REGEX from HtmlUtils.", + }, + ], + patterns: [ + { + group: [ + "matrix-js-sdk/src/**", + "!matrix-js-sdk/src/matrix", + "!matrix-js-sdk/src/crypto-api", + "!matrix-js-sdk/src/types", + "!matrix-js-sdk/src/testing", + "!matrix-js-sdk/src/utils/**", + "matrix-js-sdk/src/utils/internal/**", + "matrix-js-sdk/lib", + "matrix-js-sdk/lib/", + "matrix-js-sdk/lib/**", + // XXX: Temporarily allow these as they are not available via the main export + "!matrix-js-sdk/src/logger", + "!matrix-js-sdk/src/errors", + "!matrix-js-sdk/src/utils", + "!matrix-js-sdk/src/version-support", + "!matrix-js-sdk/src/randomstring", + "!matrix-js-sdk/src/sliding-sync", + "!matrix-js-sdk/src/browser-index", + "!matrix-js-sdk/src/feature", + "!matrix-js-sdk/src/NamespacedValue", + "!matrix-js-sdk/src/ReEmitter", + "!matrix-js-sdk/src/event-mapper", + "!matrix-js-sdk/src/interactive-auth", + "!matrix-js-sdk/src/secret-storage", + "!matrix-js-sdk/src/room-hierarchy", + "!matrix-js-sdk/src/rendezvous", + "!matrix-js-sdk/src/indexeddb-worker", + "!matrix-js-sdk/src/pushprocessor", + "!matrix-js-sdk/src/extensible_events_v1", + "!matrix-js-sdk/src/extensible_events_v1/PollStartEvent", + "!matrix-js-sdk/src/extensible_events_v1/PollResponseEvent", + "!matrix-js-sdk/src/extensible_events_v1/PollEndEvent", + "!matrix-js-sdk/src/extensible_events_v1/InvalidEventError", + "!matrix-js-sdk/src/crypto", + "!matrix-js-sdk/src/crypto/keybackup", + "!matrix-js-sdk/src/crypto/deviceinfo", + "!matrix-js-sdk/src/crypto/dehydration", + "!matrix-js-sdk/src/oidc", + "!matrix-js-sdk/src/oidc/discovery", + "!matrix-js-sdk/src/oidc/authorize", + "!matrix-js-sdk/src/oidc/validate", + "!matrix-js-sdk/src/oidc/error", + "!matrix-js-sdk/src/oidc/register", + "!matrix-js-sdk/src/webrtc", + "!matrix-js-sdk/src/webrtc/call", + "!matrix-js-sdk/src/webrtc/callFeed", + "!matrix-js-sdk/src/webrtc/mediaHandler", + "!matrix-js-sdk/src/webrtc/callEventTypes", + "!matrix-js-sdk/src/webrtc/callEventHandler", + "!matrix-js-sdk/src/webrtc/groupCallEventHandler", + "!matrix-js-sdk/src/models", + "!matrix-js-sdk/src/models/read-receipt", + "!matrix-js-sdk/src/models/relations-container", + "!matrix-js-sdk/src/models/related-relations", + "!matrix-js-sdk/src/matrixrtc", + ], + message: "Please use matrix-js-sdk/src/matrix instead", + }, + { + group: ["emojibase-regex/emoji*"], + message: + "This regex doesn't actually test for emoji. See the docs at https://emojibase.dev/docs/regex/ and prefer our own EMOJI_REGEX from HtmlUtils.", + }, + { + group: ["@vector-im/compound-design-tokens/icons/*"], + message: "Please use @vector-im/compound-design-tokens/assets/web/icons/* instead", + }, + ], + }, + ], + + // There are too many a11y violations to fix at once + // Turn violated rules off until they are fixed + "jsx-a11y/aria-activedescendant-has-tabindex": "off", + "jsx-a11y/click-events-have-key-events": "off", + "jsx-a11y/interactive-supports-focus": "off", + "jsx-a11y/media-has-caption": "off", + "jsx-a11y/mouse-events-have-key-events": "off", + "jsx-a11y/no-autofocus": "off", + "jsx-a11y/no-noninteractive-element-interactions": "off", + "jsx-a11y/no-noninteractive-element-to-interactive-role": "off", + "jsx-a11y/no-noninteractive-tabindex": "off", + "jsx-a11y/no-static-element-interactions": "off", + "jsx-a11y/role-supports-aria-props": "off", + + // "matrix-org/require-copyright-header": "error", // :TCHAP: }, overrides: [ { // :TCHAP: also lint our cypress files, copied from react-sdk, because react-sdk lints them. - files: ["cypress/**/*.ts", "src/**/*.{ts,tsx}", "test/**/*.{ts,tsx}", "scripts/*.ts"], + files: ["cypress/**/*.ts", "src/**/*.{ts,tsx}", "test/**/*.{ts,tsx}", "scripts/*.ts", "playwright/**/*.ts"], + extends: ["plugin:matrix-org/typescript", "plugin:matrix-org/react"], + rules: { + "@typescript-eslint/explicit-function-return-type": [ + "error", + { + allowExpressions: true, + }, + ], + + // Things we do that break the ideal style + "prefer-promise-reject-errors": "off", + "no-extra-boolean-cast": "off", + + // Remove Babel things manually due to override limitations + "@babel/no-invalid-this": ["off"], + + // We're okay being explicit at the moment + "@typescript-eslint/no-empty-interface": "off", + // We disable this while we're transitioning + "@typescript-eslint/no-explicit-any": "off", + // We'd rather not do this but we do + "@typescript-eslint/ban-ts-comment": "off", + // We're okay with assertion errors when we ask for them + "@typescript-eslint/no-non-null-assertion": "off", + // We do this sometimes to brand interfaces + "@typescript-eslint/no-empty-object-type": "off", + }, + }, + // temporary override for offending icon require files + { + files: [ + "src/SdkConfig.ts", + "src/components/structures/FileDropTarget.tsx", + "src/components/structures/RoomStatusBar.tsx", + "src/components/structures/UserMenu.tsx", + "src/components/views/avatars/WidgetAvatar.tsx", + "src/components/views/dialogs/AddExistingToSpaceDialog.tsx", + "src/components/views/dialogs/ForwardDialog.tsx", + "src/components/views/dialogs/InviteDialog.tsx", + "src/components/views/dialogs/ModalWidgetDialog.tsx", + "src/components/views/dialogs/UploadConfirmDialog.tsx", + "src/components/views/dialogs/security/SetupEncryptionDialog.tsx", + "src/components/views/elements/AddressTile.tsx", + "src/components/views/elements/AppWarning.tsx", + "src/components/views/elements/SSOButtons.tsx", + "src/components/views/messages/MAudioBody.tsx", + "src/components/views/messages/MImageBody.tsx", + "src/components/views/messages/MFileBody.tsx", + "src/components/views/messages/MStickerBody.tsx", + "src/components/views/messages/MVideoBody.tsx", + "src/components/views/messages/MVoiceMessageBody.tsx", + "src/components/views/right_panel/EncryptionPanel.tsx", + "src/components/views/rooms/EntityTile.tsx", + "src/components/views/rooms/LinkPreviewGroup.tsx", + "src/components/views/rooms/MemberList.tsx", + "src/components/views/rooms/MessageComposer.tsx", + "src/components/views/rooms/ReplyPreview.tsx", + "src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx", + "src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx", + ], + rules: { + "@typescript-eslint/no-var-requires": "off", + }, + }, + { + files: ["test/**/*.{ts,tsx}", "playwright/**/*.ts"], + extends: ["plugin:matrix-org/jest"], + rules: { + // We don't need super strict typing in test utilities + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-member-accessibility": "off", + + // Jest/Playwright specific + + // Disabled tests are a reality for now but as soon as all of the xits are + // eliminated, we should enforce this. + "jest/no-disabled-tests": "off", + // Also treat "oldBackendOnly" as a test function. + // Used in some crypto tests. + "jest/no-standalone-expect": [ + "error", + { + additionalTestBlockFunctions: ["beforeAll", "beforeEach", "oldBackendOnly"], + }, + ], + }, + }, + { + files: ["playwright/**/*.ts"], + parserOptions: { + project: ["./playwright/tsconfig.json"], + }, + rules: { + "react-hooks/rules-of-hooks": ["off"], + }, + }, + { + files: ["module_system/**/*.{ts,tsx}"], + parserOptions: { + project: ["./tsconfig.module_system.json"], + }, extends: ["plugin:matrix-org/typescript", "plugin:matrix-org/react"], // NOTE: These rules are frozen and new rules should not be added here. // New changes belong in https://github.com/matrix-org/eslint-plugin-matrix-org/ @@ -59,38 +314,35 @@ module.exports = { name: "matrix-js-sdk/src/index", message: "Please use matrix-js-sdk/src/matrix instead", }, - { - name: "matrix-react-sdk", - message: "Please use matrix-react-sdk/src/index instead", - }, - { - name: "matrix-react-sdk/", - message: "Please use matrix-react-sdk/src/index instead", - }, ], patterns: [ { group: ["matrix-js-sdk/lib", "matrix-js-sdk/lib/", "matrix-js-sdk/lib/**"], message: "Please use matrix-js-sdk/src/* instead", }, - { - group: ["matrix-react-sdk/lib", "matrix-react-sdk/lib/", "matrix-react-sdk/lib/**"], - message: "Please use matrix-react-sdk/src/* instead", - }, ], }, ], }, }, - { - files: ["test/**/*.{ts,tsx}"], - rules: { - // We don't need super strict typing in test utilities - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-floating-promises": "off", - }, - }, ], + settings: { + react: { + version: "detect", + }, + }, }; + +function buildRestrictedPropertiesOptions(properties, message) { + return properties.map((prop) => { + let [object, property] = prop.split("."); + if (object === "*") { + object = undefined; + } + return { + object, + property, + message, + }; + }); +} diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index a490a009da..6f5ee16d91 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,2 +1,3 @@ # prettier +526645c79160ab1ad4b4c3845de27d51263a405e 7921a6cbf86b035d2b0c1daecb4c24beaf5a5abc diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4e8b5a7507..16036541f8 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,4 +5,4 @@ - [ ] Tests written for new code (and old code if feasible). - [ ] New or updated `public`/`exported` symbols have accurate [TSDoc](https://tsdoc.org/) documentation. - [ ] Linter and other CI checks pass. -- [ ] Sign-off given on the changes (see [CONTRIBUTING.md](https://github.com/element-hq/element-web/blob/develop/CONTRIBUTING.md)). +- [ ] I have licensed the changes to Element by completing the [Contributor License Agreement (CLA)](https://cla-assistant.io/element-hq/element-web) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index e8f391f452..5045f2bfc9 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,3 +1,3 @@ -_extends: element-hq/matrix-react-sdk +_extends: matrix-org/matrix-js-sdk version-resolver: default: patch diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index dd793898ec..7252c27b5f 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -10,7 +10,7 @@ on: jobs: backport: name: Backport - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 # Only react to merged PRs for security reasons. # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. if: > diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84bb3d263d..55f5c1f4a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,15 +18,15 @@ jobs: fail-fast: false matrix: image: - - ubuntu-latest - - windows-latest - - macos-latest + - ubuntu-24.04 + - windows-2022 + - macos-14 isDevelop: - ${{ github.event_name == 'push' && github.ref_name == 'develop' }} - # Skip the ubuntu-latest build for the develop branch as the dedicated CD build_develop workflow handles that + # Skip the ubuntu-24.04 build for the develop branch as the dedicated CD build_develop workflow handles that exclude: - isDevelop: true - image: ubuntu-latest + image: ubuntu-24.04 runs-on: ${{ matrix.image }} defaults: run: diff --git a/.github/workflows/build_debian.yaml b/.github/workflows/build_debian.yaml index 254b99d261..319dccd9f2 100644 --- a/.github/workflows/build_debian.yaml +++ b/.github/workflows/build_debian.yaml @@ -7,7 +7,7 @@ jobs: build: name: Build package environment: packages.element.io - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: R2_INCOMING_BUCKET: ${{ vars.R2_INCOMING_BUCKET }} R2_URL: ${{ vars.CF_R2_S3_API }} diff --git a/.github/workflows/build_develop.yml b/.github/workflows/build_develop.yml index 2407d2e6f1..b4c96c4eef 100644 --- a/.github/workflows/build_develop.yml +++ b/.github/workflows/build_develop.yml @@ -14,7 +14,7 @@ jobs: name: "Build & Deploy develop.element.io" # Only respect triggers from our develop branch, ignore that of forks if: github.repository == 'element-hq/element-web' - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: develop env: R2_BUCKET: "element-web-develop" diff --git a/.github/workflows/dockerhub.yaml b/.github/workflows/dockerhub.yaml index 4b27351be4..cdd50e0bcc 100644 --- a/.github/workflows/dockerhub.yaml +++ b/.github/workflows/dockerhub.yaml @@ -13,17 +13,8 @@ permissions: jobs: buildx: name: Docker Buildx - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: dockerhub - strategy: - fail-fast: false - matrix: - include: - - variant: vanilla - # Variant we ship to aid ESS in providing a build on the OpenCoDE platform including specific modules - - variant: opendesk - flavor: suffix=-opendesk,onlatest=true - prepare: mv variants/openDesk/* . steps: - uses: actions/checkout@v4 with: @@ -32,10 +23,6 @@ jobs: - name: Install Cosign uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3 - - name: Prepare - if: matrix.prepare - run: ${{ matrix.prepare }} - - name: Set up QEMU uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 @@ -61,11 +48,10 @@ jobs: type=ref,event=tag flavor: | latest=${{ contains(github.ref_name, '-rc.') && 'false' || 'auto' }} - ${{ matrix.flavor }} - name: Build and push id: build-and-push - uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6 with: context: . push: true @@ -85,7 +71,6 @@ jobs: cosign sign --yes ${images} - name: Update repo description - if: matrix.variant == 'vanilla' uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v4 continue-on-error: true with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5ef18a430d..c3f08deb1d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,7 +17,7 @@ concurrency: jobs: build: name: GitHub Pages - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Fetch element-desktop uses: actions/checkout@v4 @@ -30,12 +30,6 @@ jobs: with: path: element-web - - name: Fetch matrix-react-sdk - uses: actions/checkout@v4 - with: - repository: element-hq/matrix-react-sdk - path: matrix-react-sdk - - name: Fetch matrix-js-sdk uses: actions/checkout@v4 with: @@ -52,7 +46,7 @@ jobs: working-directory: element-web run: | yarn install --frozen-lockfile - yarn ts-node ./scripts/gen-workflow-mermaid.ts ../element-desktop ../element-web ../matrix-react-sdk ../matrix-js-sdk > docs/automations.md + yarn ts-node ./scripts/gen-workflow-mermaid.ts ../element-desktop ../element-web ../matrix-js-sdk > docs/automations.md echo "- [Automations](automations.md)" >> docs/SUMMARY.md - name: Setup mdBook @@ -74,9 +68,6 @@ jobs: mv element-web/docs/lib docs/ mv element-web/docs "docs/Element Web" - mv matrix-react-sdk/README.md matrix-react-sdk/docs/ - mv matrix-react-sdk/docs "docs/Matrix React SDK" - mv matrix-js-sdk/README.md matrix-js-sdk/docs/ mv matrix-js-sdk/docs "docs/Matrix JS SDK" @@ -108,7 +99,7 @@ jobs: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: build steps: - name: Deploy to GitHub Pages diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/end-to-end-tests-netlify.yaml b/.github/workflows/end-to-end-tests-netlify.yaml similarity index 94% rename from linked-dependencies/matrix-react-sdk/.github/workflows/end-to-end-tests-netlify.yaml rename to .github/workflows/end-to-end-tests-netlify.yaml index a488cbbfb0..2d51f168a6 100644 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/end-to-end-tests-netlify.yaml +++ b/.github/workflows/end-to-end-tests-netlify.yaml @@ -15,7 +15,7 @@ jobs: report: if: github.event.workflow_run.conclusion != 'cancelled' name: Report results - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 environment: Netlify permissions: statuses: write @@ -37,7 +37,7 @@ jobs: branch: ${{ github.event.workflow_run.head_branch }} revision: ${{ github.event.workflow_run.head_sha }} token: ${{ secrets.NETLIFY_AUTH_TOKEN }} - site_id: ${{ secrets.NETLIFY_SITE_ID }} + site_id: ${{ vars.NETLIFY_SITE_ID }} desc: Playwright Report deployment_env: EndToEndTests prefix: "e2e-" diff --git a/.github/workflows/end-to-end-tests.yaml b/.github/workflows/end-to-end-tests.yaml index 4ab0b7f884..85fbca670f 100644 --- a/.github/workflows/end-to-end-tests.yaml +++ b/.github/workflows/end-to-end-tests.yaml @@ -1,29 +1,190 @@ -# Triggers after the "Downstream artifacts" build has finished, to run the -# matrix-react-sdk playwright tests (with access to repo secrets) - -name: matrix-react-sdk End to End Tests +# Produce a build of element-web with this version of react-sdk +# and any matching branches of element-web and js-sdk, output it +# as an artifact and run end-to-end tests. +name: End to End Tests on: + pull_request: {} merge_group: types: [checks_requested] - pull_request: {} push: branches: [develop, master] + repository_dispatch: + types: [element-web-notify] + + # support triggering from other workflows + workflow_call: + inputs: + skip: + type: boolean + required: false + default: false + description: "A boolean to skip the playwright check itself while still creating the passing check. Useful when only running in Merge Queues." + + matrix-js-sdk-sha: + type: string + required: false + description: "The Git SHA of matrix-js-sdk to build against. By default, will use a matching branch name if it exists, or develop." concurrency: - group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }} - cancel-in-progress: ${{ github.event.workflow_run.event == 'pull_request' }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +env: + # fetchdep.sh needs to know our PR number + PR_NUMBER: ${{ github.event.pull_request.number }} jobs: + build: + name: "Build Element-Web" + runs-on: ubuntu-22.04 + if: inputs.skip != true + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + repository: element-hq/element-web + + - uses: actions/setup-node@v4 + with: + cache: "yarn" + node-version: "lts/*" + + - name: Fetch layered build + id: layered_build + env: + # tell layered.sh to check out the right sha of the JS-SDK & EW, if they were given one + JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }} + run: | + scripts/layered.sh + JSSDK_SHA=$(git -C matrix-js-sdk rev-parse --short=12 HEAD) + VECTOR_SHA=$(git rev-parse --short=12 HEAD) + echo "VERSION=$VECTOR_SHA--js-$JSSDK_SHA" >> $GITHUB_OUTPUT + + - name: Copy config + run: cp element.io/develop/config.json config.json + + - name: Build + env: + CI_PACKAGE: true + VERSION: "${{ steps.layered_build.outputs.VERSION }}" + run: | + yarn build + echo $VERSION > webapp/version + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: webapp + path: webapp + retention-days: 1 + playwright: - name: Playwright - uses: element-hq/matrix-react-sdk/.github/workflows/end-to-end-tests.yaml@develop + name: "Run Tests ${{ matrix.runner }}/${{ strategy.job-total }}" + needs: build + if: inputs.skip != true + runs-on: ubuntu-22.04 permissions: actions: read issues: read pull-requests: read - with: - element-web-sha: ${{ github.sha }} - react-sdk-repository: element-hq/matrix-react-sdk - # We only want to run the playwright tests on merge queue to prevent regressions - # from creeping in. They take a long time to run and consume multiple concurrent runners. - skip: ${{ github.event_name != 'merge_group' }} + strategy: + fail-fast: false + matrix: + # Run multiple instances in parallel to speed up the tests + runner: [1, 2, 3, 4, 5, 6] + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + repository: element-hq/element-web + + - name: 📥 Download artifact + uses: actions/download-artifact@v4 + with: + name: webapp + path: webapp + + - uses: actions/setup-node@v4 + with: + cache: "yarn" + cache-dependency-path: yarn.lock + node-version: "lts/*" + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Get installed Playwright version + id: playwright + run: echo "version=$(yarn list --pattern @playwright/test --depth=0 --json --non-interactive --no-progress | jq -r '.data.trees[].name')" >> $GITHUB_OUTPUT + + - name: Cache playwright binaries + uses: actions/cache@v4 + id: playwright-cache + with: + path: | + ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-${{ steps.playwright.outputs.version }} + + - name: Install Playwright browsers + if: steps.playwright-cache.outputs.cache-hit != 'true' + run: yarn playwright install --with-deps + + - name: Run Playwright tests + run: yarn playwright test --shard ${{ matrix.runner }}/${{ strategy.job-total }} + + - name: Upload blob report to GitHub Actions Artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: all-blob-reports-${{ matrix.runner }} + path: blob-report + retention-days: 1 + + complete: + name: end-to-end-tests + needs: playwright + if: always() + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + if: inputs.skip != true + with: + persist-credentials: false + repository: element-hq/element-web + + - uses: actions/setup-node@v4 + if: inputs.skip != true + with: + cache: "yarn" + node-version: "lts/*" + + - name: Install dependencies + if: inputs.skip != true + run: yarn install --frozen-lockfile + + - name: Download blob reports from GitHub Actions Artifacts + if: inputs.skip != true + uses: actions/download-artifact@v4 + with: + pattern: all-blob-reports-* + path: all-blob-reports + merge-multiple: true + + - name: Merge into HTML Report + if: inputs.skip != true + run: yarn playwright merge-reports --reporter=html,./playwright/flaky-reporter.ts,./playwright/stale-screenshot-reporter.ts ./all-blob-reports + env: + # Only pass creds to the flaky-reporter on main branch runs + GITHUB_TOKEN: ${{ github.ref_name == 'develop' && secrets.ELEMENT_BOT_TOKEN || '' }} + + # Upload the HTML report even if one of our reporters fails, this can happen when stale screenshots are detected + - name: Upload HTML report + if: always() && inputs.skip != true + uses: actions/upload-artifact@v4 + with: + name: html-report + path: playwright-report + retention-days: 14 + + - if: needs.playwright.result != 'skipped' && needs.playwright.result != 'success' + run: exit 1 diff --git a/.github/workflows/issue_closed.yml b/.github/workflows/issue_closed.yml index ddcd3d12bd..191f345cc9 100644 --- a/.github/workflows/issue_closed.yml +++ b/.github/workflows/issue_closed.yml @@ -7,7 +7,7 @@ on: jobs: tidy: name: Tidy closed issues - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/github-script@v7 id: main diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/netlify.yaml b/.github/workflows/netlify.yaml similarity index 95% rename from linked-dependencies/matrix-react-sdk/.github/workflows/netlify.yaml rename to .github/workflows/netlify.yaml index 911bfccbf4..b89bfa12ce 100644 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/netlify.yaml +++ b/.github/workflows/netlify.yaml @@ -9,7 +9,7 @@ on: jobs: deploy: if: github.event.workflow_run.conclusion != 'cancelled' && github.event.workflow_run.event == 'pull_request' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 environment: Netlify steps: - name: 📝 Create Deployment @@ -40,7 +40,7 @@ jobs: branch: ${{ github.event.workflow_run.head_branch }} revision: ${{ github.event.workflow_run.head_sha }} token: ${{ secrets.NETLIFY_AUTH_TOKEN }} - site_id: ${{ secrets.NETLIFY_SITE_ID }} + site_id: ${{ vars.NETLIFY_SITE_ID }} deployment_env: ${{ steps.deployment.outputs.env }} deployment_id: ${{ steps.deployment.outputs.deployment_id }} desc: | diff --git a/.github/workflows/pending-reviews.yaml b/.github/workflows/pending-reviews.yaml index e9ccab3dd1..499da6a9b3 100644 --- a/.github/workflows/pending-reviews.yaml +++ b/.github/workflows/pending-reviews.yaml @@ -9,7 +9,7 @@ concurrency: ${{ github.workflow }} jobs: bot: name: Pending reviews bot - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: Matrix env: URL: "https://github.com/pulls?q=is%3Apr+is%3Aopen+repo%3Amatrix-org%2Fmatrix-js-sdk+repo%3Amatrix-org%2Fmatrix-react-sdk+repo%3Aelement-hq%2Felement-web+repo%3Aelement-hq%2Felement-desktop+review-requested%3A%40me+sort%3Aupdated-desc+" @@ -64,7 +64,6 @@ jobs: const repos = [ "element-hq/element-desktop", "element-hq/element-web", - "element-hq/matrix-react-sdk", "matrix-org/matrix-js-sdk", ]; const teams = [ diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/playwright-image-updates.yaml b/.github/workflows/playwright-image-updates.yaml similarity index 98% rename from linked-dependencies/matrix-react-sdk/.github/workflows/playwright-image-updates.yaml rename to .github/workflows/playwright-image-updates.yaml index 4d4c08f566..26a86f4526 100644 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/playwright-image-updates.yaml +++ b/.github/workflows/playwright-image-updates.yaml @@ -5,7 +5,7 @@ on: - cron: "0 6 * * *" # Every day at 6am UTC jobs: update: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/pull_request_base_branch.yaml b/.github/workflows/pull_request_base_branch.yaml similarity index 94% rename from linked-dependencies/matrix-react-sdk/.github/workflows/pull_request_base_branch.yaml rename to .github/workflows/pull_request_base_branch.yaml index 49d7bcef7c..6097a27291 100644 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/pull_request_base_branch.yaml +++ b/.github/workflows/pull_request_base_branch.yaml @@ -5,7 +5,7 @@ on: jobs: check_base_branch: name: Check PR base branch - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/github-script@v7 with: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index f5602338b3..d8afa80a9f 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -7,5 +7,3 @@ concurrency: ${{ github.workflow }} jobs: draft: uses: matrix-org/matrix-js-sdk/.github/workflows/release-drafter-workflow.yml@develop - with: - include-changes: matrix-react-sdk diff --git a/.github/workflows/release-gitflow.yml b/.github/workflows/release-gitflow.yml index 22ad5bcb84..34232d420d 100644 --- a/.github/workflows/release-gitflow.yml +++ b/.github/workflows/release-gitflow.yml @@ -11,5 +11,4 @@ jobs: ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} with: dependencies: | - matrix-react-sdk matrix-js-sdk diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 799c439f73..3a9c29e197 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: notify-downstream: name: Trigger release drafter downstream needs: release - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Notify element-desktop repo that element-web release has completed to re-trigger release-drafter uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1 @@ -41,7 +41,7 @@ jobs: check: name: Post release checks needs: release - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Wait for dockerhub uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork @@ -49,7 +49,7 @@ jobs: ref: master repo-token: ${{ secrets.GITHUB_TOKEN }} wait-interval: 10 - check-name: "Docker Buildx (vanilla)" + check-name: "Docker Buildx" allowed-conclusions: success - name: Wait for debian package diff --git a/.github/workflows/release_prepare.yml b/.github/workflows/release_prepare.yml index c021a0c3d3..5fb969a1c6 100644 --- a/.github/workflows/release_prepare.yml +++ b/.github/workflows/release_prepare.yml @@ -12,11 +12,6 @@ on: required: true type: boolean default: true - matrix-react-sdk: - description: Prepare matrix-react-sdk - required: true - type: boolean - default: true matrix-js-sdk: description: Prepare matrix-js-sdk required: true @@ -24,10 +19,10 @@ on: default: true jobs: prepare: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: # The order is specified bottom-up to avoid any races for allchange - REPOS: matrix-js-sdk matrix-react-sdk element-web element-desktop + REPOS: matrix-js-sdk element-web element-desktop steps: - name: Checkout Element Desktop uses: actions/checkout@v4 @@ -49,16 +44,6 @@ jobs: fetch-depth: 0 fetch-tags: true token: ${{ secrets.ELEMENT_BOT_TOKEN }} - - name: Checkout Matrix React SDK - uses: actions/checkout@v4 - if: inputs.matrix-react-sdk - with: - repository: element-hq/matrix-react-sdk - path: matrix-react-sdk - ref: staging - fetch-depth: 0 - fetch-tags: true - token: ${{ secrets.ELEMENT_BOT_TOKEN }} - name: Checkout Matrix JS SDK uses: actions/checkout@v4 if: inputs.matrix-js-sdk @@ -83,10 +68,6 @@ jobs: if: inputs.element-web run: | git -C "element-web" merge origin/develop - - name: Merge React SDK - if: inputs.matrix-react-sdk - run: | - git -C "matrix-react-sdk" merge origin/develop - name: Merge JS SDK if: inputs.matrix-js-sdk run: | @@ -106,17 +87,6 @@ jobs: check-name: draft allowed-conclusions: success - - name: Wait for matrix-react-sdk draft - if: inputs.matrix-react-sdk - uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork - with: - ref: staging - repo: element-hq/matrix-react-sdk - repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }} - wait-interval: 10 - check-name: draft - allowed-conclusions: success - - name: Wait for element-web draft if: inputs.element-web uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 2859573d5a..d9b26c78e8 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -10,7 +10,10 @@ concurrency: jobs: sonarqube: name: 🩻 SonarQube + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'merge_group' uses: matrix-org/matrix-js-sdk/.github/workflows/sonarcloud.yml@develop secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + with: + sharded: true diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml index ed0148f36c..3eecea9d4d 100644 --- a/.github/workflows/static_analysis.yaml +++ b/.github/workflows/static_analysis.yaml @@ -7,14 +7,19 @@ on: types: [checks_requested] repository_dispatch: types: [element-web-notify] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + env: # These must be set for fetchdep.sh to get the right branch REPOSITORY: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} + jobs: ts_lint: name: "Typescript Syntax Check" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -34,10 +39,28 @@ jobs: uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main with: hardcoded-words: "Element" + allowed-hardcoded-keys: | + console_dev_note + labs|element_call_video_rooms + labs|feature_disable_call_per_sender_encryption + voip|element_call + error|invalid_json + error|misconfigured + welcome_to_element + + rethemendex_lint: + name: "Rethemendex Check" + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - run: ./res/css/rethemendex.sh + + - run: git diff --exit-code js_lint: name: "ESLint" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -55,7 +78,7 @@ jobs: style_lint: name: "Style Lint" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -64,16 +87,16 @@ jobs: cache: "yarn" node-version: "lts/*" - # Needs branch matching as it inherits .stylelintrc.js from matrix-react-sdk - - name: Install Dependencies - run: "./scripts/layered.sh" + # Does not need branch matching as only analyses this layer + - name: Install Deps + run: "yarn install" - name: Run Linter run: "yarn run lint:style" workflow_lint: name: "Workflow Lint" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -91,7 +114,7 @@ jobs: analyse_dead_code: name: "Analyse Dead Code" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -100,6 +123,12 @@ jobs: cache: "yarn" node-version: "lts/*" + - name: Install Deps + run: "yarn install --frozen-lockfile" + + - name: Run linter + run: "yarn run lint:knip" + - name: Install Deps run: "scripts/layered.sh" diff --git a/.github/workflows/tchap_static_analysis.yaml b/.github/workflows/tchap_static_analysis.yaml index bc9928c519..bbb7265af1 100644 --- a/.github/workflows/tchap_static_analysis.yaml +++ b/.github/workflows/tchap_static_analysis.yaml @@ -53,7 +53,7 @@ jobs: run: "yarn install --frozen-lockfile" - name: Run Linter - run: "yarn run lint:js" + run: "yarn run lint:js:tchap" style_lint: name: "Style Lint" @@ -90,7 +90,7 @@ jobs: # Needs branch matching as it inherits .stylelintrc.js from matrix-react-sdk - name: Install Dependencies - run: "./scripts/tchap/install-yarn-linked-repositories.sh" + run: "yarn install --pure-lockfile" - name: Run i18n-tchap run: "yarn i18n-tchap" diff --git a/.github/workflows/tchap_tests.yaml b/.github/workflows/tchap_tests.yaml index 018a7bfe7d..21ddf74f1f 100644 --- a/.github/workflows/tchap_tests.yaml +++ b/.github/workflows/tchap_tests.yaml @@ -29,11 +29,11 @@ jobs: cache: "yarn" node-version: ${{ steps.node_version.outputs.node_version }} - name: Install Dependencies - run: "./scripts/tchap/install-yarn-linked-repositories.sh" + run: "yarn install --pure-lockfile" - name: Get number of CPU cores id: cpu-cores uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2 - name: Run tests with coverage - run: "yarn coverage --ci" + run: "yarn coverage:tchap --ci" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index 01965af419..0000000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Tests -on: - pull_request: {} - push: - branches: [develop, master] - merge_group: - types: [checks_requested] - repository_dispatch: - types: [element-web-notify] -env: - # These must be set for fetchdep.sh to get the right branch - REPOSITORY: ${{ github.repository }} - PR_NUMBER: ${{ github.event.pull_request.number }} -jobs: - jest: - name: Jest - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Yarn cache - uses: actions/setup-node@v4 - with: - cache: "yarn" - node-version: "lts/*" - - - name: Install Dependencies - run: "./scripts/layered.sh" - - - name: Get number of CPU cores - id: cpu-cores - uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2 - - - name: Run tests with coverage - run: "yarn coverage --ci --max-workers ${{ steps.cpu-cores.outputs.count }}" - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: coverage - path: | - coverage - !coverage/lcov-report - - skip_sonar: - name: Skip SonarCloud in merge queue - if: github.event_name == 'merge_group' - runs-on: ubuntu-latest - needs: jest - steps: - - name: Skip SonarCloud - uses: Sibz/github-status-action@faaa4d96fecf273bd762985e0e7f9f933c774918 # v1 - with: - authToken: ${{ secrets.GITHUB_TOKEN }} - state: success - description: SonarCloud skipped - context: SonarCloud Code Analysis - sha: ${{ github.sha }} - target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/tests.yml b/.github/workflows/tests.yml similarity index 82% rename from linked-dependencies/matrix-react-sdk/.github/workflows/tests.yml rename to .github/workflows/tests.yml index 3bf5700f03..584acd225c 100644 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ on: push: branches: [develop, master] repository_dispatch: - types: [upstream-sdk-notify] + types: [element-web-notify] workflow_call: inputs: disable_coverage: @@ -29,7 +29,7 @@ env: jobs: jest: name: Jest - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -39,7 +39,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - repository: ${{ inputs.matrix-js-sdk-sha && 'element-hq/matrix-react-sdk' || github.repository }} + repository: ${{ inputs.matrix-js-sdk-sha && 'element-hq/element-web' || github.repository }} - name: Yarn cache uses: actions/setup-node@v4 @@ -48,7 +48,7 @@ jobs: cache: "yarn" - name: Install Deps - run: "./scripts/ci/install-deps.sh" + run: "./scripts/layered.sh" env: JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }} @@ -93,7 +93,7 @@ jobs: name: jest-tests needs: jest if: always() - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - if: needs.jest.result != 'skipped' && needs.jest.result != 'success' run: exit 1 @@ -108,21 +108,3 @@ jobs: context: SonarCloud Code Analysis sha: ${{ github.sha }} target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} - - app-tests: - name: Element Web Integration Tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - repository: ${{ inputs.matrix-js-sdk-sha && 'element-hq/matrix-react-sdk' || github.repository }} - - - uses: actions/setup-node@v4 - with: - cache: "yarn" - node-version: "lts/*" - - - name: Run tests - run: "./scripts/ci/app-tests.sh" - env: - JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }} diff --git a/.github/workflows/triage-assigned.yml b/.github/workflows/triage-assigned.yml index 98112d556f..81d1dff80f 100644 --- a/.github/workflows/triage-assigned.yml +++ b/.github/workflows/triage-assigned.yml @@ -6,7 +6,7 @@ on: jobs: web-app-team: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: | contains(github.event.issue.assignees.*.login, 't3chguy') || contains(github.event.issue.assignees.*.login, 'andybalaam') || diff --git a/.github/workflows/triage-incoming.yml b/.github/workflows/triage-incoming.yml index 47ed03efe3..e63017dc3b 100644 --- a/.github/workflows/triage-incoming.yml +++ b/.github/workflows/triage-incoming.yml @@ -6,7 +6,7 @@ on: jobs: automate-project-columns: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/add-to-project@main with: diff --git a/.github/workflows/triage-labelled.yml b/.github/workflows/triage-labelled.yml index 0ee40b987f..0112f180c1 100644 --- a/.github/workflows/triage-labelled.yml +++ b/.github/workflows/triage-labelled.yml @@ -11,7 +11,7 @@ on: jobs: apply_Z-Labs_label: name: Add Z-Labs label for features behind labs flags - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'A-Maths') || contains(github.event.issue.labels.*.name, 'A-Location-Sharing') || @@ -37,7 +37,7 @@ jobs: apply_Help-Wanted_label: name: Add "Help Wanted" label to all "good first issue" and Hacktoberfest - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'good first issue') || contains(github.event.issue.labels.*.name, 'Hacktoberfest') @@ -54,7 +54,7 @@ jobs: move_needs_info_issues: name: X-Needs-Info issues to Need info column on triage board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'X-Needs-Info') steps: @@ -77,7 +77,7 @@ jobs: move_flakey_test_issues: name: Z-Flaky-Test issues to Sized for maintainer column on triage board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'Z-Flaky-Test') steps: @@ -100,7 +100,7 @@ jobs: add_priority_design_issues_to_project: name: P1 X-Needs-Design to Design project board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'X-Needs-Design') && (contains(github.event.issue.labels.*.name, 'S-Critical') && @@ -117,7 +117,7 @@ jobs: add_product_issues: name: X-Needs-Product to product project board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'X-Needs-Product') steps: @@ -128,7 +128,7 @@ jobs: Search_issues_to_board: name: Search issues to project board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'A-New-Search-Experience') steps: @@ -139,7 +139,7 @@ jobs: voip: name: Add labelled issues to VoIP project board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'Team: VoIP') steps: @@ -150,7 +150,7 @@ jobs: verticals_feature: name: Add labelled issues to Verticals Feature project - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'Team: Verticals Feature') steps: @@ -161,7 +161,7 @@ jobs: tech_debt: name: Add labelled issues to tech debt project - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'A-Developer-Experience') || contains(github.event.issue.labels.*.name, 'A-Documentation') || diff --git a/.github/workflows/triage-move-review-requests.yml b/.github/workflows/triage-move-review-requests.yml index 9d2924c1a9..72d9786a4a 100644 --- a/.github/workflows/triage-move-review-requests.yml +++ b/.github/workflows/triage-move-review-requests.yml @@ -6,7 +6,7 @@ on: jobs: add_design_pr_to_project: name: Move PRs asking for design review to the design board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: octokit/graphql-action@v2.x id: find_team_members @@ -73,7 +73,7 @@ jobs: add_product_pr_to_project: name: Move PRs asking for design review to the design board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: octokit/graphql-action@v2.x id: find_team_members diff --git a/.github/workflows/triage-stale-flaky-tests.yml b/.github/workflows/triage-stale-flaky-tests.yml index ab6693675f..d339a136cd 100644 --- a/.github/workflows/triage-stale-flaky-tests.yml +++ b/.github/workflows/triage-stale-flaky-tests.yml @@ -4,7 +4,7 @@ on: - cron: "30 1 * * *" jobs: close: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: actions: write issues: write diff --git a/.github/workflows/triage-unlabelled.yml b/.github/workflows/triage-unlabelled.yml index 59d1bf471d..1cd1c80afc 100644 --- a/.github/workflows/triage-unlabelled.yml +++ b/.github/workflows/triage-unlabelled.yml @@ -7,7 +7,7 @@ on: jobs: Move_Unabeled_Issue_On_Project_Board: name: Move no longer X-Needs-Info issues to Triaged - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > ${{ !contains(github.event.issue.labels.*.name, 'X-Needs-Info') }} @@ -44,7 +44,7 @@ jobs: remove_Z-Labs_label: name: Remove Z-Labs label when features behind labs flags are removed - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > !(contains(github.event.issue.labels.*.name, 'A-Maths') || contains(github.event.issue.labels.*.name, 'A-Message-Pinning') || diff --git a/.github/workflows/update-jitsi.yml b/.github/workflows/update-jitsi.yml index 71405177d2..68dbf22e63 100644 --- a/.github/workflows/update-jitsi.yml +++ b/.github/workflows/update-jitsi.yml @@ -6,7 +6,7 @@ on: - cron: "0 3 * * 0" # 3am every Sunday jobs: update: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/update-topics.yaml b/.github/workflows/update-topics.yaml index b24c84ad26..a984fc4f03 100644 --- a/.github/workflows/update-topics.yaml +++ b/.github/workflows/update-topics.yaml @@ -18,7 +18,7 @@ concurrency: ${{ github.workflow }} jobs: bot: name: Release topic update - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: Matrix steps: - uses: actions/github-script@v7 @@ -56,7 +56,7 @@ jobs: headers, body: "{}", }); - + let res = await fetch(apiUrl, { method: "GET", headers, @@ -69,7 +69,7 @@ jobs: const data = await res.json(); console.log(roomId, "got event", data); - + const topic = data.topic.replace(regex, releaseTopic); if (topic === data.topic) { console.log(roomId, "nothing to do"); @@ -89,7 +89,7 @@ jobs: }), headers, }); - + if (res.ok) { console.log(roomId, "topic updated:", topic); } else { diff --git a/.gitignore b/.gitignore index 1248afb275..c831e7bd76 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,5 @@ electron/pub # File from translations checkin scripts. modules/tchap-translations/tmp/* +# version file and tarball created by `npm pack` / `yarn pack` +/git-revision.txt diff --git a/.lintstagedrc b/.lintstagedrc index c07ed8df5b..6b93e89d5a 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -2,6 +2,6 @@ "*": "prettier --write", "src/**/*.(ts|tsx)": ["eslint --fix"], "scripts/**/*.(ts|tsx)": ["eslint --fix"], - "module_system/**/*.(ts|tsx)": ["eslint --fix --config .eslintrc-module_system.js module_system"], + "module_system/**/*.(ts|tsx)": ["eslint --fix"], "*.pcss": ["stylelint --fix"] } diff --git a/.node-version b/.node-version new file mode 100644 index 0000000000..2bd5a0a98a --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +22 diff --git a/.prettierignore b/.prettierignore index ce8bc9f7a6..ef255e8330 100644 --- a/.prettierignore +++ b/.prettierignore @@ -25,6 +25,8 @@ src/vector/modernizr.js /docs/lib /book /debian/tmp +/.npmrc +package-lock.json # This file is owned, parsed, and generated by allchange, which doesn't comply with prettier /CHANGELOG.md @@ -32,13 +34,22 @@ src/vector/modernizr.js #remove tchap files from prettier patches/ patches_legacy/ -yarn-linked-dependencies/ -linked-dependencies/ .github/ res/ scripts/tchap -src/tchap/ /docs/changelogs +# ignore all the src files from the linter now that we merged with matrix-react-sdk +src/ + +# Legacy skinning file that some people might still have +/src/component-index.js # Downloaded and already minified res/jitsi_external_api.min.js + +# This file is also machine-generated +/playwright/e2e/crypto/test_indexeddb_cryptostore_dump/dump.json +/playwright/test-results/ +/playwright/html-report/ +/playwright/logs/ +/playwright/snapshots/ diff --git a/linked-dependencies/matrix-react-sdk/.prettierrc.cjs b/.prettierrc.cjs similarity index 100% rename from linked-dependencies/matrix-react-sdk/.prettierrc.cjs rename to .prettierrc.cjs diff --git a/.stylelintrc.js b/.stylelintrc.js index 467e1d0e77..dc8ae6376b 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -1,4 +1,50 @@ module.exports = { - ...require("matrix-react-sdk/.stylelintrc.js"), extends: ["stylelint-config-standard"], + customSyntax: "postcss-scss", + plugins: ["stylelint-scss"], + rules: { + "comment-empty-line-before": null, + "declaration-empty-line-before": null, + "length-zero-no-unit": null, + "rule-empty-line-before": null, + "color-hex-length": null, + "at-rule-no-unknown": null, + "no-descending-specificity": null, + "scss/at-rule-no-unknown": [ + true, + { + // https://github.com/vector-im/element-web/issues/10544 + ignoreAtRules: ["define-mixin"], + }, + ], + // Disable `&_kind`-style selectors while our unused CSS approach is "Find & Replace All" + // rather than a CI thing. Shorthand selectors are harder to detect when searching for a + // class name. This regex is trying to *allow* anything except `&words`, such as `&::before`, + // `&.mx_Class`, etc. + "selector-nested-pattern": "^((&[ :.\\[,])|([^&]))", + // Disable some defaults + "selector-class-pattern": null, + "custom-property-pattern": null, + "selector-id-pattern": null, + "keyframes-name-pattern": null, + "alpha-value-notation": null, + "color-function-notation": null, + "selector-not-notation": null, + "import-notation": null, + "value-keyword-case": null, + "declaration-block-no-redundant-longhand-properties": null, + "declaration-block-no-duplicate-properties": [ + true, + // useful for fallbacks + { ignore: ["consecutive-duplicates-with-different-values"] }, + ], + "shorthand-property-no-redundant-values": null, + "property-no-vendor-prefix": null, + "value-no-vendor-prefix": null, + "selector-no-vendor-prefix": null, + "media-feature-name-no-vendor-prefix": null, + "number-max-precision": null, + "no-invalid-double-slash-comments": true, + "media-feature-range-notation": null, + }, }; diff --git a/CHANGELOG.md b/CHANGELOG.md index ef18822d38..a554890dc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,96 @@ +Changes in [1.11.86](https://github.com/element-hq/element-web/releases/tag/v1.11.86) (2024-11-19) +================================================================================================== +## ✨ Features + +* Deduplicate icons using Compound Design Tokens ([#28419](https://github.com/element-hq/element-web/pull/28419)). Contributed by @t3chguy. +* Let widget driver send error details ([#28357](https://github.com/element-hq/element-web/pull/28357)). Contributed by @AndrewFerr. +* Deduplicate icons using Compound Design Tokens ([#28381](https://github.com/element-hq/element-web/pull/28381)). Contributed by @t3chguy. +* Auto approvoce `io.element.call.reaction` capability for element call widgets ([#28401](https://github.com/element-hq/element-web/pull/28401)). Contributed by @toger5. +* Show message type prefix in thread root \& reply previews ([#28361](https://github.com/element-hq/element-web/pull/28361)). Contributed by @t3chguy. +* Support sending encrypted to device messages from widgets ([#28315](https://github.com/element-hq/element-web/pull/28315)). Contributed by @hughns. + +## 🐛 Bug Fixes + +* Feed events to widgets as they are decrypted (even if out of order) ([#28376](https://github.com/element-hq/element-web/pull/28376)). Contributed by @robintown. +* Handle authenticated media when downloading from ImageView ([#28379](https://github.com/element-hq/element-web/pull/28379)). Contributed by @t3chguy. +* Ignore `m.3pid_changes` for Identity service 3PID changes ([#28375](https://github.com/element-hq/element-web/pull/28375)). Contributed by @t3chguy. +* Fix markdown escaping wrongly passing html through ([#28363](https://github.com/element-hq/element-web/pull/28363)). Contributed by @t3chguy. +* Remove "Upgrade your encryption" flow in `CreateSecretStorageDialog` ([#28290](https://github.com/element-hq/element-web/pull/28290)). Contributed by @florianduros. + + +Changes in [1.11.85](https://github.com/element-hq/element-web/releases/tag/v1.11.85) (2024-11-12) +================================================================================================== +# Security +- Fixes for [CVE-2024-51750](https://www.cve.org/CVERecord?id=CVE-2024-51750) / [GHSA-w36j-v56h-q9pc](https://github.com/element-hq/element-web/security/advisories/GHSA-w36j-v56h-q9pc) +- Fixes for [CVE-2024-51749](https://www.cve.org/CVERecord?id=CVE-2024-51749) / [GHSA-5486-384g-mcx2](https://github.com/element-hq/element-web/security/advisories/GHSA-5486-384g-mcx2) +- Update JS SDK with the fixes for [CVE-2024-50336](https://www.cve.org/CVERecord?id=CVE-2024-50336) / [GHSA-xvg8-m4x3-w6xr](https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-xvg8-m4x3-w6xr) + + +Changes in [1.11.84](https://github.com/element-hq/element-web/releases/tag/v1.11.84) (2024-11-05) +================================================================================================== +## ✨ Features + +* Remove abandoned MSC3886, MSC3903, MSC3906 implementations ([#28274](https://github.com/element-hq/element-web/pull/28274)). Contributed by @t3chguy. +* Update to React 18 ([#24763](https://github.com/element-hq/element-web/pull/24763)). Contributed by @t3chguy. +* Deduplicate icons using Compound ([#28239](https://github.com/element-hq/element-web/pull/28239)). Contributed by @t3chguy. +* Replace legacy Tooltips with Compound tooltips ([#28231](https://github.com/element-hq/element-web/pull/28231)). Contributed by @t3chguy. +* Deduplicate icons using Compound Design Tokens ([#28219](https://github.com/element-hq/element-web/pull/28219)). Contributed by @t3chguy. +* Add reactions to html export ([#28210](https://github.com/element-hq/element-web/pull/28210)). Contributed by @langleyd. +* Remove feature\_dehydration ([#28173](https://github.com/element-hq/element-web/pull/28173)). Contributed by @florianduros. + +## 🐛 Bug Fixes + +* Remove upgrade encryption in `DeviceListener` and `SetupEncryptionToast` ([#28299](https://github.com/element-hq/element-web/pull/28299)). Contributed by @florianduros. +* Fix 'remove alias' button in room settings ([#28269](https://github.com/element-hq/element-web/pull/28269)). Contributed by @Dev-Gurjar. +* Add back unencrypted path in `StopGapWidgetDriver.sendToDevice` ([#28295](https://github.com/element-hq/element-web/pull/28295)). Contributed by @florianduros. +* Fix other devices not being decorated as such ([#28279](https://github.com/element-hq/element-web/pull/28279)). Contributed by @t3chguy. +* Fix pill contrast in invitation dialog ([#28250](https://github.com/element-hq/element-web/pull/28250)). Contributed by @florianduros. +* Close right panel chat when minimising maximised voip widget ([#28241](https://github.com/element-hq/element-web/pull/28241)). Contributed by @t3chguy. +* Fix develop changelog parsing ([#28232](https://github.com/element-hq/element-web/pull/28232)). Contributed by @t3chguy. +* Fix Ctrl+F shortcut not working with minimised room summary card ([#28223](https://github.com/element-hq/element-web/pull/28223)). Contributed by @t3chguy. +* Fix network dropdown missing checkbox \& aria-checked ([#28220](https://github.com/element-hq/element-web/pull/28220)). Contributed by @t3chguy. + + +Changes in [1.11.83](https://github.com/element-hq/element-web/releases/tag/v1.11.83) (2024-10-29) +================================================================================================== +## ✨ Features + +* Enable Element Call by default on release instances ([#28314](https://github.com/element-hq/element-web/pull/28314)). Contributed by @t3chguy. + + + +Changes in [1.11.82](https://github.com/element-hq/element-web/releases/tag/v1.11.82) (2024-10-22) +================================================================================================== +## ✨ Features + +* Deduplicate more icons using Compound Design Tokens ([#132](https://github.com/element-hq/matrix-react-sdk/pull/132)). Contributed by @t3chguy. +* Always show link new device flow even if unsupported ([#147](https://github.com/element-hq/matrix-react-sdk/pull/147)). Contributed by @t3chguy. +* Update design of files list in right panel ([#144](https://github.com/element-hq/matrix-react-sdk/pull/144)). Contributed by @t3chguy. +* Remove feature\_dehydration ([#138](https://github.com/element-hq/matrix-react-sdk/pull/138)). Contributed by @florianduros. +* Upgrade emojibase-bindings and remove local handling of emoticon variations ([#127](https://github.com/element-hq/matrix-react-sdk/pull/127)). Contributed by @langleyd. +* Add support for rendering media captions ([#43](https://github.com/element-hq/matrix-react-sdk/pull/43)). Contributed by @tulir. +* Replace composer icons with Compound variants ([#123](https://github.com/element-hq/matrix-react-sdk/pull/123)). Contributed by @t3chguy. +* Tweak default right panel size to be 320px except for maximised widgets at 420px ([#110](https://github.com/element-hq/matrix-react-sdk/pull/110)). Contributed by @t3chguy. +* Add a pinned message badge under a pinned message ([#118](https://github.com/element-hq/matrix-react-sdk/pull/118)). Contributed by @florianduros. +* Ditch right panel tabs and re-add close button ([#99](https://github.com/element-hq/matrix-react-sdk/pull/99)). Contributed by @t3chguy. +* Force verification even for refreshed clients ([#44](https://github.com/element-hq/matrix-react-sdk/pull/44)). Contributed by @dbkr. +* Update emoji text, border and background colour in timeline ([#119](https://github.com/element-hq/matrix-react-sdk/pull/119)). Contributed by @florianduros. +* Disable ICE fallback based on well-known configuration ([#111](https://github.com/element-hq/matrix-react-sdk/pull/111)). Contributed by @t3chguy. +* Remove legacy room header and promote beta room header ([#105](https://github.com/element-hq/matrix-react-sdk/pull/105)). Contributed by @t3chguy. +* Respect `io.element.jitsi` `useFor1To1Calls` in well-known ([#112](https://github.com/element-hq/matrix-react-sdk/pull/112)). Contributed by @t3chguy. +* Use Compound close icon in favour of mishmash of x/close icons ([#108](https://github.com/element-hq/matrix-react-sdk/pull/108)). Contributed by @t3chguy. + +## 🐛 Bug Fixes + +* Correct typo in option documentation ([#28148](https://github.com/element-hq/element-web/pull/28148)). Contributed by @AndrewKvalheim. +* Revert #124 and #135 ([#139](https://github.com/element-hq/matrix-react-sdk/pull/139)). Contributed by @dbkr. +* Add aria-label to e2e icon ([#136](https://github.com/element-hq/matrix-react-sdk/pull/136)). Contributed by @florianduros. +* Fix bell icons on room list hover being black squares ([#135](https://github.com/element-hq/matrix-react-sdk/pull/135)). Contributed by @dbkr. +* Fix vertical overflow on the mobile register screen ([#137](https://github.com/element-hq/matrix-react-sdk/pull/137)). Contributed by @langleyd. +* Allow to unpin redacted event ([#98](https://github.com/element-hq/matrix-react-sdk/pull/98)). Contributed by @florianduros. + + + Changes in [1.11.81](https://github.com/element-hq/element-web/releases/tag/v1.11.81) (2024-10-15) ================================================================================================== This release fixes High severity vulnerability CVE-2024-47771 / GHSA-963w-49j9-gxj6 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bfcfcf2e34..49741b073c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,7 +79,6 @@ element-web notes: Fix a bug where the 'Herd' button only worked on Tuesdays This example is for Element Web. You can specify: -- matrix-react-sdk - element-web - element-desktop @@ -113,14 +112,12 @@ checks, so please check back after a few minutes. Your PR should include tests. -For new user facing features in `matrix-js-sdk`, `matrix-react-sdk` or `element-web`, you -must include: +For new user facing features in `matrix-js-sdk` or `element-web`, you must include: 1. Comprehensive unit tests written in Jest. These are located in `/test`. 2. "happy path" end-to-end tests. - These are located in `/playwright/e2e` in `matrix-react-sdk`, and - are run using `element-web`. Ideally, you would also include tests for edge - and error cases. + These are located in `/playwright/e2e`, and are run using `element-web`. + Ideally, you would also include tests for edge and error cases. Unit tests are expected even when the feature is in labs. It's good practice to write tests alongside the code as it ensures the code is testable from @@ -134,8 +131,7 @@ end-to-end test; which is best depends on what sort of test most concisely exercises the area. Changes to must be accompanied by unit tests written in Jest. -These are located in `/spec/` in `matrix-js-sdk` or `/test/` in `element-web` -and `matrix-react-sdk`. +These are located in `/spec/` in `matrix-js-sdk` or `/test/` in `element-web`. When writing unit tests, please aim for a high level of test coverage for new code - 80% or greater. If you cannot achieve that, please document diff --git a/Dockerfile b/Dockerfile index abcc859820..908c05520c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,8 @@ # Builder -FROM --platform=$BUILDPLATFORM node:20-bullseye as builder +FROM --platform=$BUILDPLATFORM node:22-bullseye as builder -# Support custom branches of the react-sdk and js-sdk. This also helps us build -# images of element-web develop. +# Support custom branch of the js-sdk. This also helps us build images of element-web develop. ARG USE_CUSTOM_SDKS=false -ARG REACT_SDK_REPO="https://github.com/matrix-org/matrix-react-sdk.git" -ARG REACT_SDK_BRANCH="master" ARG JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git" ARG JS_SDK_BRANCH="master" diff --git a/README.md b/README.md index 3222d4a38a..52fd0f5d6e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ # Element Element (formerly known as Vector and Riot) is a Matrix web client built using the [Matrix -React SDK](https://github.com/matrix-org/matrix-react-sdk). +JS SDK](https://github.com/matrix-org/matrix-js-sdk). # Supported Environments @@ -206,16 +206,11 @@ internet. So please don't depend on resources (JS libs, CSS, images, fonts) hosted by external CDNs or servers but instead please package all dependencies into Element itself. -CSS hot-reload is available as an opt-in development feature. You can enable it -by defining a `CSS_HOT_RELOAD` environment variable, in a `.env` file in the root -of the repository. See `.env.example` for documentation and an example. - # Setting up a dev environment -Much of the functionality in Element is actually in the `matrix-react-sdk` and -`matrix-js-sdk` modules. It is possible to set these up in a way that makes it -easy to track the `develop` branches in git and to make local changes without -having to manually rebuild each time. +Much of the functionality in Element is actually in the `matrix-js-sdk` module. +It is possible to set these up in a way that makes it easy to track the `develop` branches +in git and to make local changes without having to manually rebuild each time. First clone and build `matrix-js-sdk`: @@ -227,17 +222,6 @@ yarn install popd ``` -Then similarly with `matrix-react-sdk`: - -```bash -git clone https://github.com/matrix-org/matrix-react-sdk.git -pushd matrix-react-sdk -yarn link -yarn link matrix-js-sdk -yarn install -popd -``` - Clone the repo and switch to the `element-web` directory: ```bash @@ -252,7 +236,6 @@ Finally, build and start Element itself: ```bash yarn link matrix-js-sdk -yarn link matrix-react-sdk yarn install yarn start ``` @@ -306,8 +289,7 @@ sudo sysctl -p --- -When you make changes to `matrix-react-sdk` or `matrix-js-sdk` they should be -automatically picked up by webpack and built. +When you make changes to `matrix-js-sdk` they should be automatically picked up by webpack and built. If any of these steps error with, `file table overflow`, you are probably on a mac which has a very low limit on max open files. Run `ulimit -Sn 1024` and try again. diff --git a/linked-dependencies/matrix-react-sdk/__mocks__/FontManager.js b/__mocks__/FontManager.js similarity index 100% rename from linked-dependencies/matrix-react-sdk/__mocks__/FontManager.js rename to __mocks__/FontManager.js diff --git a/linked-dependencies/matrix-react-sdk/__mocks__/empty.js b/__mocks__/empty.js similarity index 100% rename from linked-dependencies/matrix-react-sdk/__mocks__/empty.js rename to __mocks__/empty.js diff --git a/linked-dependencies/matrix-react-sdk/__mocks__/imageMock.js b/__mocks__/imageMock.js similarity index 100% rename from linked-dependencies/matrix-react-sdk/__mocks__/imageMock.js rename to __mocks__/imageMock.js diff --git a/linked-dependencies/matrix-react-sdk/__mocks__/languages.json b/__mocks__/languages.json similarity index 100% rename from linked-dependencies/matrix-react-sdk/__mocks__/languages.json rename to __mocks__/languages.json diff --git a/linked-dependencies/matrix-react-sdk/__mocks__/maplibre-gl.js b/__mocks__/maplibre-gl.js similarity index 100% rename from linked-dependencies/matrix-react-sdk/__mocks__/maplibre-gl.js rename to __mocks__/maplibre-gl.js diff --git a/linked-dependencies/matrix-react-sdk/__mocks__/svg.js b/__mocks__/svg.js similarity index 100% rename from linked-dependencies/matrix-react-sdk/__mocks__/svg.js rename to __mocks__/svg.js diff --git a/linked-dependencies/matrix-react-sdk/__mocks__/workerFactoryMock.js b/__mocks__/workerFactoryMock.js similarity index 100% rename from linked-dependencies/matrix-react-sdk/__mocks__/workerFactoryMock.js rename to __mocks__/workerFactoryMock.js diff --git a/code_style.md b/code_style.md index e6ad053111..e5f7485cec 100644 --- a/code_style.md +++ b/code_style.md @@ -5,7 +5,6 @@ adjacent to. As of writing, these are: - element-desktop - element-web -- matrix-react-sdk - matrix-js-sdk Other projects might extend this code style for increased strictness. For example, matrix-events-sdk diff --git a/components.json b/components.json index cc5046ed69..0967ef424b 100644 --- a/components.json +++ b/components.json @@ -1,5 +1 @@ -{ - "src/components/views/auth/AuthFooter.tsx": "src/components/views/auth/VectorAuthFooter.tsx", - "src/components/views/auth/AuthHeaderLogo.tsx": "src/components/views/auth/VectorAuthHeaderLogo.tsx", - "src/components/views/auth/AuthPage.tsx": "src/components/views/auth/VectorAuthPage.tsx" -} +{} diff --git a/customisations.json b/customisations.json index b49e3833ac..e6e3c3c18f 100644 --- a/customisations.json +++ b/customisations.json @@ -14,13 +14,13 @@ "src/components/views/messages/MStickerBody.tsx": "src/tchap/customisations/components/views/messages/ContentScanningStickerBody.tsx", "src/components/views/messages/MVideoBody.tsx": "src/tchap/customisations/components/views/messages/ContentScanningVideoBody.tsx", "src/components/views/messages/MVoiceMessageBody.tsx": "src/tchap/customisations/components/views/messages/ContentScanningVoiceMessageBody.tsx", - "src/tchap/components/views/messages/OriginalAudioBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MAudioBody.tsx", - "src/tchap/components/views/messages/OriginalFileBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MFileBody.tsx", - "src/tchap/components/views/messages/OriginalImageBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MImageBody.tsx", - "src/tchap/components/views/messages/OriginalImageReplyBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MImageReplyBody.tsx", - "src/tchap/components/views/messages/OriginalStickerBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MStickerBody.tsx", - "src/tchap/components/views/messages/OriginalVideoBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MVideoBody.tsx", - "src/tchap/components/views/messages/OriginalVoiceMessageBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MVoiceMessageBody.tsx", + "src/tchap/components/views/messages/OriginalAudioBody.tsx": "src/components/views/messages/MAudioBody.tsx", + "src/tchap/components/views/messages/OriginalFileBody.tsx": "src/components/views/messages/MFileBody.tsx", + "src/tchap/components/views/messages/OriginalImageBody.tsx": "src/components/views/messages/MImageBody.tsx", + "src/tchap/components/views/messages/OriginalImageReplyBody.tsx": "src/components/views/messages/MImageReplyBody.tsx", + "src/tchap/components/views/messages/OriginalStickerBody.tsx": "src/components/views/messages/MStickerBody.tsx", + "src/tchap/components/views/messages/OriginalVideoBody.tsx": "src/components/views/messages/MVideoBody.tsx", + "src/tchap/components/views/messages/OriginalVoiceMessageBody.tsx": "src/components/views/messages/MVoiceMessageBody.tsx", "src/components/views/messages/UnknownBody.tsx": "src/tchap/components/views/messages/TchapUnknownBody.tsx", "src/components/views/settings/JoinRuleSettings.tsx": "src/tchap/components/views/settings/TchapJoinRuleSettings.tsx", "src/components/views/dialogs/RoomUpgradeWarningDialog.tsx": "src/tchap/components/views/dialogs/TchapRoomUpgradeWarningDialog.tsx", diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index cbf6237dd5..23229bf00a 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -34,8 +34,22 @@ - [App load order](app-load.md) - [Translation](translating-dev.md) - [Theming](theming.md) +- [Playwright end to end tests](playwright.md) - [Memory profiling](memory-profiles-and-leaks.md) - [Jitsi](jitsi-dev.md) - [Feature flags](feature-flags.md) - [OIDC and delegated authentication](oidc.md) - [Release Process](release.md) + +# Deep dive + +- [Skinning](skinning.md) +- [Cider editor](ciderEditor.md) +- [Iconography](icons.md) +- [Jitsi](jitsi.md) +- [Local echo](local-echo-dev.md) +- [Media](media-handling.md) +- [Room List Store](room-list-store.md) +- [Scrolling](scrolling.md) +- [Usercontent](usercontent.md) +- [Widget layouts](widget-layouts.md) diff --git a/docs/choosing-an-issue.md b/docs/choosing-an-issue.md index 98672afb31..9d008782a1 100644 --- a/docs/choosing-an-issue.md +++ b/docs/choosing-an-issue.md @@ -19,8 +19,7 @@ If you're looking for inspiration on where to start, keep reading! All the issues for Element Web live in the [element-web](https://github.com/element-hq/element-web) repository, including -issues that actually need fixing in `matrix-react-sdk` or one of the related -repos. +issues that actually need fixing in one of the related repos. The first place to look is for [issues tagged with "good first issue"](https://github.com/element-hq/element-web/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). diff --git a/linked-dependencies/matrix-react-sdk/docs/ciderEditor.md b/docs/ciderEditor.md similarity index 97% rename from linked-dependencies/matrix-react-sdk/docs/ciderEditor.md rename to docs/ciderEditor.md index dd0ade5aa5..672991ef8e 100644 --- a/linked-dependencies/matrix-react-sdk/docs/ciderEditor.md +++ b/docs/ciderEditor.md @@ -1,7 +1,7 @@ # The CIDER (Contenteditable-Input-Diff-Error-Reconcile) editor The CIDER editor is a custom editor written for Element. -Most of the code can be found in the `/editor/` directory of the `matrix-react-sdk` project. +Most of the code can be found in the `/editor/` directory. It is used to power the composer main composer (both to send and edit messages), and might be used for other usecases where autocomplete is desired (invite box, ...). ## High-level overview. diff --git a/docs/config.md b/docs/config.md index af24d94819..cc40179740 100644 --- a/docs/config.md +++ b/docs/config.md @@ -109,7 +109,7 @@ instance. As of writing those settings are not fully documented, however a few a } ``` These values will take priority over the hardcoded defaults for the settings. For a list of available settings, see - [Settings.tsx](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.tsx). + [Settings.tsx](https://github.com/element-hq/element-web/blob/develop/src/settings/Settings.tsx). ## Customisation & branding @@ -154,7 +154,7 @@ complete re-branding/private labeling, a more personalised experience can be ach 2. `description`: Required. The description to use for the notice. 3. `show_once`: Optional. If true then the notice will only be shown once per device. 18. `help_url`: The URL to point users to for help with the app, defaults to `https://element.io/help`. -19. `help_encrption_url`: The URL to point users to for help with encryption, defaults to `https://element.io/help#encryption`. +19. `help_encryption_url`: The URL to point users to for help with encryption, defaults to `https://element.io/help#encryption`. 20. `force_verification`: If true, users must verify new logins (eg. with another device / their security key) ### `desktop_builds` and `mobile_builds` diff --git a/docs/customisations.md b/docs/customisations.md index d5e7ea8cf4..a6f72ab1ab 100644 --- a/docs/customisations.md +++ b/docs/customisations.md @@ -11,8 +11,8 @@ Customisations will be removed from the codebase in a future release. Element Web and the React SDK support "customisation points" that can be used to easily add custom logic specific to a particular deployment of Element Web. -An example of this is the [security customisations -module](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/customisations/Security.ts). +An example of this is the [media customisations +module](https://github.com/element-hq/element-web/blob/develop/src/customisations/Media.ts). This module in the React SDK only defines some empty functions and their types: it does not do anything by default. @@ -21,14 +21,14 @@ Web so that you can add your own code. Even though the default module is part of the React SDK, you can still override it from the Element Web layer: 1. Copy the default customisation module to - `element-web/src/customisations/YourNameSecurity.ts` + `element-web/src/customisations/YourNameMedia.ts` 2. Edit customisations points and make sure export the ones you actually want to activate 3. Create/add an entry to `customisations.json` next to the webpack config: ```json { - "src/customisations/Security.ts": "src/customisations/YourNameSecurity.ts" + "src/customisations/Media.ts": "src/customisations/YourNameMedia.ts" } ``` @@ -54,7 +54,7 @@ UI for some actions can be hidden via the ComponentVisibility customisation: - creating rooms, - creating spaces, -To customise visibility create a customisation module from [ComponentVisibility](https://github.com/matrix-org/matrix-react-sdk/blob/master/src/customisations/ComponentVisibility.ts) following the instructions above. +To customise visibility create a customisation module from [ComponentVisibility](https://github.com/element-hq/element-web/blob/master/src/customisations/ComponentVisibility.ts) following the instructions above. `shouldShowComponent` determines whether the active MatrixClient user should be able to use the given UI component. When `shouldShowComponent` returns falsy all UI components for that feature will be hidden. diff --git a/docs/feature-flags.md b/docs/feature-flags.md index f80b6640e3..46e5f1243e 100644 --- a/docs/feature-flags.md +++ b/docs/feature-flags.md @@ -35,7 +35,7 @@ clients commit to doing the associated clean up work once a feature stabilises. When starting work on a feature, we should create a matching feature flag: 1. Add a new - [setting](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.tsx) + [setting](https://github.com/element-hq/element-web/blob/develop/src/settings/Settings.tsx) of the form: ```js @@ -93,14 +93,14 @@ Once we're confident that a feature is working well, we should remove or convert If the feature is meant to be turned off/on by the user: -1. Remove `isFeature` from the [setting](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.ts) +1. Remove `isFeature` from the [setting](https://github.com/element-hq/element-web/blob/develop/src/settings/Settings.ts) 2. Change the `default` to `true` (if desired). 3. Remove the feature from the [labs documentation](https://github.com/element-hq/element-web/blob/develop/docs/labs.md) 4. Celebrate! 🥳 If the feature is meant to be forced on (non-configurable): -1. Remove the [setting](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.ts) +1. Remove the [setting](https://github.com/element-hq/element-web/blob/develop/src/settings/Settings.ts) 2. Remove all `getValue` lines that test for the feature. 3. Remove the feature from the [labs documentation](https://github.com/element-hq/element-web/blob/develop/docs/labs.md) 4. If applicable, remove the feature state from diff --git a/linked-dependencies/matrix-react-sdk/docs/features/README.md b/docs/features/README.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/features/README.md rename to docs/features/README.md diff --git a/linked-dependencies/matrix-react-sdk/docs/features/composer.md b/docs/features/composer.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/features/composer.md rename to docs/features/composer.md diff --git a/linked-dependencies/matrix-react-sdk/docs/features/keyboardShortcuts.md b/docs/features/keyboardShortcuts.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/features/keyboardShortcuts.md rename to docs/features/keyboardShortcuts.md diff --git a/linked-dependencies/matrix-react-sdk/docs/icons.md b/docs/icons.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/icons.md rename to docs/icons.md diff --git a/linked-dependencies/matrix-react-sdk/docs/img/RoomListStore2.png b/docs/img/RoomListStore2.png similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/img/RoomListStore2.png rename to docs/img/RoomListStore2.png diff --git a/docs/install.md b/docs/install.md index 6c945887bb..1c182cdd34 100644 --- a/docs/install.md +++ b/docs/install.md @@ -41,7 +41,15 @@ The Docker image can be used to serve element-web as a web server. The easiest w it is to use the prebuilt image: ```bash -docker run -p 80:80 vectorim/element-web +docker run --rm -p 127.0.0.1:80:80 vectorim/element-web +``` + +A server can also be made available to clients outside the local host by omitting the +explicit local address as described in +[docker run documentation](https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose): + +```bash +docker run --rm -p 80:80 vectorim/element-web ``` To supply your own custom `config.json`, map a volume to `/app/config.json`. For example, @@ -49,7 +57,7 @@ if your custom config was located at `/etc/element-web/config.json` then your Do would be: ```bash -docker run -p 80:80 -v /etc/element-web/config.json:/app/config.json vectorim/element-web +docker run --rm -p 127.0.0.1:80:80 -v /etc/element-web/config.json:/app/config.json vectorim/element-web ``` To build the image yourself: @@ -67,8 +75,6 @@ element-web branch and then run: ```bash docker build -t \ --build-arg USE_CUSTOM_SDKS=true \ - --build-arg REACT_SDK_REPO="https://github.com/matrix-org/matrix-react-sdk.git" \ - --build-arg REACT_SDK_BRANCH="develop" \ --build-arg JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git" \ --build-arg JS_SDK_BRANCH="develop" \ . diff --git a/docs/jitsi.md b/docs/jitsi.md index f2e22e7046..48d1a7bf3e 100644 --- a/docs/jitsi.md +++ b/docs/jitsi.md @@ -70,3 +70,41 @@ The domain used is the one specified by the `/.well-known/matrix/client` endpoin For active Jitsi widgets in the room, a native Jitsi widget UI is created and points to the instance specified in the `domain` key of the widget content data. Element Android manages allowed native widgets permissions a bit differently than web widgets (as the data shared are different and never shared with the widget URL). For Jitsi widgets, permissions are requested only once per domain (consent saved in account data). + +# Jitsi Wrapper + +**Note**: These are developer docs. Please consult your client's documentation for +instructions on setting up Jitsi. + +The react-sdk wraps all Jitsi call widgets in a local wrapper called `jitsi.html` +which takes several parameters: + +_Query string_: + +- `widgetId`: The ID of the widget. This is needed for communication back to the + react-sdk. +- `parentUrl`: The URL of the parent window. This is also needed for + communication back to the react-sdk. + +_Hash/fragment (formatted as a query string)_: + +- `conferenceDomain`: The domain to connect Jitsi Meet to. +- `conferenceId`: The room or conference ID to connect Jitsi Meet to. +- `isAudioOnly`: Boolean for whether this is a voice-only conference. May not + be present, should default to `false`. +- `startWithAudioMuted`: Boolean for whether the calls start with audio + muted. May not be present. +- `startWithVideoMuted`: Boolean for whether the calls start with video + muted. May not be present. +- `displayName`: The display name of the user viewing the widget. May not + be present or could be null. +- `avatarUrl`: The HTTP(S) URL for the avatar of the user viewing the widget. May + not be present or could be null. +- `userId`: The MXID of the user viewing the widget. May not be present or could + be null. + +The react-sdk will assume that `jitsi.html` is at the path of wherever it is currently +being served. For example, `https://develop.element.io/jitsi.html` or `vector://webapp/jitsi.html`. + +The `jitsi.html` wrapper can use the react-sdk's `WidgetApi` to communicate, making +it easier to actually implement the feature. diff --git a/docs/labs.md b/docs/labs.md index 4c373248bc..cad9c5dd7c 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -72,11 +72,6 @@ theme definition. For some sample themes, check out [aaronraimist/element-themes](https://github.com/aaronraimist/element-themes). -## Dehydrated devices (`feature_dehydration`) - -Allows users to receive encrypted messages by creating a device that is stored -encrypted on the server, as described in [MSC2697](https://github.com/matrix-org/matrix-doc/pull/2697). - ## Live location sharing (`feature_location_share_live`) [In Development] Enables sharing your current location to the timeline, with live updates. @@ -110,10 +105,6 @@ This is useful while we experiment with encryption and to make calling compatibl Enables rendering of MD / HTML in room topics. -## New room header & details (`feature_new_room_decoration_ui`) [In Development] - -Refactors visually the room header and room sidebar - ## Enable the notifications panel in the room header (`feature_notifications`) Unreliable in encrypted rooms. diff --git a/linked-dependencies/matrix-react-sdk/docs/local-echo-dev.md b/docs/local-echo-dev.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/local-echo-dev.md rename to docs/local-echo-dev.md diff --git a/linked-dependencies/matrix-react-sdk/docs/media-handling.md b/docs/media-handling.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/media-handling.md rename to docs/media-handling.md diff --git a/docs/modules.md b/docs/modules.md index c44f71205a..68dabd29f8 100644 --- a/docs/modules.md +++ b/docs/modules.md @@ -23,11 +23,11 @@ the current directory as the build context (the `.` in `docker build -t my-eleme ## Writing modules While writing modules is meant to be easy, not everything is possible yet. For modules which want to do something we haven't -exposed in the module API, the module API will need to be updated. This means a PR to both the -[`matrix-react-sdk`](https://github.com/matrix-org/matrix-react-sdk) and [`matrix-react-sdk-module-api`](https://github.com/matrix-org/matrix-react-sdk-module-api). +exposed in the module API, the module API will need to be updated. This means a PR to both this repo +and [`matrix-react-sdk-module-api`](https://github.com/matrix-org/matrix-react-sdk-module-api). Once your change to the module API is accepted, the `@matrix-org/react-sdk-module-api` dependency gets updated at the -`matrix-react-sdk` and `element-web` layers (usually by us, the maintainers) to ensure your module can operate. +`element-web` layer (usually by us, the maintainers) to ensure your module can operate. If you're not adding anything to the module API, or your change was accepted per above, then start off with a clone of our [ILAG module](https://github.com/element-hq/element-web-ilag-module) which will give you a general idea for what the diff --git a/linked-dependencies/matrix-react-sdk/docs/playwright.md b/docs/playwright.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/playwright.md rename to docs/playwright.md diff --git a/docs/release.md b/docs/release.md index 6b19bfc312..5074039374 100644 --- a/docs/release.md +++ b/docs/release.md @@ -22,7 +22,7 @@ The master branch is the most stable as it is the very latest non-RC release. De

Versions

-The matrix-js-sdk follows semver, the matrix-react-sdk loosely follows semver, most releases for both will bump the minor version number. +The matrix-js-sdk follows semver, most releases will bump the minor version number. Breaking changes will bump the major version number. Element Web & Element Desktop do not follow semver and always have matching version numbers. The patch version number is normally incremented for every release. @@ -80,11 +80,10 @@ This label will automagically convert to `X-Release-Blocker` at the conclusion o

Repositories

-This release process revolves around our four main repositories: +This release process revolves around our main repositories: - [Element Desktop](https://github.com/element-hq/element-desktop/) - [Element Web](https://github.com/element-hq/element-web/) -- [Matrix React SDK](https://github.com/matrix-org/matrix-react-sdk/) - [Matrix JS SDK](https://github.com/matrix-org/matrix-js-sdk/) We own other repositories, but they have more ad-hoc releases and are not part of the bi-weekly cycle: @@ -117,14 +116,13 @@ flowchart TD subgraph Releasing R1[[Releasing matrix-js-sdk]] - R2[[Releasing matrix-react-sdk]] - R3[[Releasing element-web]] - R4[[Releasing element-desktop]] + R2[[Releasing element-web]] + R3[[Releasing element-desktop]] - R1 --> R2 --> R3 --> R4 + R1 --> R2 --> R3 end - R4 --> D1 + R3 --> D1 subgraph Deploying D1[\Deploy staging.element.io/] @@ -198,12 +196,6 @@ switched back to the version of the dependency from the master branch to not lea - [ ] Make any changes to the release notes in the draft release as are necessary - **Do not click publish, only save draft** - [ ] Kick off a release using [the automation](https://github.com/matrix-org/matrix-js-sdk/actions/workflows/release.yml) - making sure to select the right type of release. For anything other than an RC: choose final. You should not need to ever switch off either of the Publishing options. -### Matrix React SDK - -- [ ] Check the draft release which has been generated by [the automation](https://github.com/element-hq/matrix-react-sdk/actions/workflows/release-drafter.yml) -- [ ] Make any changes to the release notes in the draft release as are necessary - **Do not click publish, only save draft** -- [ ] Kick off a release using [the automation](https://github.com/element-hq/matrix-react-sdk/actions/workflows/release.yml) - making sure to select the right type of release. For anything other than an RC: choose final. You should not need to ever switch off either of the Publishing options. - ### Element Web - [ ] Check the draft release which has been generated by [the automation](https://github.com/element-hq/element-web/actions/workflows/release-drafter.yml) @@ -256,8 +248,6 @@ For the first RC of a given release cycle do these steps: - [ ] Go to the [matrix-js-sdk Renovate dashboard](https://github.com/matrix-org/matrix-js-sdk/issues/2406) and click the checkbox to create/update its PRs. -- [ ] Go to the [matrix-react-sdk Renovate dashboard](https://github.com/element-hq/matrix-react-sdk/issues/6) and click the checkbox to create/update its PRs. - - [ ] Go to the [element-web Renovate dashboard](https://github.com/element-hq/element-web/issues/22941) and click the checkbox to create/update its PRs. - [ ] Go to the [element-desktop Renovate dashboard](https://github.com/element-hq/element-desktop/issues/465) and click the checkbox to create/update its PRs. diff --git a/linked-dependencies/matrix-react-sdk/docs/room-list-store.md b/docs/room-list-store.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/room-list-store.md rename to docs/room-list-store.md diff --git a/linked-dependencies/matrix-react-sdk/docs/scrolling.md b/docs/scrolling.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/scrolling.md rename to docs/scrolling.md diff --git a/linked-dependencies/matrix-react-sdk/docs/settings.md b/docs/settings.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/settings.md rename to docs/settings.md diff --git a/linked-dependencies/matrix-react-sdk/docs/skinning.md b/docs/skinning.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/skinning.md rename to docs/skinning.md diff --git a/docs/theming.md b/docs/theming.md index 7c928a83ca..100baeca71 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -3,21 +3,17 @@ Themes are a very basic way of providing simple alternative look & feels to the Element app via CSS & custom imagery. -They are _NOT_ co be confused with 'skins', which describe apps which sit on top -of matrix-react-sdk - e.g. in theory Element itself is a react-sdk skin. -As of March 2022, skins are not fully supported; Element is the only available skin. - To define a theme for Element: 1. Pick a name, e.g. `teal`. at time of writing we have `light` and `dark`. -2. Fork `src/skins/vector/css/themes/dark.pcss` to be `teal.pcss` -3. Fork `src/skins/vector/css/themes/_base.pcss` to be `_teal.pcss` +2. Fork `res/themes/dark/css/dark.pcss` to be `teal.pcss` +3. Fork `res/themes/dark/css/_base.pcss` to be `_teal.pcss` 4. Override variables in `_teal.pcss` as desired. You may wish to delete ones which don't differ from `_base.pcss`, to make it clear which are being overridden. If every single colour is being changed (as per `_dark.pcss`) then you might as well keep them all. 5. Add the theme to the list of entrypoints in webpack.config.js -6. Add the theme to the list of themes in matrix-react-sdk's UserSettings.js +6. Add the theme to the list of themes in theme.ts 7. Sit back and admire your handywork. In future, the assets for a theme will probably be gathered together into a @@ -33,7 +29,7 @@ default theme, you would use `default_theme: "custom-Electric Blue"`. e.g. in config.json: -``` +```json5 "setting_defaults": { "custom_themes": [ { @@ -63,6 +59,10 @@ e.g. in config.json: "timeline-text-color": "#2e2f32", "timeline-text-secondary-color": "#61708b", "timeline-highlights-color": "#f3f8fd", + + // These should both be 8 values long + "username-colors": ["#ff0000", /*...*/], + "avatar-background-colors": ["#cc0000", /*...*/] }, "compound": { "--cpd-color-icon-accent-tertiary": "var(--cpd-color-blue-800)", diff --git a/docs/translating-dev.md b/docs/translating-dev.md index 821b0e83ab..e2a8e2c82a 100644 --- a/docs/translating-dev.md +++ b/docs/translating-dev.md @@ -3,13 +3,12 @@ ## Requirements - A working [Development Setup](../README.md#setting-up-a-dev-environment) - - Including up-to-date versions of matrix-react-sdk and matrix-js-sdk - Latest LTS version of Node.js installed - Be able to understand English ## Translating strings vs. marking strings for translation -Translating strings are done with the `_t()` function found in matrix-react-sdk/lib/languageHandler.js. +Translating strings are done with the `_t()` function found in `languageHandler.tsx`. It is recommended to call this function wherever you introduce a string constant which should be translated. However, translating can not be performed until after the translation system has been initialized. Thus, sometimes translation must be performed at a different location in the source code than where the string is introduced. @@ -49,7 +48,7 @@ We are aiming for a set of common strings to be shared then some more localised ## Adding new strings -1. Check if the import `import { _t } from 'matrix-react-sdk/src/languageHandler';` is present. If not add it to the other import statements. Also import `_td` if needed. +1. Check if the import `import { _t } from ".../languageHandler";` is present. If not add it to the other import statements. Also import `_td` if needed. 1. Add `_t()` to your string passing the translation key you come up with based on the rules above. If the string is introduced at a point before the translation system has not yet been initialized, use `_td()` instead, and call `_t()` at the appropriate time. 1. Run `yarn i18n` to add the keys to `src/i18n/strings/en_EN.json` 1. Modify the new entries in `src/i18n/strings/en_EN.json` with the English (UK) translations for the added keys. diff --git a/linked-dependencies/matrix-react-sdk/docs/usercontent.md b/docs/usercontent.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/usercontent.md rename to docs/usercontent.md diff --git a/linked-dependencies/matrix-react-sdk/docs/widget-layouts.md b/docs/widget-layouts.md similarity index 100% rename from linked-dependencies/matrix-react-sdk/docs/widget-layouts.md rename to docs/widget-layouts.md diff --git a/element.io/app/config.json b/element.io/app/config.json index 4dcc75aeeb..771df35091 100644 --- a/element.io/app/config.json +++ b/element.io/app/config.json @@ -46,5 +46,13 @@ "map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx", "setting_defaults": { "RustCrypto.staged_rollout_percent": 60 + }, + "features": { + "feature_video_rooms": true, + "feature_group_calls": true, + "feature_element_call_video_rooms": true + }, + "element_call": { + "url": "https://call.element.io" } } diff --git a/element.io/develop/config.json b/element.io/develop/config.json index 91b7edc610..aaee51afd0 100644 --- a/element.io/develop/config.json +++ b/element.io/develop/config.json @@ -49,7 +49,6 @@ "privacy_policy_url": "https://element.io/cookie-policy", "features": { "threadsActivityCentre": true, - "feature_new_room_decoration_ui": true, "feature_video_rooms": true, "feature_group_calls": true, "feature_element_call_video_rooms": true diff --git a/jest.config.ts b/jest.config.ts index 4affb009e0..9076ceedd9 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -26,52 +26,63 @@ const config: Config = { testEnvironmentOptions: { url: "http://localhost/", }, - testMatch: ["/test/unit-tests/tchap/**/*-test.[tj]s?(x)"], // :TCHAP: only tchap tests - setupFiles: ["jest-canvas-mock"], - setupFilesAfterEnv: [ - "/node_modules/matrix-react-sdk/test/setupTests.ts", - "/test/setup/setupLanguage.ts", - "/test/setupTests.ts", - ], + testMatch: ["/test/**/*-test.[tj]s?(x)"], + globalSetup: "/test/globalSetup.ts", + setupFiles: ["jest-canvas-mock", "web-streams-polyfill/polyfill"], + setupFilesAfterEnv: ["/test/setupTests.ts"], moduleNameMapper: { "\\.(css|scss|pcss)$": "/__mocks__/cssMock.js", - "\\.(gif|png|ttf|woff2)$": "/node_modules/matrix-react-sdk/__mocks__/imageMock.js", - "\\.svg$": "/node_modules/matrix-react-sdk/__mocks__/svg.js", - "\\$webapp/i18n/languages.json": "/node_modules/matrix-react-sdk/__mocks__/languages.json", + "\\.(gif|png|ttf|woff2)$": "/__mocks__/imageMock.js", + "\\.svg$": "/__mocks__/svg.js", + "\\$webapp/i18n/languages.json": "/__mocks__/languages.json", "^react$": "/node_modules/react", "^react-dom$": "/node_modules/react-dom", "^matrix-js-sdk$": "/node_modules/matrix-js-sdk/src", - "^matrix-react-sdk$": "/node_modules/matrix-react-sdk/src", - "decoderWorker\\.min\\.js": "/node_modules/matrix-react-sdk/__mocks__/empty.js", - "decoderWorker\\.min\\.wasm": "/node_modules/matrix-react-sdk/__mocks__/empty.js", - "waveWorker\\.min\\.js": "/node_modules/matrix-react-sdk/__mocks__/empty.js", - "context-filter-polyfill": "/node_modules/matrix-react-sdk/__mocks__/empty.js", - "FontManager.ts": "/node_modules/matrix-react-sdk/__mocks__/FontManager.js", - "workers/(.+)Factory": "/node_modules/matrix-react-sdk/__mocks__/workerFactoryMock.js", + "^matrix-react-sdk$": "/src", + "decoderWorker\\.min\\.js": "/__mocks__/empty.js", + "decoderWorker\\.min\\.wasm": "/__mocks__/empty.js", + "waveWorker\\.min\\.js": "/__mocks__/empty.js", + "context-filter-polyfill": "/__mocks__/empty.js", + "FontManager.ts": "/__mocks__/FontManager.js", + "workers/(.+)Factory": "/__mocks__/workerFactoryMock.js", "^!!raw-loader!.*": "jest-raw-loader", - "recorderWorkletFactory": "/node_modules/matrix-react-sdk/__mocks__/empty.js", + "recorderWorkletFactory": "/__mocks__/empty.js", "^fetch-mock$": "/node_modules/fetch-mock", // :TCHAP: "MImageBody": "/src/tchap/customisations/components/views/messages/ContentScanningImageBody.tsx", - "../../../../../../src/tchap/components/views/messages/OriginalFileBody": + "/src/tchap/components/views/messages/OriginalFileBody": "/node_modules/matrix-react-sdk/src/components/views/messages/MImageBody.tsx", "MAudioBody": "/src/tchap/customisations/components/views/messages/ContentScanningAudioBody.tsx", - "../../../../../../src/tchap/components/views/messages/OriginalAudioBody": + "/src/tchap/components/views/messages/OriginalAudioBody": "/node_modules/matrix-react-sdk/src/components/views/messages/MAudioBody.tsx", "MStickerBody": "/src/tchap/customisations/components/views/messages/ContentScanningStickerBody.tsx", - "~matrix-react-sdk/(.*)": "/linked-dependencies/matrix-react-sdk/$1", "~tchap-web/(.*)": "/$1", - "matrix-react-sdk/(.*)": "/linked-dependencies/matrix-react-sdk/$1", // end :TCHAP: }, - transformIgnorePatterns: ["/node_modules/(?!matrix-js-sdk|matrix-react-sdk).+$"], + transformIgnorePatterns: ["/node_modules/(?!(mime|matrix-js-sdk)).+$"], + collectCoverageFrom: [ + "/src/**/*.{js,ts,tsx}", + // getSessionLock is piped into a different JS context via stringification, and the coverage functionality is + // not available in that contest. So, turn off coverage instrumentation for it. + "!/src/utils/SessionLock.ts", + // Coverage chokes on type definition files + "!/src/**/*.d.ts", + ], coverageReporters: ["text-summary", "lcov"], testResultsProcessor: "@casualbot/jest-sonar-reporter", + prettierPath: null, + moduleDirectories: ["node_modules", "test/test-utils"], }; // if we're running under GHA, enable the GHA reporter if (env["GITHUB_ACTIONS"] !== undefined) { - config.reporters = [["github-actions", { silent: false }], "summary"]; + const reporters: Config["reporters"] = [["github-actions", { silent: false }], "summary"]; + + // if we're running against the develop branch, also enable the slow test reporter + if (env["GITHUB_REF"] == "refs/heads/develop") { + reporters.push("/test/slowReporter.cjs"); + } + config.reporters = reporters; } export default config; diff --git a/knip.ts b/knip.ts new file mode 100644 index 0000000000..247f9d9789 --- /dev/null +++ b/knip.ts @@ -0,0 +1,53 @@ +import { KnipConfig } from "knip"; + +export default { + entry: [ + "src/vector/index.ts", + "src/serviceworker/index.ts", + "src/workers/*.worker.ts", + "src/utils/exportUtils/exportJS.js", + "scripts/**", + "playwright/**", + "test/**", + "res/decoder-ring/**", + ], + project: ["**/*.{js,ts,jsx,tsx}"], + ignore: [ + "docs/**", + "res/jitsi_external_api.min.js", + // Used by jest + "__mocks__/maplibre-gl.js", + // Keep for now + "src/hooks/useLocalStorageState.ts", + "src/components/views/elements/InfoTooltip.tsx", + "src/components/views/elements/StyledCheckbox.tsx", + ], + ignoreDependencies: [ + // Required for `action-validator` + "@action-validator/*", + // Used for git pre-commit hooks + "husky", + // Used by jest + "babel-jest", + // Used by babel + "@babel/runtime", + "@babel/plugin-transform-class-properties", + // Referenced in PCSS + "github-markdown-css", + // False positive + "sw.js", + // Used by webpack + "buffer", + "process", + "util", + // Used by workflows + "ts-prune", + // Required due to bug in bloom-filters https://github.com/Callidon/bloom-filters/issues/75 + "@types/seedrandom", + ], + ignoreBinaries: [ + // Used in scripts & workflows + "jq", + ], + ignoreExportsUsedInFile: true, +} satisfies KnipConfig; diff --git a/linked-dependencies/matrix-react-sdk/.editorconfig b/linked-dependencies/matrix-react-sdk/.editorconfig deleted file mode 100644 index c4328ae914..0000000000 --- a/linked-dependencies/matrix-react-sdk/.editorconfig +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2024 New Vector Ltd. -# Copyright 2017 Aviral Dasgupta -# -# SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only -# Please see LICENSE files in the repository root for full details. - -root = true - -[*] -charset=utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true - -[*.{yml,yaml}] -indent_size = 4 - -[*.tsx.snap] -trim_trailing_whitespace = false diff --git a/linked-dependencies/matrix-react-sdk/.eslintignore b/linked-dependencies/matrix-react-sdk/.eslintignore deleted file mode 100644 index 5d117f54b5..0000000000 --- a/linked-dependencies/matrix-react-sdk/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -test/end-to-end-tests/node_modules/ -test/end-to-end-tests/element/ -test/end-to-end-tests/synapse/ -test/end-to-end-tests/lib/ -# Legacy skinning file that some people might still have -src/component-index.js diff --git a/linked-dependencies/matrix-react-sdk/.eslintrc.js b/linked-dependencies/matrix-react-sdk/.eslintrc.js deleted file mode 100644 index a3c7eb4f8d..0000000000 --- a/linked-dependencies/matrix-react-sdk/.eslintrc.js +++ /dev/null @@ -1,286 +0,0 @@ -module.exports = { - plugins: ["matrix-org"], - extends: ["plugin:matrix-org/babel", "plugin:matrix-org/react", "plugin:matrix-org/a11y"], - parserOptions: { - project: ["./tsconfig.json"], - }, - env: { - browser: true, - node: true, - }, - globals: { - LANGUAGES_FILE: "readonly", - }, - rules: { - // Things we do that break the ideal style - "no-constant-condition": "off", - "prefer-promise-reject-errors": "off", - "no-async-promise-executor": "off", - "no-extra-boolean-cast": "off", - - // Bind or arrow functions in props causes performance issues (but we - // currently use them in some places). - // It's disabled here, but we should using it sparingly. - "react/jsx-no-bind": "off", - "react/jsx-key": ["error"], - - "no-restricted-properties": [ - "error", - ...buildRestrictedPropertiesOptions( - ["window.innerHeight", "window.innerWidth", "window.visualViewport"], - "Use UIStore to access window dimensions instead.", - ), - ...buildRestrictedPropertiesOptions( - ["*.mxcUrlToHttp", "*.getHttpUriForMxc"], - "Use Media helper instead to centralise access for customisation.", - ), - ...buildRestrictedPropertiesOptions(["window.setImmediate"], "Use setTimeout instead."), - ], - "no-restricted-globals": [ - "error", - { - name: "setImmediate", - message: "Use setTimeout instead.", - }, - ], - - "import/no-duplicates": ["error"], - // Ban matrix-js-sdk/src imports in favour of matrix-js-sdk/src/matrix imports to prevent unleashing hell. - "no-restricted-imports": [ - "error", - { - paths: [ - { - name: "matrix-js-sdk", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-js-sdk/", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-js-sdk/src", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-js-sdk/src/", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-js-sdk/src/index", - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - name: "matrix-react-sdk", - message: "Please use matrix-react-sdk/src/index instead", - }, - { - name: "matrix-react-sdk/", - message: "Please use matrix-react-sdk/src/index instead", - }, - { - name: "emojibase-regex", - message: - "This regex doesn't actually test for emoji. See the docs at https://emojibase.dev/docs/regex/ and prefer our own EMOJI_REGEX from HtmlUtils.", - }, - ], - patterns: [ - { - group: [ - "matrix-js-sdk/src/**", - "!matrix-js-sdk/src/matrix", - "!matrix-js-sdk/src/crypto-api", - "!matrix-js-sdk/src/types", - "!matrix-js-sdk/src/testing", - "matrix-js-sdk/lib", - "matrix-js-sdk/lib/", - "matrix-js-sdk/lib/**", - // XXX: Temporarily allow these as they are not available via the main export - "!matrix-js-sdk/src/logger", - "!matrix-js-sdk/src/errors", - "!matrix-js-sdk/src/utils", - "!matrix-js-sdk/src/version-support", - "!matrix-js-sdk/src/randomstring", - "!matrix-js-sdk/src/sliding-sync", - "!matrix-js-sdk/src/browser-index", - "!matrix-js-sdk/src/feature", - "!matrix-js-sdk/src/NamespacedValue", - "!matrix-js-sdk/src/ReEmitter", - "!matrix-js-sdk/src/event-mapper", - "!matrix-js-sdk/src/interactive-auth", - "!matrix-js-sdk/src/secret-storage", - "!matrix-js-sdk/src/room-hierarchy", - "!matrix-js-sdk/src/rendezvous", - "!matrix-js-sdk/src/indexeddb-worker", - "!matrix-js-sdk/src/pushprocessor", - "!matrix-js-sdk/src/extensible_events_v1", - "!matrix-js-sdk/src/extensible_events_v1/PollStartEvent", - "!matrix-js-sdk/src/extensible_events_v1/PollResponseEvent", - "!matrix-js-sdk/src/extensible_events_v1/PollEndEvent", - "!matrix-js-sdk/src/extensible_events_v1/InvalidEventError", - "!matrix-js-sdk/src/crypto", - "!matrix-js-sdk/src/crypto/aes", - "!matrix-js-sdk/src/crypto/keybackup", - "!matrix-js-sdk/src/crypto/deviceinfo", - "!matrix-js-sdk/src/crypto/dehydration", - "!matrix-js-sdk/src/oidc", - "!matrix-js-sdk/src/oidc/discovery", - "!matrix-js-sdk/src/oidc/authorize", - "!matrix-js-sdk/src/oidc/validate", - "!matrix-js-sdk/src/oidc/error", - "!matrix-js-sdk/src/oidc/register", - "!matrix-js-sdk/src/webrtc", - "!matrix-js-sdk/src/webrtc/call", - "!matrix-js-sdk/src/webrtc/callFeed", - "!matrix-js-sdk/src/webrtc/mediaHandler", - "!matrix-js-sdk/src/webrtc/callEventTypes", - "!matrix-js-sdk/src/webrtc/callEventHandler", - "!matrix-js-sdk/src/webrtc/groupCallEventHandler", - "!matrix-js-sdk/src/models", - "!matrix-js-sdk/src/models/read-receipt", - "!matrix-js-sdk/src/models/relations-container", - "!matrix-js-sdk/src/models/related-relations", - "!matrix-js-sdk/src/matrixrtc", - ], - message: "Please use matrix-js-sdk/src/matrix instead", - }, - { - group: ["emojibase-regex/emoji*"], - message: - "This regex doesn't actually test for emoji. See the docs at https://emojibase.dev/docs/regex/ and prefer our own EMOJI_REGEX from HtmlUtils.", - }, - ], - }, - ], - - // There are too many a11y violations to fix at once - // Turn violated rules off until they are fixed - "jsx-a11y/aria-activedescendant-has-tabindex": "off", - "jsx-a11y/click-events-have-key-events": "off", - "jsx-a11y/interactive-supports-focus": "off", - "jsx-a11y/media-has-caption": "off", - "jsx-a11y/mouse-events-have-key-events": "off", - "jsx-a11y/no-autofocus": "off", - "jsx-a11y/no-noninteractive-element-interactions": "off", - "jsx-a11y/no-noninteractive-element-to-interactive-role": "off", - "jsx-a11y/no-noninteractive-tabindex": "off", - "jsx-a11y/no-static-element-interactions": "off", - "jsx-a11y/role-supports-aria-props": "off", - - "matrix-org/require-copyright-header": "error", - }, - overrides: [ - { - files: ["src/**/*.{ts,tsx}", "test/**/*.{ts,tsx}", "playwright/**/*.ts"], - extends: ["plugin:matrix-org/typescript", "plugin:matrix-org/react"], - rules: { - "@typescript-eslint/explicit-function-return-type": [ - "error", - { - allowExpressions: true, - }, - ], - - // Things we do that break the ideal style - "prefer-promise-reject-errors": "off", - "no-extra-boolean-cast": "off", - - // Remove Babel things manually due to override limitations - "@babel/no-invalid-this": ["off"], - - // We're okay being explicit at the moment - "@typescript-eslint/no-empty-interface": "off", - // We disable this while we're transitioning - "@typescript-eslint/no-explicit-any": "off", - // We'd rather not do this but we do - "@typescript-eslint/ban-ts-comment": "off", - // We're okay with assertion errors when we ask for them - "@typescript-eslint/no-non-null-assertion": "off", - }, - }, - // temporary override for offending icon require files - { - files: [ - "src/SdkConfig.ts", - "src/components/structures/FileDropTarget.tsx", - "src/components/structures/RoomStatusBar.tsx", - "src/components/structures/UserMenu.tsx", - "src/components/views/avatars/WidgetAvatar.tsx", - "src/components/views/dialogs/AddExistingToSpaceDialog.tsx", - "src/components/views/dialogs/ForwardDialog.tsx", - "src/components/views/dialogs/InviteDialog.tsx", - "src/components/views/dialogs/ModalWidgetDialog.tsx", - "src/components/views/dialogs/UploadConfirmDialog.tsx", - "src/components/views/dialogs/security/SetupEncryptionDialog.tsx", - "src/components/views/elements/AddressTile.tsx", - "src/components/views/elements/AppWarning.tsx", - "src/components/views/elements/SSOButtons.tsx", - "src/components/views/messages/MAudioBody.tsx", - "src/components/views/messages/MImageBody.tsx", - "src/components/views/messages/MFileBody.tsx", - "src/components/views/messages/MStickerBody.tsx", - "src/components/views/messages/MVideoBody.tsx", - "src/components/views/messages/MVoiceMessageBody.tsx", - "src/components/views/right_panel/EncryptionPanel.tsx", - "src/components/views/rooms/EntityTile.tsx", - "src/components/views/rooms/LinkPreviewGroup.tsx", - "src/components/views/rooms/MemberList.tsx", - "src/components/views/rooms/MessageComposer.tsx", - "src/components/views/rooms/ReplyPreview.tsx", - "src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx", - "src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx", - ], - rules: { - "@typescript-eslint/no-var-requires": "off", - }, - }, - { - files: ["test/**/*.{ts,tsx}", "playwright/**/*.ts"], - extends: ["plugin:matrix-org/jest"], - rules: { - // We don't need super strict typing in test utilities - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-member-accessibility": "off", - - // Jest/Playwright specific - - // Disabled tests are a reality for now but as soon as all of the xits are - // eliminated, we should enforce this. - "jest/no-disabled-tests": "off", - // Also treat "oldBackendOnly" as a test function. - // Used in some crypto tests. - "jest/no-standalone-expect": [ - "error", - { - additionalTestBlockFunctions: ["beforeAll", "beforeEach", "oldBackendOnly"], - }, - ], - }, - }, - { - files: ["playwright/**/*.ts"], - parserOptions: { - project: ["./playwright/tsconfig.json"], - }, - }, - ], - settings: { - react: { - version: "detect", - }, - }, -}; - -function buildRestrictedPropertiesOptions(properties, message) { - return properties.map((prop) => { - let [object, property] = prop.split("."); - if (object === "*") { - object = undefined; - } - return { - object, - property, - message, - }; - }); -} diff --git a/linked-dependencies/matrix-react-sdk/.git-blame-ignore-revs b/linked-dependencies/matrix-react-sdk/.git-blame-ignore-revs deleted file mode 100644 index a1feb1a6e4..0000000000 --- a/linked-dependencies/matrix-react-sdk/.git-blame-ignore-revs +++ /dev/null @@ -1,2 +0,0 @@ -# prettier -526645c79160ab1ad4b4c3845de27d51263a405e diff --git a/linked-dependencies/matrix-react-sdk/.github/CODEOWNERS b/linked-dependencies/matrix-react-sdk/.github/CODEOWNERS deleted file mode 100644 index e7a976a7be..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/CODEOWNERS +++ /dev/null @@ -1,18 +0,0 @@ -* @element-hq/element-web-reviewers -/.github/workflows/** @element-hq/element-web-team -/package.json @element-hq/element-web-team -/yarn.lock @element-hq/element-web-team - -/src/SecurityManager.ts @element-hq/element-crypto-web-reviewers -/test/SecurityManager-test.ts @element-hq/element-crypto-web-reviewers -/src/async-components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers -/src/components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers -/test/components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers -/src/stores/SetupEncryptionStore.ts @element-hq/element-crypto-web-reviewers -/test/stores/SetupEncryptionStore-test.ts @element-hq/element-crypto-web-reviewers - -# Ignore translations as those will be updated by GHA for Localazy download -/src/i18n/strings -# Ignore the synapse plugin as this is updated by GHA for docker image updating -/playwright/plugins/homeserver/synapse/index.ts - diff --git a/linked-dependencies/matrix-react-sdk/.github/FUNDING.yml b/linked-dependencies/matrix-react-sdk/.github/FUNDING.yml deleted file mode 100644 index afc29f0142..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -patreon: matrixdotorg -liberapay: matrixdotorg diff --git a/linked-dependencies/matrix-react-sdk/.github/PULL_REQUEST_TEMPLATE.md b/linked-dependencies/matrix-react-sdk/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 2571bc1458..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ - - -## Checklist - -- [ ] Tests written for new code (and old code if feasible). -- [ ] New or updated `public`/`exported` symbols have accurate [TSDoc](https://tsdoc.org/) documentation. -- [ ] Linter and other CI checks pass. -- [ ] I have licensed the changes to Element by completing the [Contributor License Agreement (CLA)](https://cla-assistant.io/element-hq/matrix-react-sdk) diff --git a/linked-dependencies/matrix-react-sdk/.github/labels.yml b/linked-dependencies/matrix-react-sdk/.github/labels.yml deleted file mode 100644 index 7c4b66d7f0..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/labels.yml +++ /dev/null @@ -1,28 +0,0 @@ -- name: "A-Timesheet-1" - description: "Log any time spent on this into the A-Timesheet-1 project" - color: "5319E7" -- name: "backport staging" - description: "Label to automatically backport PR to staging branch" - color: "B60205" -- name: "Dependencies" - description: "Pull requests that update a dependency file" - color: "0366d6" -- name: "Sponsored" - color: "b506d8" -- name: "T-Deprecation" - description: "A pull request that makes something deprecated" - color: "98e6ae" -- name: "X-Blocked" - description: "The PR cannot move forward in any capacity until an action is made" - color: "ff7979" -- name: "X-Breaking-Change" - color: "ff7979" -- name: "X-Upcoming-Release-Blocker" - description: "This does not affect the current release cycle but will affect the next one" - color: "e99695" -- name: "Z-Community-PR" - description: "Issue is solved by a community member's PR" - color: "ededed" -- name: "Z-Experiment" - description: "Experimental PR, primarily up for its Netlify build, high likelihood of never making it beyond here." - color: "b60205" diff --git a/linked-dependencies/matrix-react-sdk/.github/release-drafter.yml b/linked-dependencies/matrix-react-sdk/.github/release-drafter.yml deleted file mode 100644 index e9d334f61b..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/release-drafter.yml +++ /dev/null @@ -1 +0,0 @@ -_extends: matrix-org/matrix-js-sdk diff --git a/linked-dependencies/matrix-react-sdk/.github/renovate.json b/linked-dependencies/matrix-react-sdk/.github/renovate.json deleted file mode 100644 index 76320426d9..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/renovate.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["github>matrix-org/renovate-config-element-web"] -} diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/backport.yml b/linked-dependencies/matrix-react-sdk/.github/workflows/backport.yml deleted file mode 100644 index dd793898ec..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/backport.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Backport -on: - pull_request_target: - types: - - closed - - labeled - branches: - - develop - -jobs: - backport: - name: Backport - runs-on: ubuntu-latest - # Only react to merged PRs for security reasons. - # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. - if: > - github.event.pull_request.merged - && ( - github.event.action == 'closed' - || ( - github.event.action == 'labeled' - && contains(github.event.label.name, 'backport') - ) - ) - steps: - - uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2 - with: - labels_template: "<%= JSON.stringify([...labels, 'X-Release-Blocker']) %>" - # We can't use GITHUB_TOKEN here or CI won't run on the new PR - github_token: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/end-to-end-tests.yaml b/linked-dependencies/matrix-react-sdk/.github/workflows/end-to-end-tests.yaml deleted file mode 100644 index 97d9692a38..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/end-to-end-tests.yaml +++ /dev/null @@ -1,208 +0,0 @@ -# Produce a build of element-web with this version of react-sdk -# and any matching branches of element-web and js-sdk, output it -# as an artifact and run end-to-end tests. -name: End to End Tests -on: - pull_request: {} - merge_group: - types: [checks_requested] - push: - branches: [develop, master] - repository_dispatch: - types: [upstream-sdk-notify] - - # support triggering from other workflows - workflow_call: - inputs: - skip: - type: boolean - required: false - default: false - description: "A boolean to skip the playwright check itself while still creating the passing check. Useful when only running in Merge Queues." - - react-sdk-repository: - type: string - required: true - description: "The name of the github repository to check out and build." - - matrix-js-sdk-sha: - type: string - required: false - description: "The Git SHA of matrix-js-sdk to build against. By default, will use a matching branch name if it exists, or develop." - element-web-sha: - type: string - required: false - description: "The Git SHA of element-web to build against. By default, will use a matching branch name if it exists, or develop." - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -env: - # fetchdep.sh needs to know our PR number - PR_NUMBER: ${{ github.event.pull_request.number }} - -jobs: - build: - name: "Build Element-Web" - runs-on: ubuntu-latest - if: inputs.skip != true - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - repository: ${{ inputs.react-sdk-repository || github.repository }} - - - uses: actions/setup-node@v4 - with: - cache: "yarn" - node-version: "lts/*" - - - name: Fetch layered build - id: layered_build - env: - # tell layered.sh to check out the right sha of the JS-SDK & EW, if they were given one - JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }} - ELEMENT_WEB_GITHUB_BASE_REF: ${{ inputs.element-web-sha }} - run: | - scripts/ci/layered.sh - JSSDK_SHA=$(git -C matrix-js-sdk rev-parse --short=12 HEAD) - REACT_SHA=$(git rev-parse --short=12 HEAD) - VECTOR_SHA=$(git -C element-web rev-parse --short=12 HEAD) - echo "VERSION=$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA" >> $GITHUB_OUTPUT - - - name: Copy config - run: cp element.io/develop/config.json config.json - working-directory: ./element-web - - - name: Build - env: - CI_PACKAGE: true - VERSION: "${{ steps.layered_build.outputs.VERSION }}" - run: | - yarn build - echo $VERSION > webapp/version - working-directory: ./element-web - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: webapp - path: element-web/webapp - retention-days: 1 - - playwright: - name: "Run Tests ${{ matrix.runner }}/${{ strategy.job-total }}" - needs: build - if: inputs.skip != true - runs-on: ubuntu-latest - permissions: - actions: read - issues: read - pull-requests: read - strategy: - fail-fast: false - matrix: - # Run multiple instances in parallel to speed up the tests - runner: [1, 2, 3, 4, 5, 6] - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - path: matrix-react-sdk - repository: ${{ inputs.react-sdk-repository || github.repository }} - - - name: 📥 Download artifact - uses: actions/download-artifact@v4 - with: - name: webapp - path: webapp - - - uses: actions/setup-node@v4 - with: - cache: "yarn" - cache-dependency-path: matrix-react-sdk/yarn.lock - node-version: "lts/*" - - - name: Install dependencies - working-directory: matrix-react-sdk - run: yarn install --frozen-lockfile - - - name: Get installed Playwright version - id: playwright - working-directory: matrix-react-sdk - run: echo "version=$(yarn list --pattern @playwright/test --depth=0 --json --non-interactive --no-progress | jq -r '.data.trees[].name')" >> $GITHUB_OUTPUT - - - name: Cache playwright binaries - uses: actions/cache@v4 - id: playwright-cache - with: - path: | - ~/.cache/ms-playwright - key: ${{ runner.os }}-playwright-${{ steps.playwright.outputs.version }} - - - name: Install Playwright browsers - if: steps.playwright-cache.outputs.cache-hit != 'true' - working-directory: matrix-react-sdk - run: yarn playwright install --with-deps - - - name: Run Playwright tests - run: yarn playwright test --shard ${{ matrix.runner }}/${{ strategy.job-total }} - working-directory: matrix-react-sdk - - - name: Upload blob report to GitHub Actions Artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: all-blob-reports-${{ matrix.runner }} - path: matrix-react-sdk/blob-report - retention-days: 1 - - complete: - name: end-to-end-tests - needs: playwright - if: always() - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - if: inputs.skip != true - with: - persist-credentials: false - repository: ${{ inputs.react-sdk-repository || github.repository }} - - - uses: actions/setup-node@v4 - if: inputs.skip != true - with: - cache: "yarn" - node-version: "lts/*" - - - name: Install dependencies - if: inputs.skip != true - run: yarn install --frozen-lockfile - - - name: Download blob reports from GitHub Actions Artifacts - if: inputs.skip != true - uses: actions/download-artifact@v4 - with: - pattern: all-blob-reports-* - path: all-blob-reports - merge-multiple: true - - - name: Merge into HTML Report - if: inputs.skip != true - run: yarn playwright merge-reports --reporter=html,./playwright/flaky-reporter.ts,./playwright/stale-screenshot-reporter.ts ./all-blob-reports - env: - # Only pass creds to the flaky-reporter on main branch runs - GITHUB_TOKEN: ${{ github.ref_name == 'develop' && secrets.ELEMENT_BOT_TOKEN || '' }} - - # Upload the HTML report even if one of our reporters fails, this can happen when stale screenshots are detected - - name: Upload HTML report - if: always() && inputs.skip != true - uses: actions/upload-artifact@v4 - with: - name: html-report - path: playwright-report - retention-days: 14 - - - if: needs.playwright.result != 'skipped' && needs.playwright.result != 'success' - run: exit 1 diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/localazy_download.yaml b/linked-dependencies/matrix-react-sdk/.github/workflows/localazy_download.yaml deleted file mode 100644 index a880c3b2e4..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/localazy_download.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: Localazy Download -on: - workflow_dispatch: {} - schedule: - - cron: "0 6 * * 1,3,5" # Every Monday, Wednesday and Friday at 6am UTC -jobs: - download: - uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_download.yaml@main - secrets: - ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/localazy_upload.yaml b/linked-dependencies/matrix-react-sdk/.github/workflows/localazy_upload.yaml deleted file mode 100644 index 9ba79800db..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/localazy_upload.yaml +++ /dev/null @@ -1,11 +0,0 @@ -name: Localazy Upload -on: - push: - branches: [develop] - paths: - - "src/i18n/strings/en_EN.json" -jobs: - upload: - uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_upload.yaml@main - secrets: - LOCALAZY_WRITE_KEY: ${{ secrets.LOCALAZY_WRITE_KEY }} diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/notify-element-web.yml b/linked-dependencies/matrix-react-sdk/.github/workflows/notify-element-web.yml deleted file mode 100644 index 442a2f1082..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/notify-element-web.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Notify element-web -on: - push: - branches: [develop] - repository_dispatch: - types: [upstream-sdk-notify] -jobs: - notify-element-web: - name: "Notify Element Web" - runs-on: ubuntu-latest - # Only respect triggers from our develop branch, ignore that of forks - if: github.repository == 'element-hq/matrix-react-sdk' - steps: - - name: Notify element-web repo that a new SDK build is on develop - uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3 - with: - token: ${{ secrets.ELEMENT_BOT_TOKEN }} - repository: vector-im/element-web - event-type: element-web-notify diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/pull_request.yaml b/linked-dependencies/matrix-react-sdk/.github/workflows/pull_request.yaml deleted file mode 100644 index 1f49adfcc4..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/pull_request.yaml +++ /dev/null @@ -1,11 +0,0 @@ -name: Pull Request -on: - pull_request_target: - types: [opened, edited, labeled, unlabeled, synchronize] - merge_group: - types: [checks_requested] -jobs: - action: - uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop - secrets: - ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/release-drafter.yml b/linked-dependencies/matrix-react-sdk/.github/workflows/release-drafter.yml deleted file mode 100644 index d8afa80a9f..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: Release Drafter -on: - push: - branches: [staging] - workflow_dispatch: {} -concurrency: ${{ github.workflow }} -jobs: - draft: - uses: matrix-org/matrix-js-sdk/.github/workflows/release-drafter-workflow.yml@develop diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/release-gitflow.yml b/linked-dependencies/matrix-react-sdk/.github/workflows/release-gitflow.yml deleted file mode 100644 index b515bb4cc1..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/release-gitflow.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Gitflow merge-back master->develop -name: Merge master -> develop -on: - push: - branches: [master] -concurrency: ${{ github.repository }}-${{ github.workflow }} -jobs: - merge: - uses: matrix-org/matrix-js-sdk/.github/workflows/release-gitflow.yml@develop - secrets: inherit - with: - dependencies: | - matrix-js-sdk diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/release.yml b/linked-dependencies/matrix-react-sdk/.github/workflows/release.yml deleted file mode 100644 index 9d1cb6e2d2..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/release.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Release Process -on: - workflow_dispatch: - inputs: - mode: - description: What type of release - required: true - default: rc - type: choice - options: - - rc - - final - npm: - description: Publish to npm - required: true - type: boolean - default: true -concurrency: ${{ github.workflow }} -jobs: - release: - uses: matrix-org/matrix-js-sdk/.github/workflows/release-make.yml@develop - secrets: - ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - with: - final: ${{ inputs.mode == 'final' }} - npm: ${{ inputs.npm }} - downstreams: '["element-hq/element-web"]' diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/sonarqube.yml b/linked-dependencies/matrix-react-sdk/.github/workflows/sonarqube.yml deleted file mode 100644 index d9b26c78e8..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/sonarqube.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: SonarQube -on: - workflow_run: - workflows: ["Tests"] - types: - - completed -concurrency: - group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }} - cancel-in-progress: true -jobs: - sonarqube: - name: 🩻 SonarQube - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'merge_group' - uses: matrix-org/matrix-js-sdk/.github/workflows/sonarcloud.yml@develop - secrets: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - with: - sharded: true diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/static_analysis.yaml b/linked-dependencies/matrix-react-sdk/.github/workflows/static_analysis.yaml deleted file mode 100644 index 204d3c46f4..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/static_analysis.yaml +++ /dev/null @@ -1,149 +0,0 @@ -name: Static Analysis -on: - pull_request: {} - merge_group: - types: [checks_requested] - push: - branches: [develop, master] - repository_dispatch: - types: [upstream-sdk-notify] -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -env: - # fetchdep.sh needs to know our PR number - PR_NUMBER: ${{ github.event.pull_request.number }} - -jobs: - ts_lint: - name: "Typescript Syntax Check" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - cache: "yarn" - node-version: "lts/*" - - - name: Install Deps - run: "./scripts/ci/install-deps.sh" - - - name: Typecheck - run: "yarn run lint:types" - - - name: Switch js-sdk to release mode - working-directory: node_modules/matrix-js-sdk - run: | - scripts/switch_package_to_release.cjs - yarn install - yarn run build:compile - yarn run build:types - - - name: Typecheck (release mode) - run: "yarn run lint:types" - - # Temporary while we directly import matrix-js-sdk/src/* which means we need - # certain @types/* packages to make sense of matrix-js-sdk types. - #- name: Typecheck (release mode; no yarn link) - # if: github.event_name != 'pull_request' && github.ref_name != 'master' - # run: | - # yarn unlink matrix-js-sdk - # yarn add github:matrix-org/matrix-js-sdk#develop - # yarn install --force - # yarn run lint:types - - i18n_lint: - name: "i18n Check" - uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main - with: - hardcoded-words: "Element" - allowed-hardcoded-keys: | - console_dev_note - labs|element_call_video_rooms - labs|feature_disable_call_per_sender_encryption - voip|element_call - - rethemendex_lint: - name: "Rethemendex Check" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - run: ./res/css/rethemendex.sh - - - run: git diff --exit-code - - js_lint: - name: "ESLint" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - cache: "yarn" - node-version: "lts/*" - - # Does not need branch matching as only analyses this layer - - name: Install Deps - run: "yarn install" - - - name: Run Linter - run: "yarn run lint:js" - - style_lint: - name: "Style Lint" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - cache: "yarn" - node-version: "lts/*" - - # Does not need branch matching as only analyses this layer - - name: Install Deps - run: "yarn install" - - - name: Run Linter - run: "yarn run lint:style" - - workflow_lint: - name: "Workflow Lint" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - cache: "yarn" - node-version: "lts/*" - - # Does not need branch matching as only analyses this layer - - name: Install Deps - run: "yarn install --frozen-lockfile" - - - name: Run Linter - run: "yarn lint:workflows" - - analyse_dead_code: - name: "Analyse Dead Code" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - cache: "yarn" - node-version: "lts/*" - - - name: Install Deps - run: "scripts/ci/layered.sh" - - - name: Dead Code Analysis - run: | - cd element-web - yarn run analyse:unused-exports diff --git a/linked-dependencies/matrix-react-sdk/.github/workflows/sync-labels.yml b/linked-dependencies/matrix-react-sdk/.github/workflows/sync-labels.yml deleted file mode 100644 index bb22292a64..0000000000 --- a/linked-dependencies/matrix-react-sdk/.github/workflows/sync-labels.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Sync labels -on: - workflow_dispatch: {} - schedule: - - cron: "0 1 * * *" # 1am every day - push: - branches: - - develop - paths: - - .github/labels.yml -jobs: - sync-labels: - uses: element-hq/element-meta/.github/workflows/sync-labels.yml@develop - with: - LABELS: | - element-hq/element-meta - .github/labels.yml - DELETE: true - WET: true - secrets: - ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/linked-dependencies/matrix-react-sdk/.gitignore b/linked-dependencies/matrix-react-sdk/.gitignore deleted file mode 100644 index 3137cd555b..0000000000 --- a/linked-dependencies/matrix-react-sdk/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -/.npmrc -/*.log -package-lock.json - -/coverage -/node_modules -/lib - -# version file and tarball created by `npm pack` / `yarn pack` -/git-revision.txt -/matrix-react-sdk-*.tgz - -/.idea -# Legacy skinning file that some people might still have -/src/component-index.js - -.DS_Store -*.tmp - -.vscode -.vscode/ diff --git a/linked-dependencies/matrix-react-sdk/.husky/pre-commit b/linked-dependencies/matrix-react-sdk/.husky/pre-commit deleted file mode 100755 index f0e9c9e0cb..0000000000 --- a/linked-dependencies/matrix-react-sdk/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname "$0")/_/husky.sh" - -npx lint-staged --concurrent false diff --git a/linked-dependencies/matrix-react-sdk/.lintstagedrc b/linked-dependencies/matrix-react-sdk/.lintstagedrc deleted file mode 100644 index 58e673d4d2..0000000000 --- a/linked-dependencies/matrix-react-sdk/.lintstagedrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "*": "prettier --write", - "*.(ts|tsx|js|jsx)": ["eslint --fix"], - "*.pcss": ["stylelint"] -} diff --git a/linked-dependencies/matrix-react-sdk/.node-version b/linked-dependencies/matrix-react-sdk/.node-version deleted file mode 100644 index 209e3ef4b6..0000000000 --- a/linked-dependencies/matrix-react-sdk/.node-version +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/linked-dependencies/matrix-react-sdk/.prettierignore b/linked-dependencies/matrix-react-sdk/.prettierignore deleted file mode 100644 index 00556f1c26..0000000000 --- a/linked-dependencies/matrix-react-sdk/.prettierignore +++ /dev/null @@ -1,22 +0,0 @@ -/coverage -/lib - -/.idea -.vscode -.vscode/ - -# Legacy skinning file that some people might still have -/src/component-index.js - -/.npmrc -/*.log -package-lock.json -yarn.lock - -/src/i18n/strings - -# This file is owned, parsed, and generated by allchange, which doesn't comply with prettier -/CHANGELOG.md - -# This file is also machine-generated -/playwright/e2e/crypto/test_indexeddb_cryptostore_dump/dump.json diff --git a/linked-dependencies/matrix-react-sdk/.stylelintrc.js b/linked-dependencies/matrix-react-sdk/.stylelintrc.js deleted file mode 100644 index 259c626dee..0000000000 --- a/linked-dependencies/matrix-react-sdk/.stylelintrc.js +++ /dev/null @@ -1,50 +0,0 @@ -module.exports = { - extends: ["stylelint-config-standard"], - customSyntax: require("postcss-scss"), - plugins: ["stylelint-scss"], - rules: { - "comment-empty-line-before": null, - "declaration-empty-line-before": null, - "length-zero-no-unit": null, - "rule-empty-line-before": null, - "color-hex-length": null, - "at-rule-no-unknown": null, - "no-descending-specificity": null, - "scss/at-rule-no-unknown": [ - true, - { - // https://github.com/vector-im/element-web/issues/10544 - ignoreAtRules: ["define-mixin"], - }, - ], - // Disable `&_kind`-style selectors while our unused CSS approach is "Find & Replace All" - // rather than a CI thing. Shorthand selectors are harder to detect when searching for a - // class name. This regex is trying to *allow* anything except `&words`, such as `&::before`, - // `&.mx_Class`, etc. - "selector-nested-pattern": "^((&[ :.\\[,])|([^&]))", - // Disable some defaults - "selector-class-pattern": null, - "custom-property-pattern": null, - "selector-id-pattern": null, - "keyframes-name-pattern": null, - "alpha-value-notation": null, - "color-function-notation": null, - "selector-not-notation": null, - "import-notation": null, - "value-keyword-case": null, - "declaration-block-no-redundant-longhand-properties": null, - "declaration-block-no-duplicate-properties": [ - true, - // useful for fallbacks - { ignore: ["consecutive-duplicates-with-different-values"] }, - ], - "shorthand-property-no-redundant-values": null, - "property-no-vendor-prefix": null, - "value-no-vendor-prefix": null, - "selector-no-vendor-prefix": null, - "media-feature-name-no-vendor-prefix": null, - "number-max-precision": null, - "no-invalid-double-slash-comments": true, - "media-feature-range-notation": null, - }, -}; diff --git a/linked-dependencies/matrix-react-sdk/CHANGELOG.md b/linked-dependencies/matrix-react-sdk/CHANGELOG.md deleted file mode 100644 index ea2fb96617..0000000000 --- a/linked-dependencies/matrix-react-sdk/CHANGELOG.md +++ /dev/null @@ -1,16658 +0,0 @@ -Changes in [3.113.0](https://github.com/element-hq/matrix-react-sdk/releases/tag/v3.113.0) (2024-10-15) -======================================================================================================= -Updates to js-sdk v34.8.0, although react-sdk has already stopped using the insecure functionality in question, so this release contains no functional changes. - -Changes in [3.112.0](https://github.com/element-hq/matrix-react-sdk/releases/tag/v3.112.0) (2024-10-08) -======================================================================================================= -## ✨ Features - -* Roll back change to device isolation mode ([#104](https://github.com/element-hq/matrix-react-sdk/pull/104)). Contributed by @richvdh. -* Remove right panel toggling behaviour on room header buttons ([#100](https://github.com/element-hq/matrix-react-sdk/pull/100)). Contributed by @t3chguy. -* Improve error display for messages sent from insecure devices ([#93](https://github.com/element-hq/matrix-react-sdk/pull/93)). Contributed by @richvdh. -* Add labs option to exclude unverified devices ([#92](https://github.com/element-hq/matrix-react-sdk/pull/92)). Contributed by @richvdh. -* Improve contrast for timestamps, date separators \& spotlight trigger ([#91](https://github.com/element-hq/matrix-react-sdk/pull/91)). Contributed by @t3chguy. -* Open room settings on room header avatar click ([#88](https://github.com/element-hq/matrix-react-sdk/pull/88)). Contributed by @t3chguy. -* Use `strong` over `b` for improved a11y semantics ([#41](https://github.com/element-hq/matrix-react-sdk/pull/41)). Contributed by @t3chguy. -* Grant Element Call widget capabilities for "raise hand" feature ([#82](https://github.com/element-hq/matrix-react-sdk/pull/82)). Contributed by @AndrewFerr. -* Mobile registration optimizations and tests ([#62](https://github.com/element-hq/matrix-react-sdk/pull/62)). Contributed by @langleyd. -* Ignore chat effect when older than 48h ([#48](https://github.com/element-hq/matrix-react-sdk/pull/48)). Contributed by @florianduros. - -## 🐛 Bug Fixes - -* Fix untranslated keys being rendered in `/help` dialog ([#90](https://github.com/element-hq/matrix-react-sdk/pull/90)). Contributed by @t3chguy. -* Ensure timeline search results are visible even in video rooms ([#96](https://github.com/element-hq/matrix-react-sdk/pull/96)). Contributed by @t3chguy. -* Pop right panel timeline when unmaximising widget to avoid double timeline ([#94](https://github.com/element-hq/matrix-react-sdk/pull/94)). Contributed by @t3chguy. -* Fix accessible label on left panel spotlight trigger ([#87](https://github.com/element-hq/matrix-react-sdk/pull/87)). Contributed by @t3chguy. -* Crypto: fix display of device key ([#86](https://github.com/element-hq/matrix-react-sdk/pull/86)). Contributed by @richvdh. - - -Changes in [3.111.0](https://github.com/element-hq/matrix-react-sdk/releases/tag/v3.111.0) (2024-10-01) -======================================================================================================= -## ✨ Features - -* [Backport staging] Allow joining calls and video rooms without enabling the labs flags ([#106](https://github.com/element-hq/matrix-react-sdk/pull/106)). Contributed by @RiotRobot. - - -Changes in [3.110.0](https://github.com/element-hq/matrix-react-sdk/releases/tag/v3.110.0) (2024-09-24) -======================================================================================================= -## ✨ Features - -* Add Release announcement for the pinning message list ([#46](https://github.com/element-hq/matrix-react-sdk/pull/46)). Contributed by @florianduros. -* Unlabs feature pinning ([#22](https://github.com/element-hq/matrix-react-sdk/pull/22)). Contributed by @florianduros. -* Add mobile registration ([#42](https://github.com/element-hq/matrix-react-sdk/pull/42)). Contributed by @langleyd. -* Add support for `org.matrix.cross_signing_reset` UIA stage flow ([#34](https://github.com/element-hq/matrix-react-sdk/pull/34)). Contributed by @t3chguy. -* Add timezone to user profile ([#20](https://github.com/element-hq/matrix-react-sdk/pull/20)). Contributed by @Half-Shot. -* Add config option to force verification ([#29](https://github.com/element-hq/matrix-react-sdk/pull/29)). Contributed by @dbkr. -* Reduce pinned message banner size ([#28](https://github.com/element-hq/matrix-react-sdk/pull/28)). Contributed by @florianduros. -* Enable message pinning labs by default ([#25](https://github.com/element-hq/matrix-react-sdk/pull/25)). Contributed by @florianduros. -* Remove release announcement of the new header ([#23](https://github.com/element-hq/matrix-react-sdk/pull/23)). Contributed by @florianduros. - -## 🐛 Bug Fixes - -* Fix timeout type ([#40](https://github.com/element-hq/matrix-react-sdk/pull/40)). Contributed by @dbkr. -* Fix huge usage bandwidth and performance issue of pinned message banner. ([#37](https://github.com/element-hq/matrix-react-sdk/pull/37)). Contributed by @florianduros. -* Reverse order of pinned message list ([#19](https://github.com/element-hq/matrix-react-sdk/pull/19)). Contributed by @florianduros. - - -Changes in [3.108.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.108.0) (2024-08-27) -======================================================================================================= -## ✨ Features - -* Message Pinning: rework the message pinning list in the right panel ([#12825](https://github.com/matrix-org/matrix-react-sdk/pull/12825)). Contributed by @florianduros. -* Tweak UIA postMessage check to work cross-origin ([#12878](https://github.com/matrix-org/matrix-react-sdk/pull/12878)). Contributed by @t3chguy. -* Delayed events (Futures) / MSC4140 for call widget ([#12714](https://github.com/matrix-org/matrix-react-sdk/pull/12714)). Contributed by @AndrewFerr. -* Stop the ongoing ring if another device joins the call session. ([#12866](https://github.com/matrix-org/matrix-react-sdk/pull/12866)). Contributed by @toger5. -* Rich text Editor: Auto-replace plain text emoticons with emoji ([#12828](https://github.com/matrix-org/matrix-react-sdk/pull/12828)). Contributed by @langleyd. -* Clean up editor drafts for unknown rooms ([#12850](https://github.com/matrix-org/matrix-react-sdk/pull/12850)). Contributed by @langleyd. -* Rename general user settings to account ([#12841](https://github.com/matrix-org/matrix-react-sdk/pull/12841)). Contributed by @dbkr. -* Update settings tab icons ([#12867](https://github.com/matrix-org/matrix-react-sdk/pull/12867)). Contributed by @dbkr. -* Disable jump to read receipt button instead of hiding when nothing to jump to ([#12863](https://github.com/matrix-org/matrix-react-sdk/pull/12863)). Contributed by @t3chguy. - -## 🐛 Bug Fixes - -* Ensure elements on Login page are disabled when in-flight ([#12895](https://github.com/matrix-org/matrix-react-sdk/pull/12895)). Contributed by @t3chguy. -* Hide pinned messages when grouped in timeline when feature pinning is disabled ([#12888](https://github.com/matrix-org/matrix-react-sdk/pull/12888)). Contributed by @florianduros. -* Add chat button on new room header for maximised widgets ([#12882](https://github.com/matrix-org/matrix-react-sdk/pull/12882)). Contributed by @t3chguy. -* Show spinner whilst initial search request is in progress ([#12883](https://github.com/matrix-org/matrix-react-sdk/pull/12883)). Contributed by @t3chguy. -* Fix user menu font ([#12879](https://github.com/matrix-org/matrix-react-sdk/pull/12879)). Contributed by @florianduros. -* Allow selecting text in the right panel topic ([#12870](https://github.com/matrix-org/matrix-react-sdk/pull/12870)). Contributed by @t3chguy. -* Add missing presence indicator to new room header ([#12865](https://github.com/matrix-org/matrix-react-sdk/pull/12865)). Contributed by @t3chguy. - - -Changes in [3.107.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.107.0) (2024-08-20) -======================================================================================================= -* No changes - - -Changes in [3.106.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.106.0) (2024-08-13) -======================================================================================================= -## ✨ Features - -* Invite dialog: display MXID on its own line ([#11756](https://github.com/matrix-org/matrix-react-sdk/pull/11756)). Contributed by @AndrewFerr. -* Align RoomSummaryCard styles with Figma ([#12793](https://github.com/matrix-org/matrix-react-sdk/pull/12793)). Contributed by @t3chguy. -* Extract Extensions into their own right panel tab ([#12844](https://github.com/matrix-org/matrix-react-sdk/pull/12844)). Contributed by @t3chguy. -* Remove topic from new room header and expand right panel topic ([#12842](https://github.com/matrix-org/matrix-react-sdk/pull/12842)). Contributed by @t3chguy. -* Rework how the onboarding notifications task works ([#12839](https://github.com/matrix-org/matrix-react-sdk/pull/12839)). Contributed by @t3chguy. -* Update toast styles to match Figma ([#12833](https://github.com/matrix-org/matrix-react-sdk/pull/12833)). Contributed by @t3chguy. -* Warn users on unsupported browsers before they lack features ([#12830](https://github.com/matrix-org/matrix-react-sdk/pull/12830)). Contributed by @t3chguy. -* Add sign out button to settings profile section ([#12666](https://github.com/matrix-org/matrix-react-sdk/pull/12666)). Contributed by @dbkr. -* Remove MatrixRTC realted import ES lint exceptions using a index.ts for matrixrtc ([#12780](https://github.com/matrix-org/matrix-react-sdk/pull/12780)). Contributed by @toger5. -* Fix unwanted ringing of other devices even though the user is already connected to the call. ([#12742](https://github.com/matrix-org/matrix-react-sdk/pull/12742)). Contributed by @toger5. -* Acknowledge `DeviceMute` widget actions ([#12790](https://github.com/matrix-org/matrix-react-sdk/pull/12790)). Contributed by @toger5. - -## 🐛 Bug Fixes - -* Fix formatting of rich text emotes ([#12862](https://github.com/matrix-org/matrix-react-sdk/pull/12862)). Contributed by @dbkr. -* Fixed custom emotes background color #27745 ([#12798](https://github.com/matrix-org/matrix-react-sdk/pull/12798)). Contributed by @asimdelvi. -* Ignore permalink\_prefix when serializing pills ([#11726](https://github.com/matrix-org/matrix-react-sdk/pull/11726)). Contributed by @herkulessi. -* Deflake the chat export test ([#12854](https://github.com/matrix-org/matrix-react-sdk/pull/12854)). Contributed by @dbkr. -* Fix alignment of RTL messages ([#12837](https://github.com/matrix-org/matrix-react-sdk/pull/12837)). Contributed by @dbkr. -* Handle media download errors better ([#12848](https://github.com/matrix-org/matrix-react-sdk/pull/12848)). Contributed by @t3chguy. -* Make micIcon display on primary ([#11908](https://github.com/matrix-org/matrix-react-sdk/pull/11908)). Contributed by @kdanielm. -* Fix compound typography font component issues ([#12826](https://github.com/matrix-org/matrix-react-sdk/pull/12826)). Contributed by @t3chguy. -* Allow Chrome page translator to translate messages in rooms ([#11113](https://github.com/matrix-org/matrix-react-sdk/pull/11113)). Contributed by @lukaszpolowczyk. - - -Changes in [3.105.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.105.1) (2024-08-06) -======================================================================================================= -Fixes for CVE-2024-42347 / GHSA-f83w-wqhc-cfp4 - -Changes in [3.105.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.105.0) (2024-08-06) -======================================================================================================= -Fixes for CVE-2024-42347 / GHSA-f83w-wqhc-cfp4 - -Changes in [3.104.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.104.0) (2024-07-30) -======================================================================================================= -## ✨ Features - -* Add release announcement for the new room header ([#12802](https://github.com/matrix-org/matrix-react-sdk/pull/12802)). Contributed by @MidhunSureshR. -* Default the room header to on ([#12803](https://github.com/matrix-org/matrix-react-sdk/pull/12803)). Contributed by @MidhunSureshR. -* Update Thread Panel to match latest designs ([#12797](https://github.com/matrix-org/matrix-react-sdk/pull/12797)). Contributed by @t3chguy. -* Close any open modals on logout ([#12777](https://github.com/matrix-org/matrix-react-sdk/pull/12777)). Contributed by @dbkr. -* Iterate design of right panel empty state ([#12796](https://github.com/matrix-org/matrix-react-sdk/pull/12796)). Contributed by @t3chguy. -* Update styling of UserInfo right panel card ([#12788](https://github.com/matrix-org/matrix-react-sdk/pull/12788)). Contributed by @t3chguy. -* Accessibility: Add Landmark navigation ([#12190](https://github.com/matrix-org/matrix-react-sdk/pull/12190)). Contributed by @akirk. -* Let Element Call widget receive m.room.create ([#12710](https://github.com/matrix-org/matrix-react-sdk/pull/12710)). Contributed by @AndrewFerr. -* Let Element Call widget set session memberships ([#12713](https://github.com/matrix-org/matrix-react-sdk/pull/12713)). Contributed by @AndrewFerr. -* Update right panel base card styling to match Compound ([#12768](https://github.com/matrix-org/matrix-react-sdk/pull/12768)). Contributed by @t3chguy. -* Align `widget_build_url_ignore_dm` with call behaviour switch between 1:1 and Widget ([#12760](https://github.com/matrix-org/matrix-react-sdk/pull/12760)). Contributed by @t3chguy. -* Move integrations switch ([#12733](https://github.com/matrix-org/matrix-react-sdk/pull/12733)). Contributed by @dbkr. -* Element-R: Report events with withheld keys separately to Posthog. ([#12755](https://github.com/matrix-org/matrix-react-sdk/pull/12755)). Contributed by @richvdh. - -## 🐛 Bug Fixes - -* Test for lack of WebAssembly support ([#12792](https://github.com/matrix-org/matrix-react-sdk/pull/12792)). Contributed by @dbkr. -* Fix stray 'account' heading ([#12791](https://github.com/matrix-org/matrix-react-sdk/pull/12791)). Contributed by @dbkr. -* Add test for the unsupported browser screen ([#12787](https://github.com/matrix-org/matrix-react-sdk/pull/12787)). Contributed by @dbkr. -* Fix HTML export test ([#12778](https://github.com/matrix-org/matrix-react-sdk/pull/12778)). Contributed by @dbkr. -* Fix HTML export missing a bunch of Compound variables ([#12774](https://github.com/matrix-org/matrix-react-sdk/pull/12774)). Contributed by @t3chguy. -* Fix inability to change accent colour consistently in custom theming ([#12772](https://github.com/matrix-org/matrix-react-sdk/pull/12772)). Contributed by @t3chguy. -* Fix edge case of landing on 3pid email link with registration disabled ([#12771](https://github.com/matrix-org/matrix-react-sdk/pull/12771)). Contributed by @t3chguy. - - -Changes in [3.103.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.103.0) (2024-07-16) -======================================================================================================= -## ✨ Features - -* Add tabs to the right panel ([#12672](https://github.com/matrix-org/matrix-react-sdk/pull/12672)). Contributed by @MidhunSureshR. -* Promote new room header from labs to Beta ([#12739](https://github.com/matrix-org/matrix-react-sdk/pull/12739)). Contributed by @t3chguy. -* Redesign room search interface ([#12677](https://github.com/matrix-org/matrix-react-sdk/pull/12677)). Contributed by @t3chguy. -* Move language settings to 'preferences' ([#12723](https://github.com/matrix-org/matrix-react-sdk/pull/12723)). Contributed by @dbkr. -* New layout selector ui in user settings ([#12676](https://github.com/matrix-org/matrix-react-sdk/pull/12676)). Contributed by @florianduros. -* Prevent Element appearing in system media controls ([#10995](https://github.com/matrix-org/matrix-react-sdk/pull/10995)). Contributed by @SuperKenVery. -* Move the account management button ([#12663](https://github.com/matrix-org/matrix-react-sdk/pull/12663)). Contributed by @dbkr. -* Disable profile controls if the HS doesn't allow them to be set ([#12652](https://github.com/matrix-org/matrix-react-sdk/pull/12652)). Contributed by @dbkr. -* New theme ui in user settings ([#12576](https://github.com/matrix-org/matrix-react-sdk/pull/12576)). Contributed by @florianduros. -* Adjust room header hover transition from 300ms to 200ms ([#12703](https://github.com/matrix-org/matrix-react-sdk/pull/12703)). Contributed by @t3chguy. -* Split out email \& phone number settings to separate components \& move discovery to privacy tab ([#12670](https://github.com/matrix-org/matrix-react-sdk/pull/12670)). Contributed by @dbkr. - -## 🐛 Bug Fixes - -* Fix incoming call toast crash due to audio refactor ([#12737](https://github.com/matrix-org/matrix-react-sdk/pull/12737)). Contributed by @t3chguy. -* Improve new room header accessibility ([#12725](https://github.com/matrix-org/matrix-react-sdk/pull/12725)). Contributed by @t3chguy. -* Fix closing all modals ([#12728](https://github.com/matrix-org/matrix-react-sdk/pull/12728)). Contributed by @dbkr. -* Fix close button on forgot password flow ([#12732](https://github.com/matrix-org/matrix-react-sdk/pull/12732)). Contributed by @dbkr. -* Don't consider textual characters to be emoji ([#12582](https://github.com/matrix-org/matrix-react-sdk/pull/12582)). Contributed by @robintown. -* Clear autocomplete input on selection accept ([#12709](https://github.com/matrix-org/matrix-react-sdk/pull/12709)). Contributed by @dbkr. -* Fix `Match system theme` toggle ([#12719](https://github.com/matrix-org/matrix-react-sdk/pull/12719)). Contributed by @florianduros. - - -Changes in [3.102.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.102.0) (2024-07-08) -======================================================================================================= -## ✨ Features - -* Switch to Rust crypto stack for all logins ([#12630](https://github.com/matrix-org/matrix-react-sdk/pull/12630)). Contributed by @richvdh. -* Hide voip buttons in group rooms in environments with widgets disabled ([#12664](https://github.com/matrix-org/matrix-react-sdk/pull/12664)). Contributed by @t3chguy. -* Minor tweaks to UserSettings dialog ([#12651](https://github.com/matrix-org/matrix-react-sdk/pull/12651)). Contributed by @florianduros. -* Hide voice call button when redundant ([#12639](https://github.com/matrix-org/matrix-react-sdk/pull/12639)). Contributed by @t3chguy. -* Improve accessibility of the room summary card ([#12586](https://github.com/matrix-org/matrix-react-sdk/pull/12586)). Contributed by @t3chguy. -* Show tooltips on narrow tabbed views ([#12624](https://github.com/matrix-org/matrix-react-sdk/pull/12624)). Contributed by @dbkr. -* Update gfm.css to github-markdown-css ([#12613](https://github.com/matrix-org/matrix-react-sdk/pull/12613)). Contributed by @t3chguy. -* Cache e2eStatus to avoid concerning unencrypted flicker when changing rooms ([#12606](https://github.com/matrix-org/matrix-react-sdk/pull/12606)). Contributed by @t3chguy. -* Tweak copy for user verification toast ([#12605](https://github.com/matrix-org/matrix-react-sdk/pull/12605)). Contributed by @t3chguy. -* Support s tags for strikethrough for Matrix v1.10 ([#12604](https://github.com/matrix-org/matrix-react-sdk/pull/12604)). Contributed by @t3chguy. - -## 🐛 Bug Fixes - -* Remove redundant copy in deactive uia modal ([#12668](https://github.com/matrix-org/matrix-react-sdk/pull/12668)). Contributed by @t3chguy. -* Fix high contrast theme in settings ([#12649](https://github.com/matrix-org/matrix-react-sdk/pull/12649)). Contributed by @florianduros. -* Fix background on live location sharing footer ([#12629](https://github.com/matrix-org/matrix-react-sdk/pull/12629)). Contributed by @t3chguy. -* Remove outdated iframe sandbox attribute ([#12633](https://github.com/matrix-org/matrix-react-sdk/pull/12633)). Contributed by @t3chguy. -* Remove stray setState which caused encryption state shields to flicker ([#12632](https://github.com/matrix-org/matrix-react-sdk/pull/12632)). Contributed by @t3chguy. -* Fix stray background colour on markdown body ([#12628](https://github.com/matrix-org/matrix-react-sdk/pull/12628)). Contributed by @t3chguy. -* Fix widgets not being cleaned up correctly. ([#12616](https://github.com/matrix-org/matrix-react-sdk/pull/12616)). Contributed by @toger5. -* Add in-progress view to display name EditInPlace ([#12609](https://github.com/matrix-org/matrix-react-sdk/pull/12609)). Contributed by @dbkr. -* Fix config override of other settings levels ([#12593](https://github.com/matrix-org/matrix-react-sdk/pull/12593)). Contributed by @langleyd. -* Don't show 'saved' on display name save error ([#12600](https://github.com/matrix-org/matrix-react-sdk/pull/12600)). Contributed by @dbkr. - - -Changes in [3.101.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.101.0) (2024-06-18) -======================================================================================================= -## ✨ Features - -* Change avatar setting component to use a menu ([#12585](https://github.com/matrix-org/matrix-react-sdk/pull/12585)). Contributed by @dbkr. -* New user profile UI in User Settings ([#12548](https://github.com/matrix-org/matrix-react-sdk/pull/12548)). Contributed by @dbkr. -* MSC4108 support OIDC QR code login ([#12370](https://github.com/matrix-org/matrix-react-sdk/pull/12370)). Contributed by @t3chguy. - -## 🐛 Bug Fixes - -* [Backport staging] Fix image upload preview size ([#12612](https://github.com/matrix-org/matrix-react-sdk/pull/12612)). Contributed by @RiotRobot. -* Fix roving tab index crash `compareDocumentPosition` ([#12594](https://github.com/matrix-org/matrix-react-sdk/pull/12594)). Contributed by @t3chguy. -* Keep dialog glass border on narrow screens ([#12591](https://github.com/matrix-org/matrix-react-sdk/pull/12591)). Contributed by @dbkr. -* Add missing a11y label to dismiss onboarding button in room list ([#12587](https://github.com/matrix-org/matrix-react-sdk/pull/12587)). Contributed by @t3chguy. -* Add hover / active state on avatar setting upload button ([#12590](https://github.com/matrix-org/matrix-react-sdk/pull/12590)). Contributed by @dbkr. -* Fix EditInPlace button styles ([#12589](https://github.com/matrix-org/matrix-react-sdk/pull/12589)). Contributed by @dbkr. -* Fix incorrect assumptions about required fields in /search response ([#12575](https://github.com/matrix-org/matrix-react-sdk/pull/12575)). Contributed by @t3chguy. -* Fix display of no avatar in avatar setting controls ([#12558](https://github.com/matrix-org/matrix-react-sdk/pull/12558)). Contributed by @dbkr. -* Element-R: pass pickleKey in as raw key for indexeddb encryption ([#12543](https://github.com/matrix-org/matrix-react-sdk/pull/12543)). Contributed by @richvdh. - - -Changes in [3.100.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.100.0) (2024-06-04) -======================================================================================================= -## ✨ Features - -* Tooltip: Improve accessibility for context menus ([#12462](https://github.com/matrix-org/matrix-react-sdk/pull/12462)). Contributed by @florianduros. -* Tooltip: Improve accessibility of space panel ([#12525](https://github.com/matrix-org/matrix-react-sdk/pull/12525)). Contributed by @florianduros. - -## 🐛 Bug Fixes - -* Close the release announcement when a dialog is opened ([#12559](https://github.com/matrix-org/matrix-react-sdk/pull/12559)). Contributed by @florianduros. -* Tooltip: close field tooltip when ESC is pressed ([#12553](https://github.com/matrix-org/matrix-react-sdk/pull/12553)). Contributed by @florianduros. -* Fix tabbedview breakpoint width ([#12556](https://github.com/matrix-org/matrix-react-sdk/pull/12556)). Contributed by @dbkr. -* Fix E2E icon display in room header ([#12545](https://github.com/matrix-org/matrix-react-sdk/pull/12545)). Contributed by @florianduros. -* Tooltip: Improve placement for space settings ([#12541](https://github.com/matrix-org/matrix-react-sdk/pull/12541)). Contributed by @florianduros. -* Fix deformed avatar in a call in a narrow timeline ([#12538](https://github.com/matrix-org/matrix-react-sdk/pull/12538)). Contributed by @florianduros. -* Shown own sent state indicator even when showReadReceipts is disabled ([#12540](https://github.com/matrix-org/matrix-react-sdk/pull/12540)). Contributed by @t3chguy. -* Ensure we do not fire the verification mismatch modal multiple times ([#12526](https://github.com/matrix-org/matrix-react-sdk/pull/12526)). Contributed by @t3chguy. -* Fix avatar in chat export ([#12537](https://github.com/matrix-org/matrix-react-sdk/pull/12537)). Contributed by @florianduros. -* Use `*` for italics as it doesn't break when used mid-word ([#12523](https://github.com/matrix-org/matrix-react-sdk/pull/12523)). Contributed by @t3chguy. - - -Changes in [3.99.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.99.0) (2024-05-07) -===================================================================================================== -## ✨ Features - -* Use a different error message for UTDs when you weren't in the room. ([#12453](https://github.com/matrix-org/matrix-react-sdk/pull/12453)). Contributed by @uhoreg. -* Take the Threads Activity Centre out of labs ([#12439](https://github.com/matrix-org/matrix-react-sdk/pull/12439)). Contributed by @dbkr. -* Expected UTDs: use a different message for UTDs sent before login ([#12391](https://github.com/matrix-org/matrix-react-sdk/pull/12391)). Contributed by @richvdh. -* Add `Tooltip` to `AccessibleButton` ([#12443](https://github.com/matrix-org/matrix-react-sdk/pull/12443)). Contributed by @florianduros. -* Add analytics to activity toggles ([#12418](https://github.com/matrix-org/matrix-react-sdk/pull/12418)). Contributed by @dbkr. -* Decrypt events in reverse order without copying the array ([#12445](https://github.com/matrix-org/matrix-react-sdk/pull/12445)). Contributed by @Johennes. -* Use new compound tooltip ([#12416](https://github.com/matrix-org/matrix-react-sdk/pull/12416)). Contributed by @florianduros. -* Expected UTDs: report a different Posthog code ([#12389](https://github.com/matrix-org/matrix-react-sdk/pull/12389)). Contributed by @richvdh. - -## 🐛 Bug Fixes - -* TAC: Fix accessibility issue when the Release announcement is displayed ([#12484](https://github.com/matrix-org/matrix-react-sdk/pull/12484)). Contributed by @RiotRobot. -* TAC: Close Release Announcement when TAC button is clicked ([#12485](https://github.com/matrix-org/matrix-react-sdk/pull/12485)). Contributed by @florianduros. -* MenuItem: fix caption usage ([#12455](https://github.com/matrix-org/matrix-react-sdk/pull/12455)). Contributed by @florianduros. -* Show the local echo in previews ([#12451](https://github.com/matrix-org/matrix-react-sdk/pull/12451)). Contributed by @langleyd. -* Fixed the drag and drop of X #27186 ([#12450](https://github.com/matrix-org/matrix-react-sdk/pull/12450)). Contributed by @asimdelvi. -* Move the TAC to above the button ([#12438](https://github.com/matrix-org/matrix-react-sdk/pull/12438)). Contributed by @dbkr. -* Use the same logic in previews as the timeline to hide events that should be hidden ([#12434](https://github.com/matrix-org/matrix-react-sdk/pull/12434)). Contributed by @langleyd. -* Fix selector so maths support doesn't mangle divs ([#12433](https://github.com/matrix-org/matrix-react-sdk/pull/12433)). Contributed by @uhoreg. - - -Changes in [3.98.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.98.0) (2024-04-23) -===================================================================================================== -## ✨ Features - -* Make empty state copy for TAC depend on the value of the setting ([#12419](https://github.com/matrix-org/matrix-react-sdk/pull/12419)). Contributed by @dbkr. -* Linkify User Interactive Authentication errors ([#12271](https://github.com/matrix-org/matrix-react-sdk/pull/12271)). Contributed by @t3chguy. -* Add support for device dehydration v2 ([#12316](https://github.com/matrix-org/matrix-react-sdk/pull/12316)). Contributed by @uhoreg. -* Replace `SecurityCustomisations` with `CryptoSetupExtension` ([#12342](https://github.com/matrix-org/matrix-react-sdk/pull/12342)). Contributed by @thoraj. -* Add activity toggle for TAC ([#12413](https://github.com/matrix-org/matrix-react-sdk/pull/12413)). Contributed by @dbkr. -* Humanize spell check language labels ([#12409](https://github.com/matrix-org/matrix-react-sdk/pull/12409)). Contributed by @t3chguy. -* Call Guest Access, give user the option to change the acces level so they can generate a call link. ([#12401](https://github.com/matrix-org/matrix-react-sdk/pull/12401)). Contributed by @toger5. -* TAC: Release Announcement ([#12380](https://github.com/matrix-org/matrix-react-sdk/pull/12380)). Contributed by @florianduros. -* Show the call and share button if the user can create a guest link. ([#12385](https://github.com/matrix-org/matrix-react-sdk/pull/12385)). Contributed by @toger5. -* Add analytics for mark all threads unread ([#12384](https://github.com/matrix-org/matrix-react-sdk/pull/12384)). Contributed by @dbkr. -* Add `EventType.RoomEncryption` to the auto approve capabilities of Element Call widgets ([#12386](https://github.com/matrix-org/matrix-react-sdk/pull/12386)). Contributed by @toger5. - -## 🐛 Bug Fixes - -* Fix link modal not shown after access upgrade ([#12411](https://github.com/matrix-org/matrix-react-sdk/pull/12411)). Contributed by @toger5. -* Fix thread navigation in timeline ([#12412](https://github.com/matrix-org/matrix-react-sdk/pull/12412)). Contributed by @florianduros. -* Fix inability to join a `knock` room via space hierarchy view ([#12404](https://github.com/matrix-org/matrix-react-sdk/pull/12404)). Contributed by @t3chguy. -* Focus the thread panel when clicking on an item in the TAC ([#12410](https://github.com/matrix-org/matrix-react-sdk/pull/12410)). Contributed by @dbkr. -* Fix space hierarchy tile busy state being stuck after join error ([#12405](https://github.com/matrix-org/matrix-react-sdk/pull/12405)). Contributed by @t3chguy. -* Fix room topic in-app links not being handled correctly on topic dialog ([#12406](https://github.com/matrix-org/matrix-react-sdk/pull/12406)). Contributed by @t3chguy. - - -Changes in [3.97.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.97.0) (2024-04-09) -===================================================================================================== -## ✨ Features - -* Mark all threads as read button ([#12378](https://github.com/matrix-org/matrix-react-sdk/pull/12378)). Contributed by @dbkr. -* Video call meta space ([#12297](https://github.com/matrix-org/matrix-react-sdk/pull/12297)). Contributed by @toger5. -* Add leave room warning for last admin ([#9452](https://github.com/matrix-org/matrix-react-sdk/pull/9452)). Contributed by @Arnei. -* Iterate styles around Link new device via QR ([#12356](https://github.com/matrix-org/matrix-react-sdk/pull/12356)). Contributed by @t3chguy. -* Improve code-splitting of highlight.js and maplibre-gs libs ([#12349](https://github.com/matrix-org/matrix-react-sdk/pull/12349)). Contributed by @t3chguy. -* Use data-mx-color for rainbows ([#12325](https://github.com/matrix-org/matrix-react-sdk/pull/12325)). Contributed by @tulir. - -## 🐛 Bug Fixes - -* Fix external guest access url for unencrypted rooms ([#12345](https://github.com/matrix-org/matrix-react-sdk/pull/12345)). Contributed by @toger5. -* Fix video rooms not showing share link button ([#12374](https://github.com/matrix-org/matrix-react-sdk/pull/12374)). Contributed by @toger5. -* Fix space topic jumping on hover/focus ([#12377](https://github.com/matrix-org/matrix-react-sdk/pull/12377)). Contributed by @t3chguy. -* Allow popping out a Jitsi widget to respect Desktop `web_base_url` config ([#12376](https://github.com/matrix-org/matrix-react-sdk/pull/12376)). Contributed by @t3chguy. -* Remove the Lazy Loading `InvalidStoreError` Dialogs ([#12358](https://github.com/matrix-org/matrix-react-sdk/pull/12358)). Contributed by @langleyd. -* Improve readability of badges and pills ([#12360](https://github.com/matrix-org/matrix-react-sdk/pull/12360)). Contributed by @robintown. - - -Changes in [3.96.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.96.1) (2024-03-28) -===================================================================================================== -## 🐛 Bug Fixes - -* Revert "Make EC widget theme reactive - Update widget url when the theme changes" ([#12383](https://github.com/matrix-org/matrix-react-sdk/pull/12383)) in order to fix widgets that require authentication. - - -Changes in [3.96.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.96.0) (2024-03-26) -===================================================================================================== -## ✨ Features - -* Change user permission by using a new apply button ([#12346](https://github.com/matrix-org/matrix-react-sdk/pull/12346)). Contributed by @florianduros. -* Mark as Unread ([#12254](https://github.com/matrix-org/matrix-react-sdk/pull/12254)). Contributed by @dbkr. -* Refine the colors of some more components ([#12343](https://github.com/matrix-org/matrix-react-sdk/pull/12343)). Contributed by @robintown. -* TAC: Order rooms by most recent after notification level ([#12329](https://github.com/matrix-org/matrix-react-sdk/pull/12329)). Contributed by @florianduros. -* Make EC widget theme reactive - Update widget url when the theme changes ([#12295](https://github.com/matrix-org/matrix-react-sdk/pull/12295)). Contributed by @toger5. -* Refine styles of menus, toasts, popovers, and modals ([#12332](https://github.com/matrix-org/matrix-react-sdk/pull/12332)). Contributed by @robintown. -* Element Call: fix widget shown while its still loading (`waitForIframeLoad=false`) ([#12292](https://github.com/matrix-org/matrix-react-sdk/pull/12292)). Contributed by @toger5. -* Improve Forward Dialog a11y by switching to roving tab index interactions ([#12306](https://github.com/matrix-org/matrix-react-sdk/pull/12306)). Contributed by @t3chguy. -* Call guest access link creation to join calls as a non registered user via the EC SPA ([#12259](https://github.com/matrix-org/matrix-react-sdk/pull/12259)). Contributed by @toger5. -* Use `strong` element to semantically denote visually emphasised content ([#12320](https://github.com/matrix-org/matrix-react-sdk/pull/12320)). Contributed by @t3chguy. -* Handle up/down arrow keys as well as left/right for horizontal toolbars for improved a11y ([#12305](https://github.com/matrix-org/matrix-react-sdk/pull/12305)). Contributed by @t3chguy. - -## 🐛 Bug Fixes - -* [Backport staging] Remove the glass border from modal spinners ([#12369](https://github.com/matrix-org/matrix-react-sdk/pull/12369)). Contributed by @RiotRobot. -* Fix incorrect check for private read receipt support ([#12348](https://github.com/matrix-org/matrix-react-sdk/pull/12348)). Contributed by @tulir. -* TAC: Fix hover state when expanded ([#12337](https://github.com/matrix-org/matrix-react-sdk/pull/12337)). Contributed by @florianduros. -* Fix the image view ([#12341](https://github.com/matrix-org/matrix-react-sdk/pull/12341)). Contributed by @robintown. -* Use correct push rule to evaluate room-wide mentions ([#12318](https://github.com/matrix-org/matrix-react-sdk/pull/12318)). Contributed by @t3chguy. -* Reset power selector on API failure to prevent state mismatch ([#12319](https://github.com/matrix-org/matrix-react-sdk/pull/12319)). Contributed by @t3chguy. -* Fix spotlight opening in TAC ([#12315](https://github.com/matrix-org/matrix-react-sdk/pull/12315)). Contributed by @florianduros. - - -Changes in [3.95.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.95.0) (2024-03-14) -===================================================================================================== -## 🐛 Bug Fixes - -* Update `@vector-im/compound-design-tokens` in package.json ([#12340](https://github.com/matrix-org/matrix-react-sdk/pull/12340)). - -Changes in [3.94.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.94.0) (2024-03-12) -===================================================================================================== -## ✨ Features - -* Refine styles of controls to match Compound ([#12299](https://github.com/matrix-org/matrix-react-sdk/pull/12299)). Contributed by @robintown. -* Hide the archived section ([#12286](https://github.com/matrix-org/matrix-react-sdk/pull/12286)). Contributed by @dbkr. -* Add theme data to EC widget Url ([#12279](https://github.com/matrix-org/matrix-react-sdk/pull/12279)). Contributed by @toger5. -* Update MSC2965 OIDC Discovery implementation ([#12245](https://github.com/matrix-org/matrix-react-sdk/pull/12245)). Contributed by @t3chguy. -* Use green dot for activity notification in `LegacyRoomHeader` ([#12270](https://github.com/matrix-org/matrix-react-sdk/pull/12270)). Contributed by @florianduros. - -## 🐛 Bug Fixes - -* Fix requests for senders to submit auto-rageshakes ([#12304](https://github.com/matrix-org/matrix-react-sdk/pull/12304)). Contributed by @richvdh. -* fix automatic DM avatar with functional members ([#12157](https://github.com/matrix-org/matrix-react-sdk/pull/12157)). Contributed by @HarHarLinks. -* Feeds event with relation to unknown to the widget ([#12283](https://github.com/matrix-org/matrix-react-sdk/pull/12283)). Contributed by @maheichyk. -* Fix TAC opening with keyboard ([#12285](https://github.com/matrix-org/matrix-react-sdk/pull/12285)). Contributed by @florianduros. -* Allow screenshot update docker to run multiple test files ([#12291](https://github.com/matrix-org/matrix-react-sdk/pull/12291)). Contributed by @dbkr. -* Fix alignment of user menu avatar ([#12289](https://github.com/matrix-org/matrix-react-sdk/pull/12289)). Contributed by @dbkr. -* Fix buttons of widget in a room ([#12288](https://github.com/matrix-org/matrix-react-sdk/pull/12288)). Contributed by @florianduros. -* ModuleAPI: `overwrite_login` action was not stopping the existing client resulting in the action failing with rust-sdk ([#12272](https://github.com/matrix-org/matrix-react-sdk/pull/12272)). Contributed by @BillCarsonFr. - - -Changes in [3.93.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.93.0) (2024-02-27) -===================================================================================================== -## 🦖 Deprecations - -* Enable custom themes to theme Compound ([#12240](https://github.com/matrix-org/matrix-react-sdk/pull/12240)). Contributed by @robintown. -* Remove welcome bot `welcome_user_id` support ([#12153](https://github.com/matrix-org/matrix-react-sdk/pull/12153)). Contributed by @t3chguy. - -## ✨ Features - -* Ignore activity in TAC ([#12269](https://github.com/matrix-org/matrix-react-sdk/pull/12269)). Contributed by @florianduros. -* Use browser's font size instead of hardcoded `16px` as root font size ([#12246](https://github.com/matrix-org/matrix-react-sdk/pull/12246)). Contributed by @florianduros. -* Revert "Use Compound primary colors for most actions" ([#12264](https://github.com/matrix-org/matrix-react-sdk/pull/12264)). Contributed by @florianduros. -* Revert "Refine menu, toast, and popover colors" ([#12263](https://github.com/matrix-org/matrix-react-sdk/pull/12263)). Contributed by @florianduros. -* Fix Native OIDC for Element Desktop ([#12253](https://github.com/matrix-org/matrix-react-sdk/pull/12253)). Contributed by @t3chguy. -* Improve client metadata used for OIDC dynamic registration ([#12257](https://github.com/matrix-org/matrix-react-sdk/pull/12257)). Contributed by @t3chguy. -* Refine menu, toast, and popover colors ([#12247](https://github.com/matrix-org/matrix-react-sdk/pull/12247)). Contributed by @robintown. -* Call the AsJson forms of import and exportRoomKeys ([#12233](https://github.com/matrix-org/matrix-react-sdk/pull/12233)). Contributed by @andybalaam. -* Use Compound primary colors for most actions ([#12241](https://github.com/matrix-org/matrix-react-sdk/pull/12241)). Contributed by @robintown. -* Enable redirected media by default ([#12142](https://github.com/matrix-org/matrix-react-sdk/pull/12142)). Contributed by @turt2live. -* Reduce TAC width by `16px` ([#12239](https://github.com/matrix-org/matrix-react-sdk/pull/12239)). Contributed by @florianduros. -* Pop out of Threads Activity Centre ([#12136](https://github.com/matrix-org/matrix-react-sdk/pull/12136)). Contributed by @florianduros. -* Use new semantic tokens for username colors ([#12209](https://github.com/matrix-org/matrix-react-sdk/pull/12209)). Contributed by @robintown. - -## 🐛 Bug Fixes - -* [Backport staging] Fix spurious session corruption error ([#12287](https://github.com/matrix-org/matrix-react-sdk/pull/12287)). Contributed by @RiotRobot. -* Fix the space panel getting bigger when gaining a scroll bar ([#12267](https://github.com/matrix-org/matrix-react-sdk/pull/12267)). Contributed by @dbkr. -* Fix gradients spacings on the space panel ([#12262](https://github.com/matrix-org/matrix-react-sdk/pull/12262)). Contributed by @dbkr. -* Remove hardcoded `Element` in tac labs description ([#12266](https://github.com/matrix-org/matrix-react-sdk/pull/12266)). Contributed by @florianduros. -* Fix branding in "migrating crypto" message ([#12265](https://github.com/matrix-org/matrix-react-sdk/pull/12265)). Contributed by @richvdh. -* Use h1 as first heading in dialogs ([#12250](https://github.com/matrix-org/matrix-react-sdk/pull/12250)). Contributed by @dbkr. -* Fix forced lowercase username in login/registration flows ([#9329](https://github.com/matrix-org/matrix-react-sdk/pull/9329)). Contributed by @vrifox. -* Update the TAC indicator on event decryption ([#12243](https://github.com/matrix-org/matrix-react-sdk/pull/12243)). Contributed by @dbkr. -* Fix OIDC delegated auth account url check ([#12242](https://github.com/matrix-org/matrix-react-sdk/pull/12242)). Contributed by @t3chguy. -* New Header edgecase fixes: Close lobby button not shown, disable join button in various places, more... ([#12235](https://github.com/matrix-org/matrix-react-sdk/pull/12235)). Contributed by @toger5. -* Fix TAC button alignment when expanded ([#12238](https://github.com/matrix-org/matrix-react-sdk/pull/12238)). Contributed by @florianduros. -* Fix tooltip behaviour in TAC ([#12236](https://github.com/matrix-org/matrix-react-sdk/pull/12236)). Contributed by @florianduros. - - -Changes in [3.92.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.92.0) (2024-02-13) -===================================================================================================== -## ✨ Features - -* Add Element call related functionality to new room header ([#12091](https://github.com/matrix-org/matrix-react-sdk/pull/12091)). Contributed by @toger5. -* Add labs flag for Threads Activity Centre ([#12137](https://github.com/matrix-org/matrix-react-sdk/pull/12137)). Contributed by @florianduros. -* Refactor element call lobby + skip lobby ([#12057](https://github.com/matrix-org/matrix-react-sdk/pull/12057)). Contributed by @toger5. -* Hide the "Message" button in the sidebar if the CreateRooms components should not be shown ([#9271](https://github.com/matrix-org/matrix-react-sdk/pull/9271)). Contributed by @dhenneke. -* Add notification dots to thread summary icons ([#12146](https://github.com/matrix-org/matrix-react-sdk/pull/12146)). Contributed by @dbkr. - -## 🐛 Bug Fixes - -* [Backport staging] Fix the StorageManger detecting a false positive consistency check when manually migrating to rust from labs ([#12230](https://github.com/matrix-org/matrix-react-sdk/pull/12230)). Contributed by @RiotRobot. -* Fix logout can take ages ([#12191](https://github.com/matrix-org/matrix-react-sdk/pull/12191)). Contributed by @BillCarsonFr. -* Fix `Mark all as read` in settings ([#12205](https://github.com/matrix-org/matrix-react-sdk/pull/12205)). Contributed by @florianduros. -* Fix default thread notification of the new RoomHeader ([#12194](https://github.com/matrix-org/matrix-react-sdk/pull/12194)). Contributed by @florianduros. -* Fix display of room notification debug info ([#12183](https://github.com/matrix-org/matrix-react-sdk/pull/12183)). Contributed by @dbkr. - - -Changes in [3.91.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.91.0) (2024-01-31) -===================================================================================================== -## ✨ Features - -* Expose apps/widgets ([#12071](https://github.com/matrix-org/matrix-react-sdk/pull/12071)). Contributed by @charlynguyen. -* Enable the rust-crypto labs button ([#12114](https://github.com/matrix-org/matrix-react-sdk/pull/12114)). Contributed by @richvdh. -* Show a progress bar while migrating from legacy crypto ([#12104](https://github.com/matrix-org/matrix-react-sdk/pull/12104)). Contributed by @richvdh. -* Update Twemoji to Jdecked v15.0.3 ([#12147](https://github.com/matrix-org/matrix-react-sdk/pull/12147)). Contributed by @t3chguy. -* Change Quick Settings icon ([#12141](https://github.com/matrix-org/matrix-react-sdk/pull/12141)). Contributed by @florianduros. -* Use Compound tooltips more widely ([#12128](https://github.com/matrix-org/matrix-react-sdk/pull/12128)). Contributed by @t3chguy. - -## 🐛 Bug Fixes - -* Fix OIDC bugs due to amnesiac stores forgetting OIDC issuer \& other data ([#12166](https://github.com/matrix-org/matrix-react-sdk/pull/12166)). Contributed by @t3chguy. -* Fix account management link for delegated auth OIDC setups ([#12144](https://github.com/matrix-org/matrix-react-sdk/pull/12144)). Contributed by @t3chguy. -* Fix Safari IME support ([#11016](https://github.com/matrix-org/matrix-react-sdk/pull/11016)). Contributed by @SuperKenVery. -* Fix Stickerpicker layout crossing multiple CSS stacking contexts ([#12127](https://github.com/matrix-org/matrix-react-sdk/pull/12127)). -* Fix Stickerpicker layout crossing multiple CSS stacking contexts ([#12126](https://github.com/matrix-org/matrix-react-sdk/pull/12126)). Contributed by @t3chguy. -* Fix 1F97A and 1F979 in Twemoji COLR font ([#12177](https://github.com/matrix-org/matrix-react-sdk/pull/12177)). - - -Changes in [3.90.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.90.0) (2024-01-19) -===================================================================================================== -## ✨ Features - -* Broaden support for matrix spec versions ([#12159](https://github.com/matrix-org/matrix-react-sdk/pull/12159)). Contributed by @RiotRobot. - -## 🐛 Bug Fixes - -* Fixed shield alignment on message Input ([#12155](https://github.com/matrix-org/matrix-react-sdk/pull/12155)). Contributed by @RiotRobot. - - -Changes in [3.89.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.89.0) (2024-01-16) -===================================================================================================== -## ✨ Features - -* Accessibility improvements around aria-labels and tooltips ([#12062](https://github.com/matrix-org/matrix-react-sdk/pull/12062)). Contributed by @t3chguy. -* Add RoomKnocksBar to RoomHeader ([#12077](https://github.com/matrix-org/matrix-react-sdk/pull/12077)). Contributed by @charlynguyen. -* Adjust tooltip side for DecoratedRoomAvatar to not obscure room name ([#12079](https://github.com/matrix-org/matrix-react-sdk/pull/12079)). Contributed by @t3chguy. -* Iterate landmarks around the app in order to improve a11y ([#12064](https://github.com/matrix-org/matrix-react-sdk/pull/12064)). Contributed by @t3chguy. -* Update element call embedding UI ([#12056](https://github.com/matrix-org/matrix-react-sdk/pull/12056)). Contributed by @toger5. -* Use Compound tooltips instead of homegrown in TextWithTooltip \& InfoTooltip ([#12052](https://github.com/matrix-org/matrix-react-sdk/pull/12052)). Contributed by @t3chguy. - -## 🐛 Bug Fixes - -* Fix regression around CSS stacking contexts and PIP widgets ([#12094](https://github.com/matrix-org/matrix-react-sdk/pull/12094)). Contributed by @t3chguy. -* Fix Identity Server terms accepting not working as expected ([#12109](https://github.com/matrix-org/matrix-react-sdk/pull/12109)). Contributed by @t3chguy. -* fix: microphone and camera dropdown doesn't work In legacy call ([#12105](https://github.com/matrix-org/matrix-react-sdk/pull/12105)). Contributed by @muratersin. -* Revert "Set up key backup using non-deprecated APIs (#12005)" ([#12102](https://github.com/matrix-org/matrix-react-sdk/pull/12102)). Contributed by @BillCarsonFr. -* Fix regression around read receipt animation from refs changes ([#12100](https://github.com/matrix-org/matrix-react-sdk/pull/12100)). Contributed by @t3chguy. -* Added meaning full error message based on platform ([#12074](https://github.com/matrix-org/matrix-react-sdk/pull/12074)). Contributed by @Pankaj-SinghR. -* Fix editing event from search room view ([#11992](https://github.com/matrix-org/matrix-react-sdk/pull/11992)). Contributed by @t3chguy. -* Fix timeline position when moving to a room and coming back ([#12055](https://github.com/matrix-org/matrix-react-sdk/pull/12055)). Contributed by @florianduros. -* Fix threaded reply playwright tests ([#12070](https://github.com/matrix-org/matrix-react-sdk/pull/12070)). Contributed by @dbkr. -* Element-R: fix repeated requests to enter 4S key during cross-signing reset ([#12059](https://github.com/matrix-org/matrix-react-sdk/pull/12059)). Contributed by @richvdh. -* Fix position of thumbnail in room timeline ([#12016](https://github.com/matrix-org/matrix-react-sdk/pull/12016)). Contributed by @anoopw3bdev. - - -Changes in [3.88.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.88.0) (2024-01-04) -===================================================================================================== -## 🐛 Bug Fixes - -* Fix a fresh login creating a new key backup ([#12106](https://github.com/matrix-org/matrix-react-sdk/pull/12106)). - -Changes in [3.87.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.87.0) (2023-12-19) -===================================================================================================== -## ✨ Features - -* Keep more recent rageshake logs ([#12003](https://github.com/matrix-org/matrix-react-sdk/pull/12003)). Contributed by @richvdh. - -## 🐛 Bug Fixes - -* Fix bug which prevented correct clean up of rageshake store ([#12002](https://github.com/matrix-org/matrix-react-sdk/pull/12002)). Contributed by @richvdh. -* Set up key backup using non-deprecated APIs ([#12005](https://github.com/matrix-org/matrix-react-sdk/pull/12005)). Contributed by @andybalaam. -* Fix notifications appearing for old events ([#3946](https://github.com/matrix-org/matrix-js-sdk/pull/3946)). Contributed by @dbkr. -* Prevent phantom notifications from events not in a room's timeline ([#3942](https://github.com/matrix-org/matrix-js-sdk/pull/3942)). Contributed by @dbkr. - - -Changes in [3.86.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.86.0) (2023-12-05) -===================================================================================================== -## 🦖 Deprecations - -* Remove Quote from MessageContextMenu as it is unsupported by WYSIWYG ([#11914](https://github.com/matrix-org/matrix-react-sdk/pull/11914)). Contributed by @t3chguy. - -## ✨ Features - -* Always allow call.member events on new rooms ([#11948](https://github.com/matrix-org/matrix-react-sdk/pull/11948)). Contributed by @toger5. -* Right panel: view third party invite info without clearing history ([#11934](https://github.com/matrix-org/matrix-react-sdk/pull/11934)). Contributed by @kerryarchibald. -* Allow switching to system emoji font ([#11925](https://github.com/matrix-org/matrix-react-sdk/pull/11925)). Contributed by @t3chguy. -* Update open in other tab message ([#11916](https://github.com/matrix-org/matrix-react-sdk/pull/11916)). Contributed by @weeman1337. -* Add menu for legacy and element call in 1:1 rooms ([#11910](https://github.com/matrix-org/matrix-react-sdk/pull/11910)). Contributed by @toger5. -* Add ringing for matrixRTC ([#11870](https://github.com/matrix-org/matrix-react-sdk/pull/11870)). Contributed by @toger5. - -## 🐛 Bug Fixes - -* Keep device language when it has been previosuly set, after a successful delegated authentication flow that clears localStorage ([#11902](https://github.com/matrix-org/matrix-react-sdk/pull/11902)). Contributed by @mgcm. -* Fix misunderstanding of functional members ([#11918](https://github.com/matrix-org/matrix-react-sdk/pull/11918)). Contributed by @toger5. -* Fix: Video Room Chat Header Button Removed ([#11911](https://github.com/matrix-org/matrix-react-sdk/pull/11911)). Contributed by @kerryarchibald. -* Fix "not attempting encryption" warning ([#11899](https://github.com/matrix-org/matrix-react-sdk/pull/11899)). Contributed by @richvdh. - - -Changes in [3.85.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.85.0) (2023-11-21) -===================================================================================================== -## ✨ Features - -* Update room summary card header ([#11823](https://github.com/matrix-org/matrix-react-sdk/pull/11823)). Contributed by @germain-gg. -* Add feature flag for disabling encryption in Element Call ([#11837](https://github.com/matrix-org/matrix-react-sdk/pull/11837)). Contributed by @toger5. -* Adapt the rendering of extra icons in the room header ([#11835](https://github.com/matrix-org/matrix-react-sdk/pull/11835)). Contributed by @charlynguyen. -* Implement new unreachable state and fix broken string ref ([#11748](https://github.com/matrix-org/matrix-react-sdk/pull/11748)). Contributed by @MidhunSureshR. -* Allow adding extra icons to the room header ([#11799](https://github.com/matrix-org/matrix-react-sdk/pull/11799)). Contributed by @charlynguyen. - -## 🐛 Bug Fixes - -* Room header: do not collapse avatar or facepile ([#11866](https://github.com/matrix-org/matrix-react-sdk/pull/11866)). Contributed by @kerryarchibald. -* New right panel: fix button alignment in memberlist ([#11861](https://github.com/matrix-org/matrix-react-sdk/pull/11861)). Contributed by @kerryarchibald. -* Use the correct video call icon variant ([#11859](https://github.com/matrix-org/matrix-react-sdk/pull/11859)). Contributed by @robintown. -* fix broken warning icon ([#11862](https://github.com/matrix-org/matrix-react-sdk/pull/11862)). Contributed by @ara4n. -* Fix rightpanel hiding scrollbar ([#11831](https://github.com/matrix-org/matrix-react-sdk/pull/11831)). Contributed by @kerryarchibald. -* Switch to updating presence via /sync calls instead of PUT /presence ([#11824](https://github.com/matrix-org/matrix-react-sdk/pull/11824)). Contributed by @t3chguy. - - -Changes in [3.84.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.84.1) (2023-11-13) -===================================================================================================== - -## 🐛 Bug Fixes - * Ensure `setUserCreator` is called when a store is assigned ([\#3867](https://github.com/matrix-org/matrix-js-sdk/pull/3867)). Fixes vector-im/element-web#26520. Contributed by @MidhunSureshR. - -Changes in [3.84.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.84.0) (2023-11-07) -===================================================================================================== - -## ✨ Features - * Knock on a ask-to-join room if a module wants to join the room when navigating to a room ([\#11787](https://github.com/matrix-org/matrix-react-sdk/pull/11787)). Contributed by @dhenneke. - * Element-R: Include crypto info in sentry ([\#11798](https://github.com/matrix-org/matrix-react-sdk/pull/11798)). Contributed by @florianduros. - * Element-R: Include crypto info in rageshake ([\#11797](https://github.com/matrix-org/matrix-react-sdk/pull/11797)). Contributed by @florianduros. - * Element-R: Add current version of the rust-sdk and vodozemac ([\#11785](https://github.com/matrix-org/matrix-react-sdk/pull/11785)). Contributed by @florianduros. - * Fix unfederated invite dialog ([\#9618](https://github.com/matrix-org/matrix-react-sdk/pull/9618)). Fixes vector-im/element-meta#1466 and vector-im/element-web#22102. Contributed by @owi92. - * New right panel visual language ([\#11664](https://github.com/matrix-org/matrix-react-sdk/pull/11664)). - * OIDC: add friendly errors ([\#11184](https://github.com/matrix-org/matrix-react-sdk/pull/11184)). Fixes vector-im/element-web#25665. Contributed by @kerryarchibald. - -## 🐛 Bug Fixes - * Fix rightpanel hiding scrollbar ([\#11831](https://github.com/matrix-org/matrix-react-sdk/pull/11831)). Contributed by @kerryarchibald. - * Fix multi-tab session lock on Firefox not being cleared ([\#11800](https://github.com/matrix-org/matrix-react-sdk/pull/11800)). Fixes vector-im/element-web#26165. Contributed by @ManuelHu. - * Deserialise spoilers back into slash command form ([\#11805](https://github.com/matrix-org/matrix-react-sdk/pull/11805)). Fixes vector-im/element-web#26344. - * Fix Incorrect message scaling for verification request ([\#11793](https://github.com/matrix-org/matrix-react-sdk/pull/11793)). Fixes vector-im/element-web#24304. Contributed by @capGoblin. - * Fix: Unable to restore a soft-logged-out session established via SSO ([\#11794](https://github.com/matrix-org/matrix-react-sdk/pull/11794)). Fixes vector-im/element-web#25957. Contributed by @kerryarchibald. - * Use configurable github issue links more consistently ([\#11796](https://github.com/matrix-org/matrix-react-sdk/pull/11796)). - * Fix io.element.late_event received_ts vs received_at ([\#11789](https://github.com/matrix-org/matrix-react-sdk/pull/11789)). - * Make invitation dialog scrollable when infos are too long ([\#11753](https://github.com/matrix-org/matrix-react-sdk/pull/11753)). Contributed by @nurjinjafar. - * Fix spoiler text-align ([\#11790](https://github.com/matrix-org/matrix-react-sdk/pull/11790)). Contributed by @ajbura. - * Fix: Right panel keeps showing chat when unmaximizing widget. ([\#11697](https://github.com/matrix-org/matrix-react-sdk/pull/11697)). Fixes vector-im/element-web#26265. Contributed by @manancodes. - * Fix margin of invite to room button ([\#11780](https://github.com/matrix-org/matrix-react-sdk/pull/11780)). Fixes vector-im/element-web#26410. - * Update base64 import ([\#11784](https://github.com/matrix-org/matrix-react-sdk/pull/11784)). - * Set max size for Element logo in search warning ([\#11779](https://github.com/matrix-org/matrix-react-sdk/pull/11779)). Fixes vector-im/element-web#26408. - * Fix: emoji size in room header topic, remove obsolete emoji style ([\#11757](https://github.com/matrix-org/matrix-react-sdk/pull/11757)). Fixes vector-im/element-web#26326. Contributed by @kerryarchibald. - * Fix: Bubble layout design is broken ([\#11763](https://github.com/matrix-org/matrix-react-sdk/pull/11763)). Fixes vector-im/element-web#25818. Contributed by @manancodes. - -Changes in [3.83.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.83.0) (2023-10-24) -===================================================================================================== - -## ✨ Features - * Iterate `io.element.late_event` decoration ([\#11760](https://github.com/matrix-org/matrix-react-sdk/pull/11760)). Fixes vector-im/element-web#26384. - * Render timeline separator for late event groups ([\#11739](https://github.com/matrix-org/matrix-react-sdk/pull/11739)). - * OIDC: revoke tokens on logout ([\#11718](https://github.com/matrix-org/matrix-react-sdk/pull/11718)). Fixes vector-im/element-web#25394. Contributed by @kerryarchibald. - * Show `io.element.late_event` in MessageTimestamp when known ([\#11733](https://github.com/matrix-org/matrix-react-sdk/pull/11733)). - * Show all labs flags if developerMode enabled ([\#11746](https://github.com/matrix-org/matrix-react-sdk/pull/11746)). Fixes vector-im/element-web#24571 and vector-im/element-web#8498. - * Use Compound tooltips on MessageTimestamp to improve UX of date time discovery ([\#11732](https://github.com/matrix-org/matrix-react-sdk/pull/11732)). Fixes vector-im/element-web#25913. - * Consolidate 4s passphrase input fields and use stable IDs ([\#11743](https://github.com/matrix-org/matrix-react-sdk/pull/11743)). Fixes vector-im/element-web#26228. - * Disable upgraderoom command without developer mode enabled ([\#11744](https://github.com/matrix-org/matrix-react-sdk/pull/11744)). Fixes vector-im/element-web#17620. - * Avoid rendering app download buttons if disabled in config ([\#11741](https://github.com/matrix-org/matrix-react-sdk/pull/11741)). Fixes vector-im/element-web#26309. - * OIDC: refresh tokens ([\#11699](https://github.com/matrix-org/matrix-react-sdk/pull/11699)). Fixes vector-im/element-web#25839. Contributed by @kerryarchibald. - * OIDC: register ([\#11727](https://github.com/matrix-org/matrix-react-sdk/pull/11727)). Fixes vector-im/element-web#25393. Contributed by @kerryarchibald. - * Use stable get_login_token and remove unstable MSC3882 support ([\#11001](https://github.com/matrix-org/matrix-react-sdk/pull/11001)). Contributed by @hughns. - -## 🐛 Bug Fixes - * Set max size for Element logo in search warning ([\#11779](https://github.com/matrix-org/matrix-react-sdk/pull/11779)). Fixes vector-im/element-web#26408. - * Avoid error when DMing oneself ([\#11754](https://github.com/matrix-org/matrix-react-sdk/pull/11754)). Fixes vector-im/element-web#7242. - * Fix: Message shield alignment is not right. ([\#11703](https://github.com/matrix-org/matrix-react-sdk/pull/11703)). Fixes vector-im/element-web#26142. Contributed by @manancodes. - * fix logging full event ([\#11755](https://github.com/matrix-org/matrix-react-sdk/pull/11755)). Fixes vector-im/element-web#26376. - * OIDC: use delegated auth account URL from `OidcClientStore` ([\#11723](https://github.com/matrix-org/matrix-react-sdk/pull/11723)). Fixes vector-im/element-web#26305. Contributed by @kerryarchibald. - * Fix: Members list shield alignment is not right. ([\#11700](https://github.com/matrix-org/matrix-react-sdk/pull/11700)). Fixes vector-im/element-web#26261. Contributed by @manancodes. - * Fix: HTML elements clickable area too wide. ([\#11666](https://github.com/matrix-org/matrix-react-sdk/pull/11666)). Fixes vector-im/element-web#25454. Contributed by @manancodes. - * Fix untranslated headings in the devtools dialog ([\#11734](https://github.com/matrix-org/matrix-react-sdk/pull/11734)). - * Fixes invite dialog alignment and pill color contrast ([\#11722](https://github.com/matrix-org/matrix-react-sdk/pull/11722)). Contributed by @gabrc52. - * Prevent select element in General settings overflowing in a room with very long room-id ([\#11597](https://github.com/matrix-org/matrix-react-sdk/pull/11597)). Contributed by @ABHIXIT2. - * Fix: Clicking on members pile does nothing. ([\#11657](https://github.com/matrix-org/matrix-react-sdk/pull/11657)). Fixes vector-im/element-web#26164. Contributed by @manancodes. - * Fix: Wierd shadow below room avatar in dark mode. ([\#11678](https://github.com/matrix-org/matrix-react-sdk/pull/11678)). Fixes vector-im/element-web#26153. Contributed by @manancodes. - * Fix start_sso / start_cas URLs failing to redirect to a authentication prompt ([\#11681](https://github.com/matrix-org/matrix-react-sdk/pull/11681)). Contributed by @Half-Shot. - -Changes in [3.82.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.82.0) (2023-10-10) -===================================================================================================== - -## ✨ Features - * Use .well-known to discover a default rendezvous server for use with Sign in with QR ([\#11655](https://github.com/matrix-org/matrix-react-sdk/pull/11655)). Contributed by @hughns. - * Message layout will update according to the selected style ([\#10170](https://github.com/matrix-org/matrix-react-sdk/pull/10170)). Fixes vector-im/element-web#21782. Contributed by @manancodes. - * Implement MSC4039: Add an MSC for a new Widget API action to upload files into the media repository ([\#11311](https://github.com/matrix-org/matrix-react-sdk/pull/11311)). Contributed by @dhenneke. - * Render space pills with square corners to match new avatar ([\#11632](https://github.com/matrix-org/matrix-react-sdk/pull/11632)). Fixes vector-im/element-web#26056. - * Linkify room topic ([\#11631](https://github.com/matrix-org/matrix-react-sdk/pull/11631)). Fixes vector-im/element-web#26185. - * Show knock rooms in the list ([\#11573](https://github.com/matrix-org/matrix-react-sdk/pull/11573)). Contributed by @maheichyk. - -## 🐛 Bug Fixes - * Fix: Avatar shrinks with long names ([\#11698](https://github.com/matrix-org/matrix-react-sdk/pull/11698)). Fixes vector-im/element-web#26252. Contributed by @manancodes. - * Update custom translations to support nested fields in structured JSON ([\#11685](https://github.com/matrix-org/matrix-react-sdk/pull/11685)). - * Fix: Edited message remove button is hard to reach. ([\#11674](https://github.com/matrix-org/matrix-react-sdk/pull/11674)). Fixes vector-im/element-web#24917. Contributed by @manancodes. - * Fix: Theme selector radio button not aligned in center with the text ([\#11676](https://github.com/matrix-org/matrix-react-sdk/pull/11676)). Fixes vector-im/element-web#25460. Contributed by @manancodes. - * Fix: Unread notification dot aligned ([\#11658](https://github.com/matrix-org/matrix-react-sdk/pull/11658)). Fixes vector-im/element-web#25285. Contributed by @manancodes. - * Fix: sync intentional mentions push rules with legacy rules ([\#11667](https://github.com/matrix-org/matrix-react-sdk/pull/11667)). Fixes vector-im/element-web#26227. Contributed by @kerryarchibald. - * Revert "Fix regression around FacePile with overflow (#11527)" ([\#11634](https://github.com/matrix-org/matrix-react-sdk/pull/11634)). Fixes vector-im/element-web#26209. - * Fix: Alignment Fixed ([\#11648](https://github.com/matrix-org/matrix-react-sdk/pull/11648)). Fixes vector-im/element-web#26169. Contributed by @manancodes. - * Fix: onFinished added which closes the menu ([\#11647](https://github.com/matrix-org/matrix-react-sdk/pull/11647)). Fixes vector-im/element-web#25556. Contributed by @manancodes. - * Don't start key backups when opening settings ([\#11640](https://github.com/matrix-org/matrix-react-sdk/pull/11640)). - * Fix add to space avatar text centering ([\#11643](https://github.com/matrix-org/matrix-react-sdk/pull/11643)). Fixes vector-im/element-web#26154. - * fix avatar styling in lightbox ([\#11641](https://github.com/matrix-org/matrix-react-sdk/pull/11641)). Fixes vector-im/element-web#26196. - -Changes in [3.81.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.81.1) (2023-09-29) -===================================================================================================== - -## 🐛 Bug Fixes - * Fix Emoji font on Safari 17 ([\#11673](https://github.com/matrix-org/matrix-react-sdk/pull/11673)). - -Changes in [3.81.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.81.0) (2023-09-26) -===================================================================================================== - -## ✨ Features - * Make video & voice call buttons pin conference widget if unpinned ([\#11576](https://github.com/matrix-org/matrix-react-sdk/pull/11576)). Fixes vector-im/customer-retainer#72. - * OIDC: persist refresh token ([\#11249](https://github.com/matrix-org/matrix-react-sdk/pull/11249)). Contributed by @kerryarchibald. - * ElementR: Cross user verification ([\#11364](https://github.com/matrix-org/matrix-react-sdk/pull/11364)). Fixes vector-im/element-web#25752. Contributed by @florianduros. - * Default intentional mentions ([\#11602](https://github.com/matrix-org/matrix-react-sdk/pull/11602)). - * Notify users about denied access on ask-to-join rooms ([\#11480](https://github.com/matrix-org/matrix-react-sdk/pull/11480)). Contributed by @nurjinjafar. - * Allow setting knock room directory visibility ([\#11529](https://github.com/matrix-org/matrix-react-sdk/pull/11529)). Contributed by @charlynguyen. - -## 🐛 Bug Fixes - * Revert "Fix regression around FacePile with overflow (#11527)" ([\#11634](https://github.com/matrix-org/matrix-react-sdk/pull/11634)). Fixes vector-im/element-web#26209. - * Escape placeholder before injecting it into the style ([\#11607](https://github.com/matrix-org/matrix-react-sdk/pull/11607)). - * Move ViewUser action callback to RoomView ([\#11495](https://github.com/matrix-org/matrix-react-sdk/pull/11495)). Fixes vector-im/element-web#26040. - * Fix room timeline search toggling behaviour edge case ([\#11605](https://github.com/matrix-org/matrix-react-sdk/pull/11605)). Fixes vector-im/element-web#26105. - * Avoid rendering view-message link in RoomKnocksBar unnecessarily ([\#11598](https://github.com/matrix-org/matrix-react-sdk/pull/11598)). Contributed by @charlynguyen. - * Use knock rooms sync to reflect the knock state ([\#11596](https://github.com/matrix-org/matrix-react-sdk/pull/11596)). Fixes vector-im/element-web#26043 and vector-im/element-web#26044. Contributed by @charlynguyen. - * Fix avatar in right panel not using the correct font ([\#11593](https://github.com/matrix-org/matrix-react-sdk/pull/11593)). Fixes vector-im/element-web#26061. Contributed by @MidhunSureshR. - * Add waits in Spotlight Cypress tests, hoping this unflakes them ([\#11590](https://github.com/matrix-org/matrix-react-sdk/pull/11590)). Fixes vector-im/element-web#26053, vector-im/element-web#26140 vector-im/element-web#26139 and vector-im/element-web#26138. Contributed by @andybalaam. - * Fix vertical alignment of default avatar font ([\#11582](https://github.com/matrix-org/matrix-react-sdk/pull/11582)). Fixes vector-im/element-web#26081. - * Fix avatars in public room & space search being flex shrunk ([\#11580](https://github.com/matrix-org/matrix-react-sdk/pull/11580)). Fixes vector-im/element-web#26133. - * Fix EventTile avatars being rendered with a size of 0 instead of hidden ([\#11558](https://github.com/matrix-org/matrix-react-sdk/pull/11558)). Fixes vector-im/element-web#26075. - -Changes in [3.80.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.80.1) (2023-09-13) -===================================================================================================== - -## 🐛 Bug Fixes - * Update Compound to fix Firefox-specific avatar regression ([\#11604](https://github.com/matrix-org/matrix-react-sdk/pull/11604)) - -Changes in [3.80.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.80.0) (2023-09-12) -===================================================================================================== - -## ✨ Features - * Allow creating public knock rooms ([\#11481](https://github.com/matrix-org/matrix-react-sdk/pull/11481)). Contributed by @charlynguyen. - * Render custom images in reactions according to MSC4027 ([\#11087](https://github.com/matrix-org/matrix-react-sdk/pull/11087)). Contributed by @sumnerevans. - * Introduce room knocks bar ([\#11475](https://github.com/matrix-org/matrix-react-sdk/pull/11475)). Contributed by @charlynguyen. - * Room header UI updates ([\#11507](https://github.com/matrix-org/matrix-react-sdk/pull/11507)). Fixes vector-im/element-web#25892. - * Remove green "verified" bar for encrypted events ([\#11496](https://github.com/matrix-org/matrix-react-sdk/pull/11496)). - * Update member count on room summary update ([\#11488](https://github.com/matrix-org/matrix-react-sdk/pull/11488)). - * Support for E2EE in Element Call ([\#11492](https://github.com/matrix-org/matrix-react-sdk/pull/11492)). - * Allow requesting to join knock rooms via spotlight ([\#11482](https://github.com/matrix-org/matrix-react-sdk/pull/11482)). Contributed by @charlynguyen. - * Lock out the first tab if Element is opened in a second tab. ([\#11425](https://github.com/matrix-org/matrix-react-sdk/pull/11425)). Fixes vector-im/element-web#25157. - * Change avatar to use Compound implementation ([\#11448](https://github.com/matrix-org/matrix-react-sdk/pull/11448)). - -## 🐛 Bug Fixes - * Fix vertical alignment of default avatar font ([\#11582](https://github.com/matrix-org/matrix-react-sdk/pull/11582)). Fixes vector-im/element-web#26081. - * Fix avatars in public room & space search being flex shrunk ([\#11580](https://github.com/matrix-org/matrix-react-sdk/pull/11580)). Fixes vector-im/element-web#26133. - * Fix EventTile avatars being rendered with a size of 0 instead of hidden ([\#11558](https://github.com/matrix-org/matrix-react-sdk/pull/11558)). Fixes vector-im/element-web#26075. - * Use RoomStateEvent.Update for knocks ([\#11516](https://github.com/matrix-org/matrix-react-sdk/pull/11516)). Contributed by @charlynguyen. - * Prevent event propagation when clicking icon buttons ([\#11515](https://github.com/matrix-org/matrix-react-sdk/pull/11515)). - * Only display RoomKnocksBar when feature flag is enabled ([\#11513](https://github.com/matrix-org/matrix-react-sdk/pull/11513)). Contributed by @andybalaam. - * Fix avatars of knock members for people tab of room settings ([\#11506](https://github.com/matrix-org/matrix-react-sdk/pull/11506)). Fixes vector-im/element-web#26083. Contributed by @charlynguyen. - * Fixes read receipt avatar offset ([\#11483](https://github.com/matrix-org/matrix-react-sdk/pull/11483)). Fixes vector-im/element-web#26067, vector-im/element-web#26064 vector-im/element-web#26059 and vector-im/element-web#26061. - * Fix avatar defects ([\#11473](https://github.com/matrix-org/matrix-react-sdk/pull/11473)). Fixes vector-im/element-web#26051 and vector-im/element-web#26046. - * Fix consistent avatar output for Percy ([\#11472](https://github.com/matrix-org/matrix-react-sdk/pull/11472)). Fixes vector-im/element-web#26049 and vector-im/element-web#26052. - * Fix colour of avatar and colour matching with username ([\#11470](https://github.com/matrix-org/matrix-react-sdk/pull/11470)). Fixes vector-im/element-web#26042. - * Fix incompatibility of Soft Logout with Element-R ([\#11468](https://github.com/matrix-org/matrix-react-sdk/pull/11468)). - * Fix instances of double translation and guard translation calls using typescript ([\#11443](https://github.com/matrix-org/matrix-react-sdk/pull/11443)). - -Changes in [3.79.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.79.0) (2023-08-29) -===================================================================================================== - -## ✨ Features - * Hide account deactivation for externally managed accounts ([\#11445](https://github.com/matrix-org/matrix-react-sdk/pull/11445)). Fixes vector-im/element-web#26022. Contributed by @kerryarchibald. - * OIDC: Redirect to delegated auth provider when signing out ([\#11432](https://github.com/matrix-org/matrix-react-sdk/pull/11432)). Fixes vector-im/element-web#26000. Contributed by @kerryarchibald. - * Disable 3pid fields in settings when `m.3pid_changes` capability is disabled ([\#11430](https://github.com/matrix-org/matrix-react-sdk/pull/11430)). Fixes vector-im/element-web#25995. Contributed by @kerryarchibald. - * OIDC: disable multi session signout for OIDC-aware servers in session manager ([\#11431](https://github.com/matrix-org/matrix-react-sdk/pull/11431)). Contributed by @kerryarchibald. - * Implement updated open dialog method of the Module API ([\#11395](https://github.com/matrix-org/matrix-react-sdk/pull/11395)). Contributed by @dhenneke. - * Polish & delabs `Exploring public spaces` feature ([\#11423](https://github.com/matrix-org/matrix-react-sdk/pull/11423)). - * Treat lists with a single empty item as plain text, not Markdown. ([\#6833](https://github.com/matrix-org/matrix-react-sdk/pull/6833)). Fixes vector-im/element-meta#1265. - * Allow managing room knocks ([\#11404](https://github.com/matrix-org/matrix-react-sdk/pull/11404)). Contributed by @charlynguyen. - * Pin the action buttons to the bottom of the scrollable dialogs ([\#11407](https://github.com/matrix-org/matrix-react-sdk/pull/11407)). Contributed by @dhenneke. - * Support Matrix 1.1 (drop legacy r0 versions) ([\#9819](https://github.com/matrix-org/matrix-react-sdk/pull/9819)). - -## 🐛 Bug Fixes - * Fix export type "Current timeline" to match its behaviour to its name ([\#11426](https://github.com/matrix-org/matrix-react-sdk/pull/11426)). Fixes vector-im/element-web#25988. - * Fix Room Settings > Notifications file upload input being shown superfluously ([\#11415](https://github.com/matrix-org/matrix-react-sdk/pull/11415)). Fixes vector-im/element-web#18392. - * Simplify registration with email validation ([\#11398](https://github.com/matrix-org/matrix-react-sdk/pull/11398)). Fixes vector-im/element-web#25832 vector-im/element-web#23601 and vector-im/element-web#22297. - * correct home server URL ([\#11391](https://github.com/matrix-org/matrix-react-sdk/pull/11391)). Fixes vector-im/element-web#25931. Contributed by @NSV1991. - * Include non-matching DMs in Spotlight recent conversations when the DM's userId is part of the search API results ([\#11374](https://github.com/matrix-org/matrix-react-sdk/pull/11374)). Contributed by @mgcm. - * Fix useRoomMembers missing updates causing incorrect membership counts ([\#11392](https://github.com/matrix-org/matrix-react-sdk/pull/11392)). Fixes vector-im/element-web#17096. - * Show error when searching public rooms fails ([\#11378](https://github.com/matrix-org/matrix-react-sdk/pull/11378)). - -Changes in [3.78.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.78.0) (2023-08-15) -===================================================================================================== - -## 🦖 Deprecations - * Deprecate camelCase config options ([\#11261](https://github.com/matrix-org/matrix-react-sdk/pull/11261)). - -## ✨ Features - * Allow knocking rooms ([\#11353](https://github.com/matrix-org/matrix-react-sdk/pull/11353)). Contributed by @charlynguyen. - * Support adding space-restricted joins on rooms not members of those spaces ([\#9017](https://github.com/matrix-org/matrix-react-sdk/pull/9017)). Fixes vector-im/element-web#19213. - * Clear requiresClient and show pop-out if widget-api fails to ready ([\#11321](https://github.com/matrix-org/matrix-react-sdk/pull/11321)). Fixes vector-im/customer-retainer#73. - * Bump pagination sizes due to hidden events ([\#11342](https://github.com/matrix-org/matrix-react-sdk/pull/11342)). - * Remove display of key backup signatures from backup settings ([\#11333](https://github.com/matrix-org/matrix-react-sdk/pull/11333)). - * Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity ([\#11222](https://github.com/matrix-org/matrix-react-sdk/pull/11222)). Fixes vector-im/element-web#9478. - -## 🐛 Bug Fixes - * Fix "Export chat" not respecting configured time format in plain text mode ([\#10696](https://github.com/matrix-org/matrix-react-sdk/pull/10696)). Fixes vector-im/element-web#23838. Contributed by @rashmitpankhania. - * Fix some missing 1-count pluralisations around event list summaries ([\#11371](https://github.com/matrix-org/matrix-react-sdk/pull/11371)). Fixes vector-im/element-web#25925. - * Fix create subspace dialog not working for public space creation ([\#11367](https://github.com/matrix-org/matrix-react-sdk/pull/11367)). Fixes vector-im/element-web#25916. - * Search for users on paste ([\#11304](https://github.com/matrix-org/matrix-react-sdk/pull/11304)). Fixes vector-im/element-web#17523. Contributed by @peterscheu-aceart. - * Fix AppTile context menu not always showing up when it has options ([\#11358](https://github.com/matrix-org/matrix-react-sdk/pull/11358)). Fixes vector-im/element-web#25914. - * Fix clicking on home all rooms space notification not working ([\#11337](https://github.com/matrix-org/matrix-react-sdk/pull/11337)). Fixes vector-im/element-web#22844. - * Fix joining a suggested room switching space away ([\#11347](https://github.com/matrix-org/matrix-react-sdk/pull/11347)). Fixes vector-im/element-web#25838. - * Fix home/all rooms context menu in space panel ([\#11350](https://github.com/matrix-org/matrix-react-sdk/pull/11350)). Fixes vector-im/element-web#25896. - * Make keyboard handling in and out of autocomplete completions consistent ([\#11344](https://github.com/matrix-org/matrix-react-sdk/pull/11344)). Fixes vector-im/element-web#25878. - * De-duplicate reactions by sender to account for faulty/malicious servers ([\#11340](https://github.com/matrix-org/matrix-react-sdk/pull/11340)). Fixes vector-im/element-web#25872. - * Fix disable_3pid_login being ignored for the email field ([\#11335](https://github.com/matrix-org/matrix-react-sdk/pull/11335)). Fixes vector-im/element-web#25863. - * Upgrade wysiwyg editor for ctrl+backspace windows fix ([\#11324](https://github.com/matrix-org/matrix-react-sdk/pull/11324)). Fixes vector-im/verticals-internal#102. - * Unhide the view source event toggle - it works well enough ([\#11336](https://github.com/matrix-org/matrix-react-sdk/pull/11336)). Fixes vector-im/element-web#25861. - -Changes in [3.77.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.77.1) (2023-08-04) -===================================================================================================== - -## 🐛 Bug Fixes - * Revert to using the /presence API for presence ([\#11366](https://github.com/matrix-org/matrix-react-sdk/pull/11366)) - -Changes in [3.77.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.77.0) (2023-08-01) -===================================================================================================== - -## 🦖 Deprecations - * Deprecate camelCase config options ([\#11261](https://github.com/matrix-org/matrix-react-sdk/pull/11261)). - -## ✨ Features - * Do not show "Forget room" button in Room View header for guest users ([\#10898](https://github.com/matrix-org/matrix-react-sdk/pull/10898)). Contributed by @spantaleev. - * Switch to updating presence via /sync calls instead of PUT /presence ([\#11223](https://github.com/matrix-org/matrix-react-sdk/pull/11223)). Fixes vector-im/element-web#20809 vector-im/element-web#13877 and vector-im/element-web#4813. - * Fix blockquote colour contrast ([\#11299](https://github.com/matrix-org/matrix-react-sdk/pull/11299)). Fixes matrix-org/element-web-rageshakes#21800. - * Don't hide room header buttons in video rooms and rooms with a call ([\#9712](https://github.com/matrix-org/matrix-react-sdk/pull/9712)). Fixes vector-im/element-web#23900. - * OIDC: Persist details in session storage, create store ([\#11302](https://github.com/matrix-org/matrix-react-sdk/pull/11302)). Fixes vector-im/element-web#25710. Contributed by @kerryarchibald. - * Allow setting room join rule to knock ([\#11248](https://github.com/matrix-org/matrix-react-sdk/pull/11248)). Contributed by @charlynguyen. - * Retry joins on 524 (Cloudflare timeout) also ([\#11296](https://github.com/matrix-org/matrix-react-sdk/pull/11296)). Fixes vector-im/element-web#8776. - * Make sure users returned by the homeserver search API are displayed. Don't silently drop any. ([\#9556](https://github.com/matrix-org/matrix-react-sdk/pull/9556)). Fixes vector-im/element-web#24422. Contributed by @maxmalek. - * Offer to unban user during invite if inviter has sufficient permissions ([\#11256](https://github.com/matrix-org/matrix-react-sdk/pull/11256)). Fixes vector-im/element-web#3222. - * Split join and goto slash commands, the latter shouldn't auto_join ([\#11259](https://github.com/matrix-org/matrix-react-sdk/pull/11259)). Fixes vector-im/element-web#10128. - * Integration work for rich text editor 2.3.1 ([\#11172](https://github.com/matrix-org/matrix-react-sdk/pull/11172)). Contributed by @alunturner. - * Compound color pass ([\#11079](https://github.com/matrix-org/matrix-react-sdk/pull/11079)). Fixes vector-im/internal-planning#450 and vector-im/element-web#25547. - * Warn when demoting self via /op and /deop slash commands ([\#11214](https://github.com/matrix-org/matrix-react-sdk/pull/11214)). Fixes vector-im/element-web#13726. - -## 🐛 Bug Fixes - * Fix edge case with sent indicator being drawn when it shouldn't be ([\#11320](https://github.com/matrix-org/matrix-react-sdk/pull/11320)). - * Use correct translation function for WYSIWYG buttons ([\#11315](https://github.com/matrix-org/matrix-react-sdk/pull/11315)). Fixes vector-im/verticals-internal#109. - * Handle empty own profile ([\#11319](https://github.com/matrix-org/matrix-react-sdk/pull/11319)). Fixes vector-im/element-web#25510. - * Fix peeked rooms showing up in historical ([\#11316](https://github.com/matrix-org/matrix-react-sdk/pull/11316)). Fixes vector-im/element-web#22473. - * Ensure consistency when rendering the sent event indicator ([\#11314](https://github.com/matrix-org/matrix-react-sdk/pull/11314)). Fixes vector-im/element-web#17937. - * Prevent re-filtering user directory results in spotlight ([\#11290](https://github.com/matrix-org/matrix-react-sdk/pull/11290)). Fixes vector-im/element-web#24422. - * Fix GIF label on dark theme ([\#11312](https://github.com/matrix-org/matrix-react-sdk/pull/11312)). Fixes vector-im/element-web#25836. - * Fix issues around room notification settings flaking out ([\#11306](https://github.com/matrix-org/matrix-react-sdk/pull/11306)). Fixes vector-im/element-web#16472 vector-im/element-web#21309 and vector-im/element-web#6828. - * Fix invite dialog showing the same user multiple times ([\#11308](https://github.com/matrix-org/matrix-react-sdk/pull/11308)). Fixes vector-im/element-web#25578. - * Don't show composer send button if user cannot send ([\#11298](https://github.com/matrix-org/matrix-react-sdk/pull/11298)). Fixes vector-im/element-web#25825. - * Restore color for sender in imageview ([\#11289](https://github.com/matrix-org/matrix-react-sdk/pull/11289)). Fixes vector-im/element-web#25822. - * Fix changelog dialog heading size ([\#11286](https://github.com/matrix-org/matrix-react-sdk/pull/11286)). Fixes vector-im/element-web#25789. - * Restore offline presence badge color ([\#11287](https://github.com/matrix-org/matrix-react-sdk/pull/11287)). Fixes vector-im/element-web#25792. - * Fix bubble message layout avatar overlap ([\#11284](https://github.com/matrix-org/matrix-react-sdk/pull/11284)). Fixes vector-im/element-web#25818. - * Fix voice call tile size ([\#11285](https://github.com/matrix-org/matrix-react-sdk/pull/11285)). Fixes vector-im/element-web#25684. - * Fix layout of sessions tab buttons ([\#11279](https://github.com/matrix-org/matrix-react-sdk/pull/11279)). Fixes vector-im/element-web#25545. - * Don't bother showing redundant tooltip on space menu ([\#11276](https://github.com/matrix-org/matrix-react-sdk/pull/11276)). Fixes vector-im/element-web#20380. - * Remove reply fallback from notifications ([\#11278](https://github.com/matrix-org/matrix-react-sdk/pull/11278)). Fixes vector-im/element-web#17859. - * Populate info.duration for audio & video file uploads ([\#11225](https://github.com/matrix-org/matrix-react-sdk/pull/11225)). Fixes vector-im/element-web#17720. - * Hide widget menu button if it there are no options available ([\#11257](https://github.com/matrix-org/matrix-react-sdk/pull/11257)). Fixes vector-im/element-web#24826. - * Fix colour regressions ([\#11273](https://github.com/matrix-org/matrix-react-sdk/pull/11273)). Fixes vector-im/element-web#25788, vector-im/element-web#25808 vector-im/element-web#25811 and vector-im/element-web#25812. - * Fix room view not properly maintaining scroll position ([\#11274](https://github.com/matrix-org/matrix-react-sdk/pull/11274)). Fixes vector-im/element-web#25810. - * Prevent user from accidentally double clicking user info admin actions ([\#11254](https://github.com/matrix-org/matrix-react-sdk/pull/11254)). Fixes vector-im/element-web#10944. - * Fix missing metaspace notification badges ([\#11269](https://github.com/matrix-org/matrix-react-sdk/pull/11269)). Fixes vector-im/element-web#25679. - * Fix clicking MXID in timeline going to matrix.to ([\#11263](https://github.com/matrix-org/matrix-react-sdk/pull/11263)). Fixes vector-im/element-web#23342. - * Restoring optional ligatures by resetting letter-spacing ([\#11202](https://github.com/matrix-org/matrix-react-sdk/pull/11202)). Fixes vector-im/element-web#25727. - * Allow emoji presentation selector to not break BigEmoji styling ([\#11253](https://github.com/matrix-org/matrix-react-sdk/pull/11253)). Fixes vector-im/element-web#17848. - * Make event highliht use primary content token ([\#11255](https://github.com/matrix-org/matrix-react-sdk/pull/11255)). - * Fix event info events size and color ([\#11252](https://github.com/matrix-org/matrix-react-sdk/pull/11252)). Fixes vector-im/element-web#25778. - * Fix color mapping for blockquote border ([\#11251](https://github.com/matrix-org/matrix-react-sdk/pull/11251)). Fixes vector-im/element-web#25782. - * Strip emoji variation when searching emoji by emoji ([\#11221](https://github.com/matrix-org/matrix-react-sdk/pull/11221)). Fixes vector-im/element-web#18703. - -Changes in [3.76.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.76.0) (2023-07-18) -===================================================================================================== - -## 🔒 Security - * Fixes for [CVE-2023-37259](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-37259) / [GHSA-c9vx-2g7w-rp65](https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-c9vx-2g7w-rp65) - -## ✨ Features - * GYU: Update banner ([\#11211](https://github.com/matrix-org/matrix-react-sdk/pull/11211)). Fixes vector-im/element-web#25530. Contributed by @justjanne. - * Linkify mxc:// URLs as links to your media repo ([\#11213](https://github.com/matrix-org/matrix-react-sdk/pull/11213)). Fixes vector-im/element-web#6942. - * OIDC: Log in ([\#11199](https://github.com/matrix-org/matrix-react-sdk/pull/11199)). Fixes vector-im/element-web#25657. Contributed by @kerryarchibald. - * Handle all permitted url schemes in linkify ([\#11215](https://github.com/matrix-org/matrix-react-sdk/pull/11215)). Fixes vector-im/element-web#4457 and vector-im/element-web#8720. - * Autoapprove Element Call oidc requests ([\#11209](https://github.com/matrix-org/matrix-react-sdk/pull/11209)). Contributed by @toger5. - * Allow creating knock rooms ([\#11182](https://github.com/matrix-org/matrix-react-sdk/pull/11182)). Contributed by @charlynguyen. - * feat(faq): remove keyboard shortcuts button ([\#9342](https://github.com/matrix-org/matrix-react-sdk/pull/9342)). Fixes vector-im/element-web#22625. Contributed by @gefgu. - * Expose and pre-populate thread ID in devtools dialog ([\#10953](https://github.com/matrix-org/matrix-react-sdk/pull/10953)). - * Hide URL preview if it will be empty ([\#9029](https://github.com/matrix-org/matrix-react-sdk/pull/9029)). - * Change wording from avatar to profile picture ([\#7015](https://github.com/matrix-org/matrix-react-sdk/pull/7015)). Fixes vector-im/element-meta#1331. Contributed by @aaronraimist. - * Quick and dirty devtool to explore state history ([\#11197](https://github.com/matrix-org/matrix-react-sdk/pull/11197)). - * Consider more user inputs when calculating zxcvbn score ([\#11180](https://github.com/matrix-org/matrix-react-sdk/pull/11180)). - * GYU: Account Notification Settings ([\#11008](https://github.com/matrix-org/matrix-react-sdk/pull/11008)). Fixes vector-im/element-web#24567. Contributed by @justjanne. - * Compound Typography pass ([\#11103](https://github.com/matrix-org/matrix-react-sdk/pull/11103)). Fixes vector-im/element-web#25548. - * OIDC: navigate to authorization endpoint ([\#11096](https://github.com/matrix-org/matrix-react-sdk/pull/11096)). Fixes vector-im/element-web#25574. Contributed by @kerryarchibald. - -## 🐛 Bug Fixes - * Fix missing metaspace notification badges ([\#11269](https://github.com/matrix-org/matrix-react-sdk/pull/11269)). Fixes vector-im/element-web#25679. - * Make checkboxes less rounded ([\#11224](https://github.com/matrix-org/matrix-react-sdk/pull/11224)). Contributed by @andybalaam. - * GYU: Fix issues with audible keywords without activated mentions ([\#11218](https://github.com/matrix-org/matrix-react-sdk/pull/11218)). Contributed by @justjanne. - * PosthogAnalytics unwatch settings on logout ([\#11207](https://github.com/matrix-org/matrix-react-sdk/pull/11207)). Fixes vector-im/element-web#25703. - * Avoid trying to set room account data for pinned events as guest ([\#11216](https://github.com/matrix-org/matrix-react-sdk/pull/11216)). Fixes vector-im/element-web#6300. - * GYU: Disable sound for DMs checkbox when DM notifications are disabled ([\#11210](https://github.com/matrix-org/matrix-react-sdk/pull/11210)). Contributed by @justjanne. - * force to allow calls without video and audio in embedded mode ([\#11131](https://github.com/matrix-org/matrix-react-sdk/pull/11131)). Contributed by @EnricoSchw. - * Fix room tile text clipping ([\#11196](https://github.com/matrix-org/matrix-react-sdk/pull/11196)). Fixes vector-im/element-web#25718. - * Handle newlines in user pills ([\#11166](https://github.com/matrix-org/matrix-react-sdk/pull/11166)). Fixes vector-im/element-web#10994. - * Limit width of user menu in space panel ([\#11192](https://github.com/matrix-org/matrix-react-sdk/pull/11192)). Fixes vector-im/element-web#22627. - * Add isLocation to ComposerEvent analytics events ([\#11187](https://github.com/matrix-org/matrix-react-sdk/pull/11187)). Contributed by @andybalaam. - * Fix: hide unsupported login elements ([\#11185](https://github.com/matrix-org/matrix-react-sdk/pull/11185)). Fixes vector-im/element-web#25711. Contributed by @kerryarchibald. - * Scope smaller font size to user info panel ([\#11178](https://github.com/matrix-org/matrix-react-sdk/pull/11178)). Fixes vector-im/element-web#25683. - * Apply i18n to strings in the html export ([\#11176](https://github.com/matrix-org/matrix-react-sdk/pull/11176)). - * Inhibit url previews on MXIDs containing slashes same as those without ([\#11160](https://github.com/matrix-org/matrix-react-sdk/pull/11160)). - * Make event info size consistent with state events ([\#11181](https://github.com/matrix-org/matrix-react-sdk/pull/11181)). - * Fix markdown content spacing ([\#11177](https://github.com/matrix-org/matrix-react-sdk/pull/11177)). Fixes vector-im/element-web#25685. - * Fix font-family definition for emojis ([\#11170](https://github.com/matrix-org/matrix-react-sdk/pull/11170)). Fixes vector-im/element-web#25686. - * Fix spurious error sending receipt in thread errors ([\#11157](https://github.com/matrix-org/matrix-react-sdk/pull/11157)). - * Consider the empty push rule actions array equiv to deprecated dont_notify ([\#11155](https://github.com/matrix-org/matrix-react-sdk/pull/11155)). Fixes vector-im/element-web#25674. - * Only trap escape key for cancel reply if there is a reply ([\#11140](https://github.com/matrix-org/matrix-react-sdk/pull/11140)). Fixes vector-im/element-web#25640. - * Update linkify to 4.1.1 ([\#11132](https://github.com/matrix-org/matrix-react-sdk/pull/11132)). Fixes vector-im/element-web#23806. - -Changes in [3.75.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.75.0) (2023-07-04) -===================================================================================================== - -## 🦖 Deprecations - * Remove `feature_favourite_messages` as it is has been abandoned for now ([\#11097](https://github.com/matrix-org/matrix-react-sdk/pull/11097)). Fixes vector-im/element-web#25555. - -## ✨ Features - * Don't setup keys on login when encryption is force disabled ([\#11125](https://github.com/matrix-org/matrix-react-sdk/pull/11125)). Contributed by @kerryarchibald. - * OIDC: attempt dynamic client registration ([\#11074](https://github.com/matrix-org/matrix-react-sdk/pull/11074)). Fixes vector-im/element-web#25468 and vector-im/element-web#25467. Contributed by @kerryarchibald. - * OIDC: Check static client registration and add login flow ([\#11088](https://github.com/matrix-org/matrix-react-sdk/pull/11088)). Fixes vector-im/element-web#25467. Contributed by @kerryarchibald. - * Improve message body output from plain text editor ([\#11124](https://github.com/matrix-org/matrix-react-sdk/pull/11124)). Contributed by @alunturner. - * Disable encryption toggle in room settings when force disabled ([\#11122](https://github.com/matrix-org/matrix-react-sdk/pull/11122)). Contributed by @kerryarchibald. - * Add .well-known config option to force disable encryption on room creation ([\#11120](https://github.com/matrix-org/matrix-react-sdk/pull/11120)). Contributed by @kerryarchibald. - * Handle permalinks in room topic ([\#11115](https://github.com/matrix-org/matrix-react-sdk/pull/11115)). Fixes vector-im/element-web#23395. - * Add at room avatar for RTE ([\#11106](https://github.com/matrix-org/matrix-react-sdk/pull/11106)). Contributed by @alunturner. - * Remove new room breadcrumbs ([\#11104](https://github.com/matrix-org/matrix-react-sdk/pull/11104)). - * Update rich text editor dependency and associated changes ([\#11098](https://github.com/matrix-org/matrix-react-sdk/pull/11098)). Contributed by @alunturner. - * Implement new model, hooks and reconcilation code for new GYU notification settings ([\#11089](https://github.com/matrix-org/matrix-react-sdk/pull/11089)). Contributed by @justjanne. - * Allow maintaining a different right panel width for thread panels ([\#11064](https://github.com/matrix-org/matrix-react-sdk/pull/11064)). Fixes vector-im/element-web#25487. - * Make AppPermission pane scrollable ([\#10954](https://github.com/matrix-org/matrix-react-sdk/pull/10954)). Fixes vector-im/element-web#25438 and vector-im/element-web#25511. Contributed by @luixxiul. - * Integrate compound design tokens ([\#11091](https://github.com/matrix-org/matrix-react-sdk/pull/11091)). Fixes vector-im/internal-planning#450. - * Don't warn about the effects of redacting state events when redacting non-state-events ([\#11071](https://github.com/matrix-org/matrix-react-sdk/pull/11071)). Fixes vector-im/element-web#8478. - * Allow specifying help URLs in config.json ([\#11070](https://github.com/matrix-org/matrix-react-sdk/pull/11070)). Fixes vector-im/element-web#15268. - -## 🐛 Bug Fixes - * Fix spurious notifications on non-live events ([\#11133](https://github.com/matrix-org/matrix-react-sdk/pull/11133)). Fixes vector-im/element-web#24336. - * Prevent auto-translation within composer ([\#11114](https://github.com/matrix-org/matrix-react-sdk/pull/11114)). Fixes vector-im/element-web#25624. - * Fix caret jump when backspacing into empty line at beginning of editor ([\#11128](https://github.com/matrix-org/matrix-react-sdk/pull/11128)). Fixes vector-im/element-web#22335. - * Fix server picker not allowing you to switch from custom to default ([\#11127](https://github.com/matrix-org/matrix-react-sdk/pull/11127)). Fixes vector-im/element-web#25650. - * Consider the unthreaded read receipt for Unread dot state ([\#11117](https://github.com/matrix-org/matrix-react-sdk/pull/11117)). Fixes vector-im/element-web#24229. - * Increase RTE resilience ([\#11111](https://github.com/matrix-org/matrix-react-sdk/pull/11111)). Fixes vector-im/element-web#25277. Contributed by @alunturner. - * Fix RoomView ignoring alias lookup errors due to them not knowing the roomId ([\#11099](https://github.com/matrix-org/matrix-react-sdk/pull/11099)). Fixes vector-im/element-web#24783 and vector-im/element-web#25562. - * Fix style inconsistencies on SecureBackupPanel ([\#11102](https://github.com/matrix-org/matrix-react-sdk/pull/11102)). Fixes vector-im/element-web#25615. Contributed by @luixxiul. - * Remove unknown MXIDs from invite suggestions ([\#11055](https://github.com/matrix-org/matrix-react-sdk/pull/11055)). Fixes vector-im/element-web#25446. - * Reduce volume of ring sounds to normalised levels ([\#9143](https://github.com/matrix-org/matrix-react-sdk/pull/9143)). Contributed by @JMoVS. - * Fix slash commands not being enabled in certain cases ([\#11090](https://github.com/matrix-org/matrix-react-sdk/pull/11090)). Fixes vector-im/element-web#25572. - * Prevent escape in threads from sending focus to main timeline composer ([\#11061](https://github.com/matrix-org/matrix-react-sdk/pull/11061)). Fixes vector-im/element-web#23397. - -Changes in [3.74.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.74.0) (2023-06-20) -===================================================================================================== - -## ✨ Features - * OIDC: add delegatedauthentication to validated server config ([\#11053](https://github.com/matrix-org/matrix-react-sdk/pull/11053)). Contributed by @kerryarchibald. - * Allow image pasting in plain mode in RTE ([\#11056](https://github.com/matrix-org/matrix-react-sdk/pull/11056)). Contributed by @alunturner. - * Show room options menu if "UIComponent.roomOptionsMenu" is enabled ([\#10365](https://github.com/matrix-org/matrix-react-sdk/pull/10365)). Contributed by @maheichyk. - * Allow image pasting in rich text mode in RTE ([\#11049](https://github.com/matrix-org/matrix-react-sdk/pull/11049)). Contributed by @alunturner. - * Update voice broadcast redaction to use MSC3912 `with_rel_type` instead of `with_relations` ([\#11014](https://github.com/matrix-org/matrix-react-sdk/pull/11014)). Fixes vector-im/element-web#25471. - * Add config to skip widget_build_url for DM rooms ([\#11044](https://github.com/matrix-org/matrix-react-sdk/pull/11044)). Fixes vector-im/customer-retainer#74. - * Inhibit interactions on forward dialog message previews ([\#11025](https://github.com/matrix-org/matrix-react-sdk/pull/11025)). Fixes vector-im/element-web#23459. - * Removed `DecryptionFailureBar.tsx` ([\#11027](https://github.com/matrix-org/matrix-react-sdk/pull/11027)). Fixes vector-im/element-meta#1358. Contributed by @florianduros. - -## 🐛 Bug Fixes - * Fix translucent `TextualEvent` on search results panel ([\#10810](https://github.com/matrix-org/matrix-react-sdk/pull/10810)). Fixes vector-im/element-web#25292. Contributed by @luixxiul. - * Matrix matrix scheme permalink constructor not stripping query params ([\#11060](https://github.com/matrix-org/matrix-react-sdk/pull/11060)). Fixes vector-im/element-web#25535. - * Fix: "manually verify by text" does nothing ([\#11059](https://github.com/matrix-org/matrix-react-sdk/pull/11059)). Fixes vector-im/element-web#25375. Contributed by @kerryarchibald. - * Make group calls respect the ICE fallback setting ([\#11047](https://github.com/matrix-org/matrix-react-sdk/pull/11047)). Fixes vector-im/voip-internal#65. - * Align list items on the tooltip to the start ([\#11041](https://github.com/matrix-org/matrix-react-sdk/pull/11041)). Fixes vector-im/element-web#25355. Contributed by @luixxiul. - * Clear thread panel event permalink when changing rooms ([\#11024](https://github.com/matrix-org/matrix-react-sdk/pull/11024)). Fixes vector-im/element-web#25484. - * Fix spinner placement on pinned widgets being reloaded ([\#10970](https://github.com/matrix-org/matrix-react-sdk/pull/10970)). Fixes vector-im/element-web#25431. Contributed by @luixxiul. - -Changes in [3.73.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.73.1) (2023-06-09) -===================================================================================================== - -## 🐛 Bug Fixes - * Bump matrix-js-sdk to v26.0.1. Fixes vector-im/element-web#25526 - -Changes in [3.73.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.73.0) (2023-06-06) -===================================================================================================== - -## ✨ Features - * When joining room in sub-space join the parents too ([\#11011](https://github.com/matrix-org/matrix-react-sdk/pull/11011)). - * Include thread replies in message previews ([\#10631](https://github.com/matrix-org/matrix-react-sdk/pull/10631)). Fixes vector-im/element-web#23920. - * Use semantic headings in space preferences ([\#11021](https://github.com/matrix-org/matrix-react-sdk/pull/11021)). Contributed by @kerryarchibald. - * Use semantic headings in user settings - Ignored users ([\#11006](https://github.com/matrix-org/matrix-react-sdk/pull/11006)). Contributed by @kerryarchibald. - * Use semantic headings in user settings - profile ([\#10973](https://github.com/matrix-org/matrix-react-sdk/pull/10973)). Fixes vector-im/element-web#25461. Contributed by @kerryarchibald. - * Use semantic headings in user settings - account ([\#10972](https://github.com/matrix-org/matrix-react-sdk/pull/10972)). Contributed by @kerryarchibald. - * Support `Insert from iPhone or iPad` in Safari ([\#10851](https://github.com/matrix-org/matrix-react-sdk/pull/10851)). Fixes vector-im/element-web#25327. Contributed by @SuperKenVery. - * Specify supportedStages for User Interactive Auth ([\#10975](https://github.com/matrix-org/matrix-react-sdk/pull/10975)). Fixes vector-im/element-web#19605. - * Pass device id to widgets ([\#10209](https://github.com/matrix-org/matrix-react-sdk/pull/10209)). Contributed by @Fox32. - * Use semantic headings in user settings - discovery ([\#10838](https://github.com/matrix-org/matrix-react-sdk/pull/10838)). Contributed by @kerryarchibald. - * Use semantic headings in user settings - Notifications ([\#10948](https://github.com/matrix-org/matrix-react-sdk/pull/10948)). Contributed by @kerryarchibald. - * Use semantic headings in user settings - spellcheck and language ([\#10959](https://github.com/matrix-org/matrix-react-sdk/pull/10959)). Contributed by @kerryarchibald. - * Use semantic headings in user settings Appearance ([\#10827](https://github.com/matrix-org/matrix-react-sdk/pull/10827)). Contributed by @kerryarchibald. - * Use semantic heading in user settings Sidebar & Voip ([\#10782](https://github.com/matrix-org/matrix-react-sdk/pull/10782)). Contributed by @kerryarchibald. - * Use semantic headings in user settings Security ([\#10774](https://github.com/matrix-org/matrix-react-sdk/pull/10774)). Contributed by @kerryarchibald. - * Use semantic headings in user settings - integrations and account deletion ([\#10837](https://github.com/matrix-org/matrix-react-sdk/pull/10837)). Fixes vector-im/element-web#25378. Contributed by @kerryarchibald. - * Use semantic headings in user settings Preferences ([\#10794](https://github.com/matrix-org/matrix-react-sdk/pull/10794)). Contributed by @kerryarchibald. - * Use semantic headings in user settings Keyboard ([\#10793](https://github.com/matrix-org/matrix-react-sdk/pull/10793)). Contributed by @kerryarchibald. - * RTE plain text mentions as pills ([\#10852](https://github.com/matrix-org/matrix-react-sdk/pull/10852)). Contributed by @alunturner. - * Use semantic headings in user settings Labs ([\#10773](https://github.com/matrix-org/matrix-react-sdk/pull/10773)). Contributed by @kerryarchibald. - * Use semantic list elements for menu lists and tab lists ([\#10902](https://github.com/matrix-org/matrix-react-sdk/pull/10902)). Fixes vector-im/element-web#24928. - * Fix aria-required-children axe violation ([\#10900](https://github.com/matrix-org/matrix-react-sdk/pull/10900)). Fixes vector-im/element-web#25342. - * Enable pagination for overlay timelines ([\#10757](https://github.com/matrix-org/matrix-react-sdk/pull/10757)). Fixes vector-im/voip-internal#107. - * Add tooltip to disabled invite button due to lack of permissions ([\#10869](https://github.com/matrix-org/matrix-react-sdk/pull/10869)). Fixes vector-im/element-web#9824. - * Respect configured auth_header_logo_url for default Welcome page ([\#10870](https://github.com/matrix-org/matrix-react-sdk/pull/10870)). - * Specify lazy loading for avatars ([\#10866](https://github.com/matrix-org/matrix-react-sdk/pull/10866)). Fixes vector-im/element-web#1983. - * Room and user mentions for plain text editor ([\#10665](https://github.com/matrix-org/matrix-react-sdk/pull/10665)). Contributed by @alunturner. - * Add audible notifcation on broadcast error ([\#10654](https://github.com/matrix-org/matrix-react-sdk/pull/10654)). Fixes vector-im/element-web#25132. - * Fall back from server generated thumbnail to original image ([\#10853](https://github.com/matrix-org/matrix-react-sdk/pull/10853)). - * Use semantically correct elements for room sublist context menu ([\#10831](https://github.com/matrix-org/matrix-react-sdk/pull/10831)). Fixes vector-im/customer-retainer#46. - * Avoid calling prepareToEncrypt onKeyDown ([\#10828](https://github.com/matrix-org/matrix-react-sdk/pull/10828)). - * Allows search to recognize full room links ([\#8275](https://github.com/matrix-org/matrix-react-sdk/pull/8275)). Contributed by @bolu-tife. - * "Show rooms with unread messages first" should not be on by default for new users ([\#10820](https://github.com/matrix-org/matrix-react-sdk/pull/10820)). Fixes vector-im/element-web#25304. Contributed by @kerryarchibald. - * Fix emitter handler leak in ThreadView ([\#10803](https://github.com/matrix-org/matrix-react-sdk/pull/10803)). - * Add better error for email invites without identity server ([\#10739](https://github.com/matrix-org/matrix-react-sdk/pull/10739)). Fixes vector-im/element-web#16893. - * Move reaction message previews out of labs ([\#10601](https://github.com/matrix-org/matrix-react-sdk/pull/10601)). Fixes vector-im/element-web#25083. - * Sort muted rooms to the bottom of their section of the room list ([\#10592](https://github.com/matrix-org/matrix-react-sdk/pull/10592)). Fixes vector-im/element-web#25131. Contributed by @kerryarchibald. - * Use semantic headings in user settings Help & About ([\#10752](https://github.com/matrix-org/matrix-react-sdk/pull/10752)). Contributed by @kerryarchibald. - * use ExternalLink components for external links ([\#10758](https://github.com/matrix-org/matrix-react-sdk/pull/10758)). Contributed by @kerryarchibald. - * Use semantic headings in space settings ([\#10751](https://github.com/matrix-org/matrix-react-sdk/pull/10751)). Contributed by @kerryarchibald. - * Use semantic headings for room settings content ([\#10734](https://github.com/matrix-org/matrix-react-sdk/pull/10734)). Contributed by @kerryarchibald. - -## 🐛 Bug Fixes - * Use consistent fonts for Japanese text ([\#10980](https://github.com/matrix-org/matrix-react-sdk/pull/10980)). Fixes vector-im/element-web#22333 and vector-im/element-web#23899. - * Fix: server picker validates unselected option ([\#11020](https://github.com/matrix-org/matrix-react-sdk/pull/11020)). Fixes vector-im/element-web#25488. Contributed by @kerryarchibald. - * Fix room list notification badges going missing in compact layout ([\#11022](https://github.com/matrix-org/matrix-react-sdk/pull/11022)). Fixes vector-im/element-web#25372. - * Fix call to `startSingleSignOn` passing enum in place of idpId ([\#10998](https://github.com/matrix-org/matrix-react-sdk/pull/10998)). Fixes vector-im/element-web#24953. - * Remove hover effect from user name on a DM creation UI ([\#10887](https://github.com/matrix-org/matrix-react-sdk/pull/10887)). Fixes vector-im/element-web#25305. Contributed by @luixxiul. - * Fix layout regression in public space invite dialog ([\#11009](https://github.com/matrix-org/matrix-react-sdk/pull/11009)). Fixes vector-im/element-web#25458. - * Fix layout regression in session dropdown ([\#10999](https://github.com/matrix-org/matrix-react-sdk/pull/10999)). Fixes vector-im/element-web#25448. - * Fix spacing regression in user settings - roles & permissions ([\#10993](https://github.com/matrix-org/matrix-react-sdk/pull/10993)). Fixes vector-im/element-web#25447 and vector-im/element-web#25451. Contributed by @kerryarchibald. - * Fall back to receipt timestamp if we have no event (react-sdk part) ([\#10974](https://github.com/matrix-org/matrix-react-sdk/pull/10974)). Fixes vector-im/element-web#10954. Contributed by @andybalaam. - * Fix: Room header 'view your device list' does not link to new session manager ([\#10979](https://github.com/matrix-org/matrix-react-sdk/pull/10979)). Fixes vector-im/element-web#25440. Contributed by @kerryarchibald. - * Fix display of devices without encryption support in Settings dialog ([\#10977](https://github.com/matrix-org/matrix-react-sdk/pull/10977)). Fixes vector-im/element-web#25413. - * Use aria descriptions instead of labels for TextWithTooltip ([\#10952](https://github.com/matrix-org/matrix-react-sdk/pull/10952)). Fixes vector-im/element-web#25398. - * Use grapheme-splitter instead of lodash for saving emoji from being ripped apart ([\#10976](https://github.com/matrix-org/matrix-react-sdk/pull/10976)). Fixes vector-im/element-web#22196. - * Fix: content overflow in settings subsection ([\#10960](https://github.com/matrix-org/matrix-react-sdk/pull/10960)). Fixes vector-im/element-web#25416. Contributed by @kerryarchibald. - * Make `Privacy Notice` external link on integration manager ToS clickable ([\#10914](https://github.com/matrix-org/matrix-react-sdk/pull/10914)). Fixes vector-im/element-web#25384. Contributed by @luixxiul. - * Ensure that open message context menus are updated when the event is sent ([\#10950](https://github.com/matrix-org/matrix-react-sdk/pull/10950)). - * Ensure that open sticker picker dialogs are updated when the widget configuration is updated. ([\#10945](https://github.com/matrix-org/matrix-react-sdk/pull/10945)). - * Fix big emoji in replies ([\#10932](https://github.com/matrix-org/matrix-react-sdk/pull/10932)). Fixes vector-im/element-web#24798. - * Hide empty `MessageActionBar` on message edit history dialog ([\#10447](https://github.com/matrix-org/matrix-react-sdk/pull/10447)). Fixes vector-im/element-web#24903. Contributed by @luixxiul. - * Fix roving tab index getting confused after dragging space order ([\#10901](https://github.com/matrix-org/matrix-react-sdk/pull/10901)). - * Ignore edits in message previews when they concern messages other than latest ([\#10868](https://github.com/matrix-org/matrix-react-sdk/pull/10868)). Fixes vector-im/element-web#14872. - * Send correct receipts when viewing a room ([\#10864](https://github.com/matrix-org/matrix-react-sdk/pull/10864)). Fixes vector-im/element-web#25196. - * Fix timeline search bar being overlapped by the right panel ([\#10809](https://github.com/matrix-org/matrix-react-sdk/pull/10809)). Fixes vector-im/element-web#25291. Contributed by @luixxiul. - * Fix the state shown for call in rooms ([\#10833](https://github.com/matrix-org/matrix-react-sdk/pull/10833)). - * Add string for membership event where both displayname & avatar change ([\#10880](https://github.com/matrix-org/matrix-react-sdk/pull/10880)). Fixes vector-im/element-web#18026. - * Fix people space notification badge not updating for new DM invites ([\#10849](https://github.com/matrix-org/matrix-react-sdk/pull/10849)). Fixes vector-im/element-web#23248. - * Fix regression in emoji picker order mangling after clearing filter ([\#10854](https://github.com/matrix-org/matrix-react-sdk/pull/10854)). Fixes vector-im/element-web#25323. - * Fix: Edit history modal crash ([\#10834](https://github.com/matrix-org/matrix-react-sdk/pull/10834)). Fixes vector-im/element-web#25309. Contributed by @kerryarchibald. - * Fix long room address and name not being clipped on room info card and update `_RoomSummaryCard.pcss` ([\#10811](https://github.com/matrix-org/matrix-react-sdk/pull/10811)). Fixes vector-im/element-web#25293. Contributed by @luixxiul. - * Treat thumbnail upload failures as complete upload failures ([\#10829](https://github.com/matrix-org/matrix-react-sdk/pull/10829)). Fixes vector-im/element-web#7069. - * Update finite automata to match user identifiers as per spec ([\#10798](https://github.com/matrix-org/matrix-react-sdk/pull/10798)). Fixes vector-im/element-web#25246. - * Fix icon on empty notification panel ([\#10817](https://github.com/matrix-org/matrix-react-sdk/pull/10817)). Fixes vector-im/element-web#25298 and vector-im/element-web#25302. Contributed by @luixxiul. - * Fix: Threads button is highlighted when I create a new room ([\#10819](https://github.com/matrix-org/matrix-react-sdk/pull/10819)). Fixes vector-im/element-web#25284. Contributed by @kerryarchibald. - * Fix the top heading of notification panel ([\#10818](https://github.com/matrix-org/matrix-react-sdk/pull/10818)). Fixes vector-im/element-web#25303. Contributed by @luixxiul. - * Fix the color of the verified E2EE icon on `RoomSummaryCard` ([\#10812](https://github.com/matrix-org/matrix-react-sdk/pull/10812)). Fixes vector-im/element-web#25295. Contributed by @luixxiul. - * Fix: No feedback when waiting for the server on a /delete_devices request with SSO ([\#10795](https://github.com/matrix-org/matrix-react-sdk/pull/10795)). Fixes vector-im/element-web#23096. Contributed by @kerryarchibald. - * Fix: reveal images when image previews are disabled ([\#10781](https://github.com/matrix-org/matrix-react-sdk/pull/10781)). Fixes vector-im/element-web#25271. Contributed by @kerryarchibald. - * Fix accessibility issues around the room list and space panel ([\#10717](https://github.com/matrix-org/matrix-react-sdk/pull/10717)). Fixes vector-im/element-web#13345. - * Ensure tooltip contents is linked via aria to the target element ([\#10729](https://github.com/matrix-org/matrix-react-sdk/pull/10729)). Fixes vector-im/customer-retainer#43. - -Changes in [3.72.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.72.0) (2023-05-10) -===================================================================================================== - -## ✨ Features - * Add UIFeature.locationSharing to hide location sharing ([\#10727](https://github.com/matrix-org/matrix-react-sdk/pull/10727)). - * Memoize field validation results ([\#10714](https://github.com/matrix-org/matrix-react-sdk/pull/10714)). - * Commands for plain text editor ([\#10567](https://github.com/matrix-org/matrix-react-sdk/pull/10567)). Contributed by @alunturner. - * Allow 16 lines of text in the rich text editors ([\#10670](https://github.com/matrix-org/matrix-react-sdk/pull/10670)). Contributed by @alunturner. - * Bail out of `RoomSettingsDialog` when room is not found ([\#10662](https://github.com/matrix-org/matrix-react-sdk/pull/10662)). Contributed by @kerryarchibald. - * Element-R: Populate device list for right-panel ([\#10671](https://github.com/matrix-org/matrix-react-sdk/pull/10671)). Contributed by @florianduros. - * Make existing and new issue URLs configurable ([\#10710](https://github.com/matrix-org/matrix-react-sdk/pull/10710)). Fixes vector-im/element-web#24424. - * Fix usages of ARIA tabpanel ([\#10628](https://github.com/matrix-org/matrix-react-sdk/pull/10628)). Fixes vector-im/element-web#25016. - * Element-R: Starting a DMs with a user ([\#10673](https://github.com/matrix-org/matrix-react-sdk/pull/10673)). Contributed by @florianduros. - * ARIA Accessibility improvements ([\#10675](https://github.com/matrix-org/matrix-react-sdk/pull/10675)). - * ARIA Accessibility improvements ([\#10674](https://github.com/matrix-org/matrix-react-sdk/pull/10674)). - * Add arrow key controls to emoji and reaction pickers ([\#10637](https://github.com/matrix-org/matrix-react-sdk/pull/10637)). Fixes vector-im/element-web#17189. - * Translate credits in help about section ([\#10676](https://github.com/matrix-org/matrix-react-sdk/pull/10676)). - -## 🐛 Bug Fixes - * Fix: reveal images when image previews are disabled ([\#10781](https://github.com/matrix-org/matrix-react-sdk/pull/10781)). Fixes vector-im/element-web#25271. Contributed by @kerryarchibald. - * Fix autocomplete not resetting properly on message send ([\#10741](https://github.com/matrix-org/matrix-react-sdk/pull/10741)). Fixes vector-im/element-web#25170. - * Fix start_sso not working with guests disabled ([\#10720](https://github.com/matrix-org/matrix-react-sdk/pull/10720)). Fixes vector-im/element-web#16624. - * Fix soft crash with Element call widgets ([\#10684](https://github.com/matrix-org/matrix-react-sdk/pull/10684)). - * Send correct receipt when marking a room as read ([\#10730](https://github.com/matrix-org/matrix-react-sdk/pull/10730)). Fixes vector-im/element-web#25207. - * Offload some more waveform processing onto a worker ([\#9223](https://github.com/matrix-org/matrix-react-sdk/pull/9223)). Fixes vector-im/element-web#19756. - * Consolidate login errors ([\#10722](https://github.com/matrix-org/matrix-react-sdk/pull/10722)). Fixes vector-im/element-web#17520. - * Fix all rooms search generating permalinks to wrong room id ([\#10625](https://github.com/matrix-org/matrix-react-sdk/pull/10625)). Fixes vector-im/element-web#25115. - * Posthog properly handle Analytics ID changing from under us ([\#10702](https://github.com/matrix-org/matrix-react-sdk/pull/10702)). Fixes vector-im/element-web#25187. - * Fix Clock being read as an absolute time rather than duration ([\#10706](https://github.com/matrix-org/matrix-react-sdk/pull/10706)). Fixes vector-im/element-web#22582. - * Properly translate errors in `ChangePassword.tsx` so they show up translated to the user but not in our logs ([\#10615](https://github.com/matrix-org/matrix-react-sdk/pull/10615)). Fixes vector-im/element-web#9597. Contributed by @MadLittleMods. - * Honour feature toggles in guest mode ([\#10651](https://github.com/matrix-org/matrix-react-sdk/pull/10651)). Fixes vector-im/element-web#24513. Contributed by @andybalaam. - * Fix default content in devtools event sender ([\#10699](https://github.com/matrix-org/matrix-react-sdk/pull/10699)). Contributed by @tulir. - * Fix a crash when a call ends while you're in it ([\#10681](https://github.com/matrix-org/matrix-react-sdk/pull/10681)). Fixes vector-im/element-web#25153. - * Fix lack of screen reader indication when triggering auto complete ([\#10664](https://github.com/matrix-org/matrix-react-sdk/pull/10664)). Fixes vector-im/element-web#11011. - * Fix typing tile duplicating users ([\#10678](https://github.com/matrix-org/matrix-react-sdk/pull/10678)). Fixes vector-im/element-web#25165. - * Fix wrong room topic tooltip position ([\#10667](https://github.com/matrix-org/matrix-react-sdk/pull/10667)). Fixes vector-im/element-web#25158. - * Fix create subspace dialog not working ([\#10652](https://github.com/matrix-org/matrix-react-sdk/pull/10652)). Fixes vector-im/element-web#24882. - -Changes in [3.71.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.71.1) (2023-04-25) -===================================================================================================== - -## 🐛 Bug Fixes - * Pick up matrix-js-sdk v25.0.0 (missed because of npmjs partial outage) - -Changes in [3.71.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.71.0) (2023-04-25) -===================================================================================================== - -## 🔒 Security - * Fixes for [CVE-2023-30609](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-30609) / GHSA-xv83-x443-7rmw - -## ✨ Features - * Pick sensible default option for phone country dropdown ([\#10627](https://github.com/matrix-org/matrix-react-sdk/pull/10627)). Fixes vector-im/element-web#3528. - * Relate field validation tooltip via aria-describedby ([\#10522](https://github.com/matrix-org/matrix-react-sdk/pull/10522)). Fixes vector-im/element-web#24963. - * Handle more completion types in rte autocomplete ([\#10560](https://github.com/matrix-org/matrix-react-sdk/pull/10560)). Contributed by @alunturner. - * Show a tile for an unloaded predecessor room if it has via_servers ([\#10483](https://github.com/matrix-org/matrix-react-sdk/pull/10483)). Contributed by @andybalaam. - * Exclude message timestamps from aria live region ([\#10584](https://github.com/matrix-org/matrix-react-sdk/pull/10584)). Fixes vector-im/element-web#5696. - * Make composer format bar an aria toolbar ([\#10583](https://github.com/matrix-org/matrix-react-sdk/pull/10583)). Fixes vector-im/element-web#11283. - * Improve accessibility of font slider ([\#10473](https://github.com/matrix-org/matrix-react-sdk/pull/10473)). Fixes vector-im/element-web#20168 and vector-im/element-web#24962. - * fix file size display from kB to KB ([\#10561](https://github.com/matrix-org/matrix-react-sdk/pull/10561)). Fixes vector-im/element-web#24866. Contributed by @NSV1991. - * Handle /me in rte ([\#10558](https://github.com/matrix-org/matrix-react-sdk/pull/10558)). Contributed by @alunturner. - * bind html with switch for manage extension setting option ([\#10553](https://github.com/matrix-org/matrix-react-sdk/pull/10553)). Contributed by @NSV1991. - * Handle command completions in RTE ([\#10521](https://github.com/matrix-org/matrix-react-sdk/pull/10521)). Contributed by @alunturner. - * Add room and user avatars to rte ([\#10497](https://github.com/matrix-org/matrix-react-sdk/pull/10497)). Contributed by @alunturner. - * Support for MSC3882 revision 1 ([\#10443](https://github.com/matrix-org/matrix-react-sdk/pull/10443)). Contributed by @hughns. - * Check profiles before starting a DM ([\#10472](https://github.com/matrix-org/matrix-react-sdk/pull/10472)). Fixes vector-im/element-web#24830. - * Quick settings: Change the copy / labels on the options ([\#10427](https://github.com/matrix-org/matrix-react-sdk/pull/10427)). Fixes vector-im/element-web#24522. Contributed by @justjanne. - * Update rte autocomplete styling ([\#10503](https://github.com/matrix-org/matrix-react-sdk/pull/10503)). Contributed by @alunturner. - -## 🐛 Bug Fixes - * Fix create subspace dialog not working ([\#10652](https://github.com/matrix-org/matrix-react-sdk/pull/10652)). Fixes vector-im/element-web#24882 - * Fix multiple accessibility defects identified by AXE ([\#10606](https://github.com/matrix-org/matrix-react-sdk/pull/10606)). - * Fix view source from edit history dialog always showing latest event ([\#10626](https://github.com/matrix-org/matrix-react-sdk/pull/10626)). Fixes vector-im/element-web#21859. - * #21451 Fix WebGL disabled error message ([\#10589](https://github.com/matrix-org/matrix-react-sdk/pull/10589)). Contributed by @rashmitpankhania. - * Properly translate errors in `AddThreepid.ts` so they show up translated to the user but not in our logs ([\#10432](https://github.com/matrix-org/matrix-react-sdk/pull/10432)). Contributed by @MadLittleMods. - * Fix overflow on auth pages ([\#10605](https://github.com/matrix-org/matrix-react-sdk/pull/10605)). Fixes vector-im/element-web#19548. - * Fix incorrect avatar background colour when using a custom theme ([\#10598](https://github.com/matrix-org/matrix-react-sdk/pull/10598)). Contributed by @jdauphant. - * Remove dependency on `org.matrix.e2e_cross_signing` unstable feature ([\#10593](https://github.com/matrix-org/matrix-react-sdk/pull/10593)). - * Update setting description to match reality ([\#10600](https://github.com/matrix-org/matrix-react-sdk/pull/10600)). Fixes vector-im/element-web#25106. - * Fix no identity server in help & about settings ([\#10563](https://github.com/matrix-org/matrix-react-sdk/pull/10563)). Fixes vector-im/element-web#25077. - * Fix: Images no longer reserve their space in the timeline correctly ([\#10571](https://github.com/matrix-org/matrix-react-sdk/pull/10571)). Fixes vector-im/element-web#25082. Contributed by @kerryarchibald. - * Fix issues with inhibited accessible focus outlines ([\#10579](https://github.com/matrix-org/matrix-react-sdk/pull/10579)). Fixes vector-im/element-web#19742. - * Fix read receipts falling from sky ([\#10576](https://github.com/matrix-org/matrix-react-sdk/pull/10576)). Fixes vector-im/element-web#25081. - * Fix avatar text issue in rte ([\#10559](https://github.com/matrix-org/matrix-react-sdk/pull/10559)). Contributed by @alunturner. - * fix resizer only work with left mouse click ([\#10546](https://github.com/matrix-org/matrix-react-sdk/pull/10546)). Contributed by @NSV1991. - * Fix send two join requests when joining a room from spotlight search ([\#10534](https://github.com/matrix-org/matrix-react-sdk/pull/10534)). Fixes vector-im/element-web#25054. - * Highlight event when any version triggered a highlight ([\#10502](https://github.com/matrix-org/matrix-react-sdk/pull/10502)). Fixes vector-im/element-web#24923 and vector-im/element-web#24970. Contributed by @kerryarchibald. - * Fix spacing of headings of integration manager on General settings tab ([\#10232](https://github.com/matrix-org/matrix-react-sdk/pull/10232)). Fixes vector-im/element-web#24085. Contributed by @luixxiul. - -Changes in [3.70.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.70.0) (2023-04-11) -===================================================================================================== - -## ✨ Features - * Style mentions as pills in rich text editor ([\#10448](https://github.com/matrix-org/matrix-react-sdk/pull/10448)). Contributed by @alunturner. - * Show room create icon if "UIComponent.roomCreation" is enabled ([\#10364](https://github.com/matrix-org/matrix-react-sdk/pull/10364)). Contributed by @maheichyk. - * Mentions as links rte ([\#10463](https://github.com/matrix-org/matrix-react-sdk/pull/10463)). Contributed by @alunturner. - * Better error handling in jump to date ([\#10405](https://github.com/matrix-org/matrix-react-sdk/pull/10405)). Contributed by @MadLittleMods. - * Show "Invite" menu option if "UIComponent.sendInvites" is enabled. ([\#10363](https://github.com/matrix-org/matrix-react-sdk/pull/10363)). Contributed by @maheichyk. - * Added `UserProfilesStore`, `LruCache` and user permalink profile caching ([\#10425](https://github.com/matrix-org/matrix-react-sdk/pull/10425)). Fixes vector-im/element-web#10559. - * Mentions as links rte ([\#10422](https://github.com/matrix-org/matrix-react-sdk/pull/10422)). Contributed by @alunturner. - * Implement MSC3952: intentional mentions ([\#9983](https://github.com/matrix-org/matrix-react-sdk/pull/9983)). - * Implement MSC3973: Search users in the user directory with the Widget API ([\#10269](https://github.com/matrix-org/matrix-react-sdk/pull/10269)). Contributed by @dhenneke. - * Permalinks to message are now displayed as pills ([\#10392](https://github.com/matrix-org/matrix-react-sdk/pull/10392)). Fixes vector-im/element-web#24751 and vector-im/element-web#24706. - * Show search,dial,explore in filterContainer if "UIComponent.filterContainer" is enabled ([\#10381](https://github.com/matrix-org/matrix-react-sdk/pull/10381)). Contributed by @maheichyk. - * Increase space panel collapse clickable area ([\#6084](https://github.com/matrix-org/matrix-react-sdk/pull/6084)). Fixes vector-im/element-web#17379. Contributed by @jaiwanth-v. - * Add fallback for replies to Polls ([\#10380](https://github.com/matrix-org/matrix-react-sdk/pull/10380)). Fixes vector-im/element-web#24197. Contributed by @kerryarchibald. - * Permalinks to rooms and users are now pillified ([\#10388](https://github.com/matrix-org/matrix-react-sdk/pull/10388)). Fixes vector-im/element-web#24825. - * Poll history - access poll history from room settings ([\#10356](https://github.com/matrix-org/matrix-react-sdk/pull/10356)). Contributed by @kerryarchibald. - * Add API params to mute audio and/or video in Jitsi calls by default ([\#10376](https://github.com/matrix-org/matrix-react-sdk/pull/10376)). Contributed by @dhenneke. - * Notifications: inline error message on notifications saving error ([\#10288](https://github.com/matrix-org/matrix-react-sdk/pull/10288)). Contributed by @kerryarchibald. - * Support dynamic room predecessor in SpaceProvider ([\#10348](https://github.com/matrix-org/matrix-react-sdk/pull/10348)). Contributed by @andybalaam. - * Support dynamic room predecessors for RoomProvider ([\#10346](https://github.com/matrix-org/matrix-react-sdk/pull/10346)). Contributed by @andybalaam. - * Support dynamic room predecessors in OwnBeaconStore ([\#10339](https://github.com/matrix-org/matrix-react-sdk/pull/10339)). Contributed by @andybalaam. - * Support dynamic room predecessors in ForwardDialog ([\#10344](https://github.com/matrix-org/matrix-react-sdk/pull/10344)). Contributed by @andybalaam. - * Support dynamic room predecessors in SpaceHierarchy ([\#10341](https://github.com/matrix-org/matrix-react-sdk/pull/10341)). Contributed by @andybalaam. - * Support dynamic room predecessors in AddExistingToSpaceDialog ([\#10342](https://github.com/matrix-org/matrix-react-sdk/pull/10342)). Contributed by @andybalaam. - * Support dynamic room predecessors in leave-behaviour ([\#10340](https://github.com/matrix-org/matrix-react-sdk/pull/10340)). Contributed by @andybalaam. - * Support dynamic room predecessors in StopGapWidgetDriver ([\#10338](https://github.com/matrix-org/matrix-react-sdk/pull/10338)). Contributed by @andybalaam. - * Support dynamic room predecessors in WidgetLayoutStore ([\#10326](https://github.com/matrix-org/matrix-react-sdk/pull/10326)). Contributed by @andybalaam. - * Support dynamic room predecessors in SpaceStore ([\#10332](https://github.com/matrix-org/matrix-react-sdk/pull/10332)). Contributed by @andybalaam. - * Sync polls push rules on changes to account_data ([\#10287](https://github.com/matrix-org/matrix-react-sdk/pull/10287)). Contributed by @kerryarchibald. - * Support dynamic room predecessors in BreadcrumbsStore ([\#10295](https://github.com/matrix-org/matrix-react-sdk/pull/10295)). Contributed by @andybalaam. - * Improved a11y for Field feedback and Secure Phrase input ([\#10320](https://github.com/matrix-org/matrix-react-sdk/pull/10320)). Contributed by @Sebbones. - * Support dynamic room predecessors in RoomNotificationStateStore ([\#10297](https://github.com/matrix-org/matrix-react-sdk/pull/10297)). Contributed by @andybalaam. - -## 🐛 Bug Fixes - * Allow editing with RTE to overflow for autocomplete visibility ([\#10499](https://github.com/matrix-org/matrix-react-sdk/pull/10499)). Contributed by @alunturner. - * Added auto focus to Github URL on opening of debug logs modal ([\#10479](https://github.com/matrix-org/matrix-react-sdk/pull/10479)). Contributed by @ShivamSpm. - * Fix detection of encryption for all users in a room ([\#10487](https://github.com/matrix-org/matrix-react-sdk/pull/10487)). Fixes vector-im/element-web#24995. - * Properly generate mentions when editing a reply with MSC3952 ([\#10486](https://github.com/matrix-org/matrix-react-sdk/pull/10486)). Fixes vector-im/element-web#24924. Contributed by @kerryarchibald. - * Improve performance of rendering a room with many hidden events ([\#10131](https://github.com/matrix-org/matrix-react-sdk/pull/10131)). Contributed by @andybalaam. - * Prevent future date selection in jump to date ([\#10419](https://github.com/matrix-org/matrix-react-sdk/pull/10419)). Fixes vector-im/element-web#20800. Contributed by @MadLittleMods. - * Add aria labels to message search bar to improve accessibility ([\#10476](https://github.com/matrix-org/matrix-react-sdk/pull/10476)). Fixes vector-im/element-web#24921. - * Fix decryption failure bar covering the timeline ([\#10360](https://github.com/matrix-org/matrix-react-sdk/pull/10360)). Fixes vector-im/element-web#24780 vector-im/element-web#24074 and vector-im/element-web#24183. Contributed by @luixxiul. - * Improve profile picture settings accessibility ([\#10470](https://github.com/matrix-org/matrix-react-sdk/pull/10470)). Fixes vector-im/element-web#24919. - * Handle group call redaction ([\#10465](https://github.com/matrix-org/matrix-react-sdk/pull/10465)). - * Display relative timestamp for threads on the same calendar day ([\#10399](https://github.com/matrix-org/matrix-react-sdk/pull/10399)). Fixes vector-im/element-web#24841. Contributed by @kerryarchibald. - * Fix timeline list and paragraph display issues ([\#10424](https://github.com/matrix-org/matrix-react-sdk/pull/10424)). Fixes vector-im/element-web#24602. Contributed by @alunturner. - * Use unique keys for voice broadcast pips ([\#10457](https://github.com/matrix-org/matrix-react-sdk/pull/10457)). Fixes vector-im/element-web#24959. - * Fix "show read receipts sent by other users" not applying to threads ([\#10445](https://github.com/matrix-org/matrix-react-sdk/pull/10445)). Fixes vector-im/element-web#24910. - * Fix joining public rooms without aliases in search dialog ([\#10437](https://github.com/matrix-org/matrix-react-sdk/pull/10437)). Fixes vector-im/element-web#23937. - * Add input validation for `m.direct` in `DMRoomMap` ([\#10436](https://github.com/matrix-org/matrix-react-sdk/pull/10436)). Fixes vector-im/element-web#24909. - * Reduce height reserved for "collapse" button's line on IRC layout ([\#10211](https://github.com/matrix-org/matrix-react-sdk/pull/10211)). Fixes vector-im/element-web#24605. Contributed by @luixxiul. - * Fix `creatorUserId is required` error when opening sticker picker ([\#10423](https://github.com/matrix-org/matrix-react-sdk/pull/10423)). - * Fix block/inline Element descendants error noise in `NewRoomIntro.tsx` ([\#10412](https://github.com/matrix-org/matrix-react-sdk/pull/10412)). Contributed by @MadLittleMods. - * Fix profile resizer to make first character of a line selectable in IRC layout ([\#10396](https://github.com/matrix-org/matrix-react-sdk/pull/10396)). Fixes vector-im/element-web#14764. Contributed by @luixxiul. - * Ensure space between wrapped lines of room name on IRC layout ([\#10188](https://github.com/matrix-org/matrix-react-sdk/pull/10188)). Fixes vector-im/element-web#24742. Contributed by @luixxiul. - * Remove unreadable alt attribute from the room status bar warning icon (nonsense to screenreaders) ([\#10402](https://github.com/matrix-org/matrix-react-sdk/pull/10402)). Contributed by @MadLittleMods. - * Fix big date separators when jump to date is enabled ([\#10404](https://github.com/matrix-org/matrix-react-sdk/pull/10404)). Fixes vector-im/element-web#22969. Contributed by @MadLittleMods. - * Fixes user authentication when registering via the module API ([\#10257](https://github.com/matrix-org/matrix-react-sdk/pull/10257)). Contributed by @maheichyk. - * Handle more edge cases in Space Hierarchy ([\#10280](https://github.com/matrix-org/matrix-react-sdk/pull/10280)). Contributed by @justjanne. - * Further improve performance with lots of hidden events ([\#10353](https://github.com/matrix-org/matrix-react-sdk/pull/10353)). Fixes vector-im/element-web#24480. Contributed by @andybalaam. - * Respect user cancelling upload flow by dismissing spinner ([\#10373](https://github.com/matrix-org/matrix-react-sdk/pull/10373)). Fixes vector-im/element-web#24667. - * When starting a DM, the end-to-end encryption status icon does now only appear if the DM can be encrypted ([\#10394](https://github.com/matrix-org/matrix-react-sdk/pull/10394)). Fixes vector-im/element-web#24397. - * Fix `[object Object]` in feedback metadata ([\#10390](https://github.com/matrix-org/matrix-react-sdk/pull/10390)). - * Fix pinned messages card saying nothing pinned while loading ([\#10385](https://github.com/matrix-org/matrix-react-sdk/pull/10385)). Fixes vector-im/element-web#24615. - * Fix import e2e key dialog staying disabled after paste ([\#10375](https://github.com/matrix-org/matrix-react-sdk/pull/10375)). Fixes vector-im/element-web#24818. - * Show all labs even if incompatible, with appropriate tooltip explaining requirements ([\#10369](https://github.com/matrix-org/matrix-react-sdk/pull/10369)). Fixes vector-im/element-web#24813. - * Fix UIFeature.Registration not applying to all paths ([\#10371](https://github.com/matrix-org/matrix-react-sdk/pull/10371)). Fixes vector-im/element-web#24814. - * Clicking on a user pill does now only open the profile in the right panel and no longer navigates to the home view. ([\#10359](https://github.com/matrix-org/matrix-react-sdk/pull/10359)). Fixes vector-im/element-web#24797. - * Fix start DM with pending third party invite ([\#10347](https://github.com/matrix-org/matrix-react-sdk/pull/10347)). Fixes vector-im/element-web#24781. - * Fix long display name overflowing reply tile on IRC layout ([\#10343](https://github.com/matrix-org/matrix-react-sdk/pull/10343)). Fixes vector-im/element-web#24738. Contributed by @luixxiul. - * Display redacted body on ThreadView in the same way as normal messages ([\#9016](https://github.com/matrix-org/matrix-react-sdk/pull/9016)). Fixes vector-im/element-web#24729. Contributed by @luixxiul. - * Handle more edge cases in ACL updates ([\#10279](https://github.com/matrix-org/matrix-react-sdk/pull/10279)). Contributed by @justjanne. - * Allow parsing png files to fail if thumbnailing is successful ([\#10308](https://github.com/matrix-org/matrix-react-sdk/pull/10308)). - -Changes in [3.69.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.69.1) (2023-03-31) -===================================================================================================== - -## 🐛 Bug Fixes - * Fix detection of encryption for all users in a room ([\#10487](https://github.com/matrix-org/matrix-react-sdk/pull/10487)). Fixes vector-im/element-web#24995. - -Changes in [3.69.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.69.0) (2023-03-28) -===================================================================================================== - -## 🔒 Security - * Fixes for [CVE-2023-28427](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-28427) / GHSA-mwq8-fjpf-c2gr - * Fixes for [CVE-2023-28103](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-28103) / GHSA-6g43-88cp-w5gv - -Changes in [3.68.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.68.0) (2023-03-15) -===================================================================================================== - -## ✨ Features - * Only allow to start a DM with one email if encryption by default is enabled ([\#10253](https://github.com/matrix-org/matrix-react-sdk/pull/10253)). Fixes vector-im/element-web#23133. - * DM rooms are now encrypted if encryption by default is enabled and only inviting a single email address. Any action in the result DM room will be blocked until the other has joined. ([\#10229](https://github.com/matrix-org/matrix-react-sdk/pull/10229)). - * Reduce bottom margin of ReplyChain on compact modern layout ([\#8972](https://github.com/matrix-org/matrix-react-sdk/pull/8972)). Fixes vector-im/element-web#22748. Contributed by @luixxiul. - * Support for v2 of MSC3903 ([\#10165](https://github.com/matrix-org/matrix-react-sdk/pull/10165)). Contributed by @hughns. - * When starting a DM, existing rooms with pending third-party invites will be reused. ([\#10256](https://github.com/matrix-org/matrix-react-sdk/pull/10256)). Fixes vector-im/element-web#23139. - * Polls push rules: synchronise poll rules with message rules ([\#10263](https://github.com/matrix-org/matrix-react-sdk/pull/10263)). Contributed by @kerryarchibald. - * New verification request toast button labels ([\#10259](https://github.com/matrix-org/matrix-react-sdk/pull/10259)). - * Remove padding around integration manager iframe ([\#10148](https://github.com/matrix-org/matrix-react-sdk/pull/10148)). - * Fix block code styling in rich text editor ([\#10246](https://github.com/matrix-org/matrix-react-sdk/pull/10246)). Contributed by @alunturner. - * Poll history: fetch more poll history ([\#10235](https://github.com/matrix-org/matrix-react-sdk/pull/10235)). Contributed by @kerryarchibald. - * Sort short/exact emoji matches before longer incomplete matches ([\#10212](https://github.com/matrix-org/matrix-react-sdk/pull/10212)). Fixes vector-im/element-web#23210. Contributed by @grimhilt. - * Poll history: detail screen ([\#10172](https://github.com/matrix-org/matrix-react-sdk/pull/10172)). Contributed by @kerryarchibald. - * Provide a more detailed error message than "No known servers" ([\#6048](https://github.com/matrix-org/matrix-react-sdk/pull/6048)). Fixes vector-im/element-web#13247. Contributed by @aaronraimist. - * Say when a call was answered from a different device ([\#10224](https://github.com/matrix-org/matrix-react-sdk/pull/10224)). - * Widget permissions customizations using module api ([\#10121](https://github.com/matrix-org/matrix-react-sdk/pull/10121)). Contributed by @maheichyk. - * Fix copy button icon overlapping with copyable text ([\#10227](https://github.com/matrix-org/matrix-react-sdk/pull/10227)). Contributed by @Adesh-Pandey. - * Support joining non-peekable rooms via the module API ([\#10154](https://github.com/matrix-org/matrix-react-sdk/pull/10154)). Contributed by @maheichyk. - * The "new login" toast does now display the same device information as in the settings. "No" does now open the device settings. "Yes, it was me" dismisses the toast. ([\#10200](https://github.com/matrix-org/matrix-react-sdk/pull/10200)). - * Do not prompt for a password when doing a „reset all“ after login ([\#10208](https://github.com/matrix-org/matrix-react-sdk/pull/10208)). - -## 🐛 Bug Fixes - * Fix incorrect copy in space creation flow ([\#10296](https://github.com/matrix-org/matrix-react-sdk/pull/10296)). Fixes vector-im/element-web#24741. - * Fix space settings dialog having rogue title tooltip ([\#10293](https://github.com/matrix-org/matrix-react-sdk/pull/10293)). Fixes vector-im/element-web#24740. - * Show spinner when starting a DM from the user profile (right panel) ([\#10290](https://github.com/matrix-org/matrix-react-sdk/pull/10290)). - * Reduce height of toggle on expanded view source event ([\#10283](https://github.com/matrix-org/matrix-react-sdk/pull/10283)). Fixes vector-im/element-web#22873. Contributed by @luixxiul. - * Pillify http and non-prefixed matrix.to links ([\#10277](https://github.com/matrix-org/matrix-react-sdk/pull/10277)). Fixes vector-im/element-web#20844. - * Fix some features not being configurable via `features` ([\#10276](https://github.com/matrix-org/matrix-react-sdk/pull/10276)). - * Fix starting a DM from the right panel in some cases ([\#10278](https://github.com/matrix-org/matrix-react-sdk/pull/10278)). Fixes vector-im/element-web#24722. - * Align info EventTile and normal EventTile on IRC layout ([\#10197](https://github.com/matrix-org/matrix-react-sdk/pull/10197)). Fixes vector-im/element-web#22782. Contributed by @luixxiul. - * Fix blowout of waveform of the voice message player on narrow UI ([\#8861](https://github.com/matrix-org/matrix-react-sdk/pull/8861)). Fixes vector-im/element-web#22604. Contributed by @luixxiul. - * Fix the hidden view source toggle on IRC layout ([\#10266](https://github.com/matrix-org/matrix-react-sdk/pull/10266)). Fixes vector-im/element-web#22872. Contributed by @luixxiul. - * Fix buttons on the room header being compressed due to long room name ([\#10155](https://github.com/matrix-org/matrix-react-sdk/pull/10155)). Contributed by @luixxiul. - * Use the room avatar as a placeholder in calls ([\#10231](https://github.com/matrix-org/matrix-react-sdk/pull/10231)). - * Fix calls showing as 'connecting' after hangup ([\#10223](https://github.com/matrix-org/matrix-react-sdk/pull/10223)). - * Prevent multiple Jitsi calls started at the same time ([\#10183](https://github.com/matrix-org/matrix-react-sdk/pull/10183)). Fixes vector-im/element-web#23009. - * Make localization keys compatible with agglutinative and/or SOV type languages ([\#10159](https://github.com/matrix-org/matrix-react-sdk/pull/10159)). Contributed by @luixxiul. - -Changes in [3.67.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.67.0) (2023-02-28) -===================================================================================================== - -## ✨ Features - * Display "The sender has blocked you from receiving this message" error message instead of "Unable to decrypt message" ([\#10202](https://github.com/matrix-org/matrix-react-sdk/pull/10202)). Contributed by @florianduros. - * Polls: show warning about undecryptable relations ([\#10179](https://github.com/matrix-org/matrix-react-sdk/pull/10179)). Contributed by @kerryarchibald. - * Poll history: fetch last 30 days of polls ([\#10157](https://github.com/matrix-org/matrix-react-sdk/pull/10157)). Contributed by @kerryarchibald. - * Poll history - ended polls list items ([\#10119](https://github.com/matrix-org/matrix-react-sdk/pull/10119)). Contributed by @kerryarchibald. - * Remove threads labs flag and the ability to disable threads ([\#9878](https://github.com/matrix-org/matrix-react-sdk/pull/9878)). Fixes vector-im/element-web#24365. - * Show a success dialog after setting up the key backup ([\#10177](https://github.com/matrix-org/matrix-react-sdk/pull/10177)). Fixes vector-im/element-web#24487. - * Release Sign in with QR out of labs ([\#10066](https://github.com/matrix-org/matrix-react-sdk/pull/10066)). Contributed by @hughns. - * Hide indent button in rte ([\#10149](https://github.com/matrix-org/matrix-react-sdk/pull/10149)). Contributed by @alunturner. - * Add option to find own location in map views ([\#10083](https://github.com/matrix-org/matrix-react-sdk/pull/10083)). - * Render poll end events in timeline ([\#10027](https://github.com/matrix-org/matrix-react-sdk/pull/10027)). Contributed by @kerryarchibald. - -## 🐛 Bug Fixes - * Stop access token overflowing the box ([\#10069](https://github.com/matrix-org/matrix-react-sdk/pull/10069)). Fixes vector-im/element-web#24023. Contributed by @sbjaj33. - * Add link to next file in the export ([\#10190](https://github.com/matrix-org/matrix-react-sdk/pull/10190)). Fixes vector-im/element-web#20272. Contributed by @grimhilt. - * Ended poll tiles: add ended the poll message ([\#10193](https://github.com/matrix-org/matrix-react-sdk/pull/10193)). Fixes vector-im/element-web#24579. Contributed by @kerryarchibald. - * Fix accidentally inverted condition for room ordering ([\#10178](https://github.com/matrix-org/matrix-react-sdk/pull/10178)). Fixes vector-im/element-web#24527. Contributed by @justjanne. - * Re-focus the composer on dialogue quit ([\#10007](https://github.com/matrix-org/matrix-react-sdk/pull/10007)). Fixes vector-im/element-web#22832. Contributed by @Ashu999. - * Try to resolve emails before creating a DM ([\#10164](https://github.com/matrix-org/matrix-react-sdk/pull/10164)). - * Disable poll response loading test ([\#10168](https://github.com/matrix-org/matrix-react-sdk/pull/10168)). Contributed by @justjanne. - * Fix email lookup in invite dialog ([\#10150](https://github.com/matrix-org/matrix-react-sdk/pull/10150)). Fixes vector-im/element-web#23353. - * Remove duplicate white space characters from translation keys ([\#10152](https://github.com/matrix-org/matrix-react-sdk/pull/10152)). Contributed by @luixxiul. - * Fix the caption of new sessions manager on Labs settings page for localization ([\#10143](https://github.com/matrix-org/matrix-react-sdk/pull/10143)). Contributed by @luixxiul. - * Prevent start another DM with a user if one already exists ([\#10127](https://github.com/matrix-org/matrix-react-sdk/pull/10127)). Fixes vector-im/element-web#23138. - * Remove white space characters before the horizontal ellipsis ([\#10130](https://github.com/matrix-org/matrix-react-sdk/pull/10130)). Contributed by @luixxiul. - * Fix Selectable Text on 'Delete All' and 'Retry All' Buttons ([\#10128](https://github.com/matrix-org/matrix-react-sdk/pull/10128)). Fixes vector-im/element-web#23232. Contributed by @akshattchhabra. - * Correctly Identify emoticons ([\#10108](https://github.com/matrix-org/matrix-react-sdk/pull/10108)). Fixes vector-im/element-web#19472. Contributed by @adarsh-sgh. - * Remove a redundant white space ([\#10129](https://github.com/matrix-org/matrix-react-sdk/pull/10129)). Contributed by @luixxiul. - -Changes in [3.66.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.66.0) (2023-02-14) -===================================================================================================== - -## ✨ Features - * Add option to find own location in map views ([\#10083](https://github.com/matrix-org/matrix-react-sdk/pull/10083)). - * Render poll end events in timeline ([\#10027](https://github.com/matrix-org/matrix-react-sdk/pull/10027)). Contributed by @kerryarchibald. - * Indicate unread messages in tab title ([\#10096](https://github.com/matrix-org/matrix-react-sdk/pull/10096)). Contributed by @tnt7864. - * Open message in editing mode when keyboard up is pressed (RTE) ([\#10079](https://github.com/matrix-org/matrix-react-sdk/pull/10079)). Contributed by @florianduros. - * Hide superseded rooms from the room list using dynamic room predecessors ([\#10068](https://github.com/matrix-org/matrix-react-sdk/pull/10068)). Contributed by @andybalaam. - * Support MSC3946 in RoomListStore ([\#10054](https://github.com/matrix-org/matrix-react-sdk/pull/10054)). Fixes vector-im/element-web#24325. Contributed by @andybalaam. - * Auto focus security key field ([\#10048](https://github.com/matrix-org/matrix-react-sdk/pull/10048)). - * use Poll model with relations API in poll rendering ([\#9877](https://github.com/matrix-org/matrix-react-sdk/pull/9877)). Contributed by @kerryarchibald. - * Support MSC3946 in the RoomCreate tile ([\#10041](https://github.com/matrix-org/matrix-react-sdk/pull/10041)). Fixes vector-im/element-web#24323. Contributed by @andybalaam. - * Update labs flag description for RTE ([\#10058](https://github.com/matrix-org/matrix-react-sdk/pull/10058)). Contributed by @florianduros. - * Change ul list style to disc when editing message ([\#10043](https://github.com/matrix-org/matrix-react-sdk/pull/10043)). Contributed by @alunturner. - * Improved click detection within PiP windows ([\#10040](https://github.com/matrix-org/matrix-react-sdk/pull/10040)). Fixes vector-im/element-web#24371. - * Add RTE keyboard navigation in editing ([\#9980](https://github.com/matrix-org/matrix-react-sdk/pull/9980)). Fixes vector-im/element-web#23621. Contributed by @florianduros. - * Paragraph integration for rich text editor ([\#10008](https://github.com/matrix-org/matrix-react-sdk/pull/10008)). Contributed by @alunturner. - * Add indentation increasing/decreasing to RTE ([\#10034](https://github.com/matrix-org/matrix-react-sdk/pull/10034)). Contributed by @florianduros. - * Add ignore user confirmation dialog ([\#6116](https://github.com/matrix-org/matrix-react-sdk/pull/6116)). Fixes vector-im/element-web#14746. - * Use monospace font for room, message IDs in View Source modal ([\#9956](https://github.com/matrix-org/matrix-react-sdk/pull/9956)). Fixes vector-im/element-web#21937. Contributed by @paragpoddar. - * Implement MSC3946 for AdvancedRoomSettingsTab ([\#9995](https://github.com/matrix-org/matrix-react-sdk/pull/9995)). Fixes vector-im/element-web#24322. Contributed by @andybalaam. - * Implementation of MSC3824 to make the client OIDC-aware ([\#8681](https://github.com/matrix-org/matrix-react-sdk/pull/8681)). Contributed by @hughns. - * Improves a11y for avatar uploads ([\#9985](https://github.com/matrix-org/matrix-react-sdk/pull/9985)). Contributed by @GoodGuyMarco. - * Add support for [token authenticated registration](https ([\#7275](https://github.com/matrix-org/matrix-react-sdk/pull/7275)). Fixes vector-im/element-web#18931. Contributed by @govynnus. - -## 🐛 Bug Fixes - * Remove duplicate white space characters from translation keys ([\#10152](https://github.com/matrix-org/matrix-react-sdk/pull/10152)). Contributed by @luixxiul. - * Fix the caption of new sessions manager on Labs settings page for localization ([\#10143](https://github.com/matrix-org/matrix-react-sdk/pull/10143)). Contributed by @luixxiul. - * Prevent start another DM with a user if one already exists ([\#10127](https://github.com/matrix-org/matrix-react-sdk/pull/10127)). Fixes vector-im/element-web#23138. - * Remove white space characters before the horizontal ellipsis ([\#10130](https://github.com/matrix-org/matrix-react-sdk/pull/10130)). Contributed by @luixxiul. - * Fix Selectable Text on 'Delete All' and 'Retry All' Buttons ([\#10128](https://github.com/matrix-org/matrix-react-sdk/pull/10128)). Fixes vector-im/element-web#23232. Contributed by @akshattchhabra. - * Correctly Identify emoticons ([\#10108](https://github.com/matrix-org/matrix-react-sdk/pull/10108)). Fixes vector-im/element-web#19472. Contributed by @adarsh-sgh. - * Should open new 1:1 chat room after leaving the old one ([\#9880](https://github.com/matrix-org/matrix-react-sdk/pull/9880)). Contributed by @ahmadkadri. - * Remove a redundant white space ([\#10129](https://github.com/matrix-org/matrix-react-sdk/pull/10129)). Contributed by @luixxiul. - * Fix a crash when removing persistent widgets (updated) ([\#10099](https://github.com/matrix-org/matrix-react-sdk/pull/10099)). Fixes vector-im/element-web#24412. Contributed by @andybalaam. - * Fix wrongly grouping 3pid invites into a single repeated transition ([\#10087](https://github.com/matrix-org/matrix-react-sdk/pull/10087)). Fixes vector-im/element-web#24432. - * Fix scrollbar colliding with checkbox in add to space section ([\#10093](https://github.com/matrix-org/matrix-react-sdk/pull/10093)). Fixes vector-im/element-web#23189. Contributed by @Arnabdaz. - * Add a whitespace character after 'broadcast?' ([\#10097](https://github.com/matrix-org/matrix-react-sdk/pull/10097)). Contributed by @luixxiul. - * Seekbar in broadcast PiP view is now updated when switching between different broadcasts ([\#10072](https://github.com/matrix-org/matrix-react-sdk/pull/10072)). Fixes vector-im/element-web#24415. - * Add border to "reject" button on room preview card for clickable area indication. It fixes vector-im/element-web#22623 ([\#9205](https://github.com/matrix-org/matrix-react-sdk/pull/9205)). Contributed by @gefgu. - * Element-R: fix rageshages ([\#10081](https://github.com/matrix-org/matrix-react-sdk/pull/10081)). Fixes vector-im/element-web#24430. - * Fix markdown paragraph display in timeline ([\#10071](https://github.com/matrix-org/matrix-react-sdk/pull/10071)). Fixes vector-im/element-web#24419. Contributed by @alunturner. - * Prevent the remaining broadcast time from being exceeded ([\#10070](https://github.com/matrix-org/matrix-react-sdk/pull/10070)). - * Fix cursor position when new line is created by pressing enter (RTE) ([\#10064](https://github.com/matrix-org/matrix-react-sdk/pull/10064)). Contributed by @florianduros. - * Ensure room is actually in space hierarchy when resolving its latest version ([\#10010](https://github.com/matrix-org/matrix-react-sdk/pull/10010)). - * Fix new line for inline code ([\#10062](https://github.com/matrix-org/matrix-react-sdk/pull/10062)). Contributed by @florianduros. - * Member avatars without canvas ([\#9990](https://github.com/matrix-org/matrix-react-sdk/pull/9990)). Contributed by @clarkf. - * Apply more general fix for base avatar regressions ([\#10045](https://github.com/matrix-org/matrix-react-sdk/pull/10045)). Fixes vector-im/element-web#24382 and vector-im/element-web#24370. - * Replace list, code block and quote icons by new icons ([\#10035](https://github.com/matrix-org/matrix-react-sdk/pull/10035)). Contributed by @florianduros. - * fix regional emojis converted to flags ([\#9294](https://github.com/matrix-org/matrix-react-sdk/pull/9294)). Fixes vector-im/element-web#19000. Contributed by @grimhilt. - * resolved emoji description text overflowing issue ([\#10028](https://github.com/matrix-org/matrix-react-sdk/pull/10028)). Contributed by @fahadNoufal. - * Fix MessageEditHistoryDialog crashing on complex input ([\#10018](https://github.com/matrix-org/matrix-react-sdk/pull/10018)). Fixes vector-im/element-web#23665. Contributed by @clarkf. - * Unify unread notification state determination ([\#9941](https://github.com/matrix-org/matrix-react-sdk/pull/9941)). Contributed by @clarkf. - * Fix layout and visual regressions around default avatars ([\#10031](https://github.com/matrix-org/matrix-react-sdk/pull/10031)). Fixes vector-im/element-web#24375 and vector-im/element-web#24369. - * Fix useUnreadNotifications exploding with falsey room, like in notif panel ([\#10030](https://github.com/matrix-org/matrix-react-sdk/pull/10030)). Fixes matrix-org/element-web-rageshakes#19334. - * Fix "[object Promise]" appearing in HTML exports ([\#9975](https://github.com/matrix-org/matrix-react-sdk/pull/9975)). Fixes vector-im/element-web#24272. Contributed by @clarkf. - * changing the color of message time stamp ([\#10016](https://github.com/matrix-org/matrix-react-sdk/pull/10016)). Contributed by @nawarajshah. - * Fix link creation with backward selection ([\#9986](https://github.com/matrix-org/matrix-react-sdk/pull/9986)). Fixes vector-im/element-web#24315. Contributed by @florianduros. - * Misaligned reply preview in thread composer #23396 ([\#9977](https://github.com/matrix-org/matrix-react-sdk/pull/9977)). Fixes vector-im/element-web#23396. Contributed by @mustafa-kapadia1483. - - -Changes in [3.65.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.65.0) (2023-01-31) -===================================================================================================== - -## ✨ Features - * Quotes for rte ([\#9932](https://github.com/matrix-org/matrix-react-sdk/pull/9932)). Contributed by @alunturner. - * Show the room name in the room header during calls ([\#9942](https://github.com/matrix-org/matrix-react-sdk/pull/9942)). Fixes vector-im/element-web#24268. - * Add code blocks to rich text editor ([\#9921](https://github.com/matrix-org/matrix-react-sdk/pull/9921)). Contributed by @alunturner. - * Add new style for inline code ([\#9936](https://github.com/matrix-org/matrix-react-sdk/pull/9936)). Contributed by @florianduros. - * Add disabled button state to rich text editor ([\#9930](https://github.com/matrix-org/matrix-react-sdk/pull/9930)). Contributed by @alunturner. - * Change the rageshake "app" for auto-rageshakes ([\#9909](https://github.com/matrix-org/matrix-react-sdk/pull/9909)). - * Device manager - tweak settings display ([\#9905](https://github.com/matrix-org/matrix-react-sdk/pull/9905)). Contributed by @kerryarchibald. - * Add list functionality to rich text editor ([\#9871](https://github.com/matrix-org/matrix-react-sdk/pull/9871)). Contributed by @alunturner. - -## 🐛 Bug Fixes - * Fix RTE focus behaviour in threads ([\#9969](https://github.com/matrix-org/matrix-react-sdk/pull/9969)). Fixes vector-im/element-web#23755. Contributed by @florianduros. - * #22204 Issue: Centered File info in lightbox ([\#9971](https://github.com/matrix-org/matrix-react-sdk/pull/9971)). Fixes vector-im/element-web#22204. Contributed by @Spartan09. - * Fix seekbar position for zero length audio ([\#9949](https://github.com/matrix-org/matrix-react-sdk/pull/9949)). Fixes vector-im/element-web#24248. - * Allow thread panel to be closed after being opened from notification ([\#9937](https://github.com/matrix-org/matrix-react-sdk/pull/9937)). Fixes vector-im/element-web#23764 vector-im/element-web#23852 and vector-im/element-web#24213. Contributed by @justjanne. - * Only highlight focused menu item if focus is supposed to be visible ([\#9945](https://github.com/matrix-org/matrix-react-sdk/pull/9945)). Fixes vector-im/element-web#23582. - * Prevent call durations from breaking onto multiple lines ([\#9944](https://github.com/matrix-org/matrix-react-sdk/pull/9944)). - * Tweak call lobby buttons to more closely match designs ([\#9943](https://github.com/matrix-org/matrix-react-sdk/pull/9943)). - * Do not show a broadcast as live immediately after the recording has stopped ([\#9947](https://github.com/matrix-org/matrix-react-sdk/pull/9947)). Fixes vector-im/element-web#24233. - * Clear the RTE before sending a message ([\#9948](https://github.com/matrix-org/matrix-react-sdk/pull/9948)). Contributed by @florianduros. - * Fix {enter} press in RTE ([\#9927](https://github.com/matrix-org/matrix-react-sdk/pull/9927)). Contributed by @florianduros. - * Fix the problem that the password reset email has to be confirmed twice ([\#9926](https://github.com/matrix-org/matrix-react-sdk/pull/9926)). Fixes vector-im/element-web#24226. - * replace .at() with array.length-1 ([\#9933](https://github.com/matrix-org/matrix-react-sdk/pull/9933)). Fixes matrix-org/element-web-rageshakes#19281. - * Fix broken threads list timestamp layout ([\#9922](https://github.com/matrix-org/matrix-react-sdk/pull/9922)). Fixes vector-im/element-web#24243 and vector-im/element-web#24191. Contributed by @justjanne. - * Disable multiple messages when {enter} is pressed multiple times ([\#9929](https://github.com/matrix-org/matrix-react-sdk/pull/9929)). Fixes vector-im/element-web#24249. Contributed by @florianduros. - * Fix logout devices when resetting the password ([\#9925](https://github.com/matrix-org/matrix-react-sdk/pull/9925)). Fixes vector-im/element-web#24228. - * Fix: Poll replies overflow when not enough space ([\#9924](https://github.com/matrix-org/matrix-react-sdk/pull/9924)). Fixes vector-im/element-web#24227. Contributed by @kerryarchibald. - * State event updates are not forwarded to the widget from invitation room ([\#9802](https://github.com/matrix-org/matrix-react-sdk/pull/9802)). Contributed by @maheichyk. - * Fix error when viewing source of redacted events ([\#9914](https://github.com/matrix-org/matrix-react-sdk/pull/9914)). Fixes vector-im/element-web#24165. Contributed by @clarkf. - * Replace outdated css attribute ([\#9912](https://github.com/matrix-org/matrix-react-sdk/pull/9912)). Fixes vector-im/element-web#24218. Contributed by @justjanne. - * Clear isLogin theme override when user is no longer viewing login screens ([\#9911](https://github.com/matrix-org/matrix-react-sdk/pull/9911)). Fixes vector-im/element-web#23893. - * Fix reply action in message context menu notif & file panels ([\#9895](https://github.com/matrix-org/matrix-react-sdk/pull/9895)). Fixes vector-im/element-web#23970. - * Fix issue where thread dropdown would not show up correctly ([\#9872](https://github.com/matrix-org/matrix-react-sdk/pull/9872)). Fixes vector-im/element-web#24040. Contributed by @justjanne. - * Fix unexpected composer growing ([\#9889](https://github.com/matrix-org/matrix-react-sdk/pull/9889)). Contributed by @florianduros. - * Fix misaligned timestamps for thread roots which are emotes ([\#9875](https://github.com/matrix-org/matrix-react-sdk/pull/9875)). Fixes vector-im/element-web#23897. Contributed by @justjanne. - -Changes in [3.64.2](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.64.2) (2023-01-20) -===================================================================================================== - -## 🐛 Bug Fixes - * Fix second occurence of a crash in older browsers - -Changes in [3.64.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.64.1) (2023-01-18) -===================================================================================================== - -## 🐛 Bug Fixes - * Fix crash in older browsers (replace .at() with array.length-1) ([\#9933](https://github.com/matrix-org/matrix-react-sdk/pull/9933)). Fixes matrix-org/element-web-rageshakes#19281. - -Changes in [3.64.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.64.0) (2023-01-18) -===================================================================================================== - -## ✨ Features - * Switch threads on for everyone ([\#9879](https://github.com/matrix-org/matrix-react-sdk/pull/9879)). - * Make threads use new UTD UI ([\#9876](https://github.com/matrix-org/matrix-react-sdk/pull/9876)). Fixes vector-im/element-web#24060. - * Add edit and remove actions to link in RTE ([\#9864](https://github.com/matrix-org/matrix-react-sdk/pull/9864)). - * Remove extensible events v1 experimental rendering ([\#9881](https://github.com/matrix-org/matrix-react-sdk/pull/9881)). - * Make create poll dialog scale better (PSG-929) ([\#9873](https://github.com/matrix-org/matrix-react-sdk/pull/9873)). Fixes vector-im/element-web#21855. - * Change RTE mode icons ([\#9861](https://github.com/matrix-org/matrix-react-sdk/pull/9861)). - * Device manager - prune client information events after remote sign out ([\#9874](https://github.com/matrix-org/matrix-react-sdk/pull/9874)). - * Check connection before starting broadcast ([\#9857](https://github.com/matrix-org/matrix-react-sdk/pull/9857)). - * Enable sent receipt for poll start events (PSG-962) ([\#9870](https://github.com/matrix-org/matrix-react-sdk/pull/9870)). - * Change clear notifications to have more readable copy ([\#9867](https://github.com/matrix-org/matrix-react-sdk/pull/9867)). - * Combine search results when the query is present in multiple successive messages ([\#9855](https://github.com/matrix-org/matrix-react-sdk/pull/9855)). Fixes vector-im/element-web#3977. Contributed by @grimhilt. - * Disable bubbles for broadcasts ([\#9860](https://github.com/matrix-org/matrix-react-sdk/pull/9860)). Fixes vector-im/element-web#24140. - * Enable reactions and replies for broadcasts ([\#9856](https://github.com/matrix-org/matrix-react-sdk/pull/9856)). Fixes vector-im/element-web#24042. - * Improve switching between rich and plain editing modes ([\#9776](https://github.com/matrix-org/matrix-react-sdk/pull/9776)). - * Redesign the picture-in-picture window ([\#9800](https://github.com/matrix-org/matrix-react-sdk/pull/9800)). Fixes vector-im/element-web#23980. - * User on-boarding tasks now appear in a static order. ([\#9799](https://github.com/matrix-org/matrix-react-sdk/pull/9799)). Contributed by @GoodGuyMarco. - * Device manager - contextual menus ([\#9832](https://github.com/matrix-org/matrix-react-sdk/pull/9832)). - * If listening a non-live broadcast and changing the room, the broadcast will be paused ([\#9825](https://github.com/matrix-org/matrix-react-sdk/pull/9825)). Fixes vector-im/element-web#24078. - * Consider own broadcasts from other device as a playback ([\#9821](https://github.com/matrix-org/matrix-react-sdk/pull/9821)). Fixes vector-im/element-web#24068. - * Add link creation to rich text editor ([\#9775](https://github.com/matrix-org/matrix-react-sdk/pull/9775)). - * Add mark as read option in room setting ([\#9798](https://github.com/matrix-org/matrix-react-sdk/pull/9798)). Fixes vector-im/element-web#24053. - * Device manager - current device design and copy tweaks ([\#9801](https://github.com/matrix-org/matrix-react-sdk/pull/9801)). - * Unify notifications panel event design ([\#9754](https://github.com/matrix-org/matrix-react-sdk/pull/9754)). - * Add actions for integration manager to send and read certain events ([\#9740](https://github.com/matrix-org/matrix-react-sdk/pull/9740)). - * Device manager - design tweaks ([\#9768](https://github.com/matrix-org/matrix-react-sdk/pull/9768)). - * Change room list sorting to activity and unread first by default ([\#9773](https://github.com/matrix-org/matrix-react-sdk/pull/9773)). Fixes vector-im/element-web#24014. - * Add a config flag to enable the rust crypto-sdk ([\#9759](https://github.com/matrix-org/matrix-react-sdk/pull/9759)). - * Improve decryption error UI by consolidating error messages and providing instructions when possible ([\#9544](https://github.com/matrix-org/matrix-react-sdk/pull/9544)). - * Honor font settings in Element Call ([\#9751](https://github.com/matrix-org/matrix-react-sdk/pull/9751)). Fixes vector-im/element-web#23661. - * Device manager - use deleteAccountData to prune device manager client information events ([\#9734](https://github.com/matrix-org/matrix-react-sdk/pull/9734)). - -## 🐛 Bug Fixes - * Display rooms & threads as unread (bold) if threads have unread messages. ([\#9763](https://github.com/matrix-org/matrix-react-sdk/pull/9763)). Fixes vector-im/element-web#23907. - * Don't prefer STIXGeneral over the default font ([\#9711](https://github.com/matrix-org/matrix-react-sdk/pull/9711)). Fixes vector-im/element-web#23899. - * Use the same avatar colour when creating 1:1 DM rooms ([\#9850](https://github.com/matrix-org/matrix-react-sdk/pull/9850)). Fixes vector-im/element-web#23476. - * Fix space lock icon size ([\#9854](https://github.com/matrix-org/matrix-react-sdk/pull/9854)). Fixes vector-im/element-web#24128. - * Make calls automatically disconnect if the widget disappears ([\#9862](https://github.com/matrix-org/matrix-react-sdk/pull/9862)). Fixes vector-im/element-web#23664. - * Fix emoji in RTE editing ([\#9827](https://github.com/matrix-org/matrix-react-sdk/pull/9827)). - * Fix export with attachments on formats txt and json ([\#9851](https://github.com/matrix-org/matrix-react-sdk/pull/9851)). Fixes vector-im/element-web#24130. Contributed by @grimhilt. - * Fixed empty `Content-Type` for encrypted uploads ([\#9848](https://github.com/matrix-org/matrix-react-sdk/pull/9848)). Contributed by @K3das. - * Fix sign-in instead link on password reset page ([\#9820](https://github.com/matrix-org/matrix-react-sdk/pull/9820)). Fixes vector-im/element-web#24087. - * The seekbar now initially shows the current position ([\#9796](https://github.com/matrix-org/matrix-react-sdk/pull/9796)). Fixes vector-im/element-web#24051. - * Fix: Editing a poll will silently change it to a closed poll ([\#9809](https://github.com/matrix-org/matrix-react-sdk/pull/9809)). Fixes vector-im/element-web#23176. - * Make call tiles look less broken in the right panel ([\#9808](https://github.com/matrix-org/matrix-react-sdk/pull/9808)). Fixes vector-im/element-web#23716. - * Prevent unnecessary m.direct updates ([\#9805](https://github.com/matrix-org/matrix-react-sdk/pull/9805)). Fixes vector-im/element-web#24059. - * Fix checkForPreJoinUISI for thread roots ([\#9803](https://github.com/matrix-org/matrix-react-sdk/pull/9803)). Fixes vector-im/element-web#24054. - * Snap in PiP widget when content changed ([\#9797](https://github.com/matrix-org/matrix-react-sdk/pull/9797)). Fixes vector-im/element-web#24050. - * Load RTE components only when RTE labs is enabled ([\#9804](https://github.com/matrix-org/matrix-react-sdk/pull/9804)). - * Ensure that events are correctly updated when they are edited. ([\#9789](https://github.com/matrix-org/matrix-react-sdk/pull/9789)). - * When stopping a broadcast also stop the playback ([\#9795](https://github.com/matrix-org/matrix-react-sdk/pull/9795)). Fixes vector-im/element-web#24052. - * Prevent to start two broadcasts at the same time ([\#9744](https://github.com/matrix-org/matrix-react-sdk/pull/9744)). Fixes vector-im/element-web#23973. - * Correctly handle limited sync responses by resetting the thread timeline ([\#3056](https://github.com/matrix-org/matrix-js-sdk/pull/3056)). Fixes vector-im/element-web#23952. - * Fix failure to start in firefox private browser ([\#3058](https://github.com/matrix-org/matrix-js-sdk/pull/3058)). Fixes vector-im/element-web#24216. - -Changes in [3.63.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.63.0) (2022-12-21) -===================================================================================================== - -## ✨ Features - * Prevent unnecessary m.direct updates ([\#9805](https://github.com/matrix-org/matrix-react-sdk/pull/9805)). Fixes vector-im/element-web#24059. - * Fix checkForPreJoinUISI for thread roots ([\#9803](https://github.com/matrix-org/matrix-react-sdk/pull/9803)). Fixes vector-im/element-web#24054. - * Add inline code formatting to rich text editor ([\#9720](https://github.com/matrix-org/matrix-react-sdk/pull/9720)). - * Add emoji handling for plain text mode of the new rich text editor ([\#9727](https://github.com/matrix-org/matrix-react-sdk/pull/9727)). - * Overlay virtual room call events into main timeline ([\#9626](https://github.com/matrix-org/matrix-react-sdk/pull/9626)). Fixes vector-im/element-web#22929. - * Adds a new section under "Room Settings" > "Roles & Permissions" which adds the possibility to multiselect users from this room and grant them more permissions. ([\#9596](https://github.com/matrix-org/matrix-react-sdk/pull/9596)). Contributed by @GoodGuyMarco. - * Add emoji handling for rich text mode ([\#9661](https://github.com/matrix-org/matrix-react-sdk/pull/9661)). - * Add setting to hide bold notifications ([\#9705](https://github.com/matrix-org/matrix-react-sdk/pull/9705)). - * Further password reset flow enhancements ([\#9662](https://github.com/matrix-org/matrix-react-sdk/pull/9662)). - * Snooze the bulk unverified sessions reminder on dismiss ([\#9706](https://github.com/matrix-org/matrix-react-sdk/pull/9706)). - * Honor advanced audio processing settings when recording voice messages ([\#9610](https://github.com/matrix-org/matrix-react-sdk/pull/9610)). Contributed by @MrAnno. - * Improve the visual balance of bubble layout ([\#9704](https://github.com/matrix-org/matrix-react-sdk/pull/9704)). - * Add config setting to disable bulk unverified sessions nag ([\#9657](https://github.com/matrix-org/matrix-react-sdk/pull/9657)). - * Only display bulk unverified sessions nag when current sessions is verified ([\#9656](https://github.com/matrix-org/matrix-react-sdk/pull/9656)). - * Separate labs and betas more clearly ([\#8969](https://github.com/matrix-org/matrix-react-sdk/pull/8969)). Fixes vector-im/element-web#22706. - * Show user an error if we fail to create a DM for verification. ([\#9624](https://github.com/matrix-org/matrix-react-sdk/pull/9624)). - -## 🐛 Bug Fixes - * Fix issue where thread panel did not update correctly ([\#9746](https://github.com/matrix-org/matrix-react-sdk/pull/9746)). Fixes vector-im/element-web#23971. - * Remove async call to get virtual room from room load ([\#9743](https://github.com/matrix-org/matrix-react-sdk/pull/9743)). Fixes vector-im/element-web#23968. - * Check each thread for unread messages. ([\#9723](https://github.com/matrix-org/matrix-react-sdk/pull/9723)). - * Device manage - handle sessions that don't support encryption ([\#9717](https://github.com/matrix-org/matrix-react-sdk/pull/9717)). Fixes vector-im/element-web#23722. - * Fix hover state for formatting buttons (Rich text editor) (fix vector-im/element-web/issues/23832) ([\#9715](https://github.com/matrix-org/matrix-react-sdk/pull/9715)). - * Don't allow group calls to be unterminated ([\#9710](https://github.com/matrix-org/matrix-react-sdk/pull/9710)). - * Fix replies to emotes not showing as inline ([\#9707](https://github.com/matrix-org/matrix-react-sdk/pull/9707)). Fixes vector-im/element-web#23903. - * Update copy of 'Change layout' button to match Element Call ([\#9703](https://github.com/matrix-org/matrix-react-sdk/pull/9703)). - * Fix call splitbrains when switching between rooms ([\#9692](https://github.com/matrix-org/matrix-react-sdk/pull/9692)). - * bugfix: fix an issue where the Notifier would incorrectly fire for non-timeline events ([\#9664](https://github.com/matrix-org/matrix-react-sdk/pull/9664)). Fixes vector-im/element-web#17263. - * Fix power selector being wrongly disabled for admins themselves ([\#9681](https://github.com/matrix-org/matrix-react-sdk/pull/9681)). Fixes vector-im/element-web#23882. - * Show day counts in call durations ([\#9641](https://github.com/matrix-org/matrix-react-sdk/pull/9641)). - -Changes in [3.62.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.62.0) (2022-12-06) -===================================================================================================== - -## ✨ Features - * Further improve replies ([\#6396](https://github.com/matrix-org/matrix-react-sdk/pull/6396)). Fixes vector-im/element-web#19074, vector-im/element-web#18194 vector-im/element-web#18027 and vector-im/element-web#19179. - * Enable users to join group calls from multiple devices ([\#9625](https://github.com/matrix-org/matrix-react-sdk/pull/9625)). - * fix(visual): make cursor a pointer for summaries ([\#9419](https://github.com/matrix-org/matrix-react-sdk/pull/9419)). Contributed by @r00ster91. - * Add placeholder for rich text editor ([\#9613](https://github.com/matrix-org/matrix-react-sdk/pull/9613)). - * Consolidate public room search experience ([\#9605](https://github.com/matrix-org/matrix-react-sdk/pull/9605)). Fixes vector-im/element-web#22846. - * New password reset flow ([\#9581](https://github.com/matrix-org/matrix-react-sdk/pull/9581)). Fixes vector-im/element-web#23131. - * Device manager - add tooltip to device details toggle ([\#9594](https://github.com/matrix-org/matrix-react-sdk/pull/9594)). - * sliding sync: add lazy-loading member support ([\#9530](https://github.com/matrix-org/matrix-react-sdk/pull/9530)). - * Limit formatting bar offset to top of composer ([\#9365](https://github.com/matrix-org/matrix-react-sdk/pull/9365)). Fixes vector-im/element-web#12359. Contributed by @owi92. - -## 🐛 Bug Fixes - * Fix issues around up arrow event edit shortcut ([\#9645](https://github.com/matrix-org/matrix-react-sdk/pull/9645)). Fixes vector-im/element-web#18497 and vector-im/element-web#18964. - * Fix search not being cleared when clicking on a result ([\#9635](https://github.com/matrix-org/matrix-react-sdk/pull/9635)). Fixes vector-im/element-web#23845. - * Fix screensharing in 1:1 calls ([\#9612](https://github.com/matrix-org/matrix-react-sdk/pull/9612)). Fixes vector-im/element-web#23808. - * Fix the background color flashing when joining a call ([\#9640](https://github.com/matrix-org/matrix-react-sdk/pull/9640)). - * Fix the size of the 'Private space' icon ([\#9638](https://github.com/matrix-org/matrix-react-sdk/pull/9638)). - * Fix reply editing in rich text editor (https ([\#9615](https://github.com/matrix-org/matrix-react-sdk/pull/9615)). - * Fix thread list jumping back down while scrolling ([\#9606](https://github.com/matrix-org/matrix-react-sdk/pull/9606)). Fixes vector-im/element-web#23727. - * Fix regression with TimelinePanel props updates not taking effect ([\#9608](https://github.com/matrix-org/matrix-react-sdk/pull/9608)). Fixes vector-im/element-web#23794. - * Fix form tooltip positioning ([\#9598](https://github.com/matrix-org/matrix-react-sdk/pull/9598)). Fixes vector-im/element-web#22861. - * Extract Search handling from RoomView into its own Component ([\#9574](https://github.com/matrix-org/matrix-react-sdk/pull/9574)). Fixes vector-im/element-web#498. - * Fix call splitbrains when switching between rooms ([\#9692](https://github.com/matrix-org/matrix-react-sdk/pull/9692)). - * Fix replies to emotes not showing as inline ([\#9707](https://github.com/matrix-org/matrix-react-sdk/pull/9707)). Fixes vector-im/element-web#23903. - -Changes in [3.61.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.61.0) (2022-11-22) -===================================================================================================== - -## ✨ Features - * Make clear notifications work with threads ([\#9575](https://github.com/matrix-org/matrix-react-sdk/pull/9575)). Fixes vector-im/element-web#23751. - * Change "None" to "Off" in notification options ([\#9539](https://github.com/matrix-org/matrix-react-sdk/pull/9539)). Contributed by @Arnei. - * Advanced audio processing settings ([\#8759](https://github.com/matrix-org/matrix-react-sdk/pull/8759)). Fixes vector-im/element-web#6278. Contributed by @MrAnno. - * Add way to create a user notice via config.json ([\#9559](https://github.com/matrix-org/matrix-react-sdk/pull/9559)). - * Improve design of the rich text editor ([\#9533](https://github.com/matrix-org/matrix-react-sdk/pull/9533)). Contributed by @florianduros. - * Enable user to zoom beyond image size ([\#5949](https://github.com/matrix-org/matrix-react-sdk/pull/5949)). Contributed by @jaiwanth-v. - * Fix: Move "Leave Space" option to the bottom of space context menu ([\#9535](https://github.com/matrix-org/matrix-react-sdk/pull/9535)). Contributed by @hanadi92. - -## 🐛 Bug Fixes - * Fix integration manager `get_open_id_token` action and add E2E tests ([\#9520](https://github.com/matrix-org/matrix-react-sdk/pull/9520)). - * Fix links being mangled by markdown processing ([\#9570](https://github.com/matrix-org/matrix-react-sdk/pull/9570)). Fixes vector-im/element-web#23743. - * Fix: inline links selecting radio button ([\#9543](https://github.com/matrix-org/matrix-react-sdk/pull/9543)). Contributed by @hanadi92. - * fix wrong error message in registration when phone number threepid is in use. ([\#9571](https://github.com/matrix-org/matrix-react-sdk/pull/9571)). Contributed by @bagvand. - * Fix missing avatar for show current profiles ([\#9563](https://github.com/matrix-org/matrix-react-sdk/pull/9563)). Fixes vector-im/element-web#23733. - * fix read receipts trickling down correctly ([\#9567](https://github.com/matrix-org/matrix-react-sdk/pull/9567)). Fixes vector-im/element-web#23746. - * Resilience fix for homeserver without thread notification support ([\#9565](https://github.com/matrix-org/matrix-react-sdk/pull/9565)). - * Don't switch to the home page needlessly after leaving a room ([\#9477](https://github.com/matrix-org/matrix-react-sdk/pull/9477)). - * Differentiate download and decryption errors when showing images ([\#9562](https://github.com/matrix-org/matrix-react-sdk/pull/9562)). Fixes vector-im/element-web#3892. - * Close context menu when a modal is opened to prevent user getting stuck ([\#9560](https://github.com/matrix-org/matrix-react-sdk/pull/9560)). Fixes vector-im/element-web#15610 and vector-im/element-web#10781. - * Fix TimelineReset handling when no room associated ([\#9553](https://github.com/matrix-org/matrix-react-sdk/pull/9553)). - * Always use current profile on thread events ([\#9524](https://github.com/matrix-org/matrix-react-sdk/pull/9524)). Fixes vector-im/element-web#23648. - * Fix `ThreadView` tests not using thread flag ([\#9547](https://github.com/matrix-org/matrix-react-sdk/pull/9547)). Contributed by @MadLittleMods. - * Handle deletion of `m.call` events ([\#9540](https://github.com/matrix-org/matrix-react-sdk/pull/9540)). Fixes vector-im/element-web#23663. - * Fix incorrect notification count after leaving a room with notifications ([\#9518](https://github.com/matrix-org/matrix-react-sdk/pull/9518)). Contributed by @Arnei. - -Changes in [3.60.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.60.0) (2022-11-08) -===================================================================================================== - -## ✨ Features - * Loading threads with server-side assistance ([\#9356](https://github.com/matrix-org/matrix-react-sdk/pull/9356)). Fixes vector-im/element-web#21807, vector-im/element-web#21799, vector-im/element-web#21911, vector-im/element-web#22141, vector-im/element-web#22157, vector-im/element-web#22641, vector-im/element-web#22501 vector-im/element-web#22438 and vector-im/element-web#21678. Contributed by @justjanne. - * Make thread replies trigger a room list re-ordering ([\#9510](https://github.com/matrix-org/matrix-react-sdk/pull/9510)). Fixes vector-im/element-web#21700. - * Device manager - add extra details to device security and renaming ([\#9501](https://github.com/matrix-org/matrix-react-sdk/pull/9501)). Contributed by @kerryarchibald. - * Add plain text mode to the wysiwyg composer ([\#9503](https://github.com/matrix-org/matrix-react-sdk/pull/9503)). Contributed by @florianduros. - * Sliding Sync: improve sort order, show subspace rooms, better tombstoned room handling ([\#9484](https://github.com/matrix-org/matrix-react-sdk/pull/9484)). - * Device manager - add learn more popups to filtered sessions section ([\#9497](https://github.com/matrix-org/matrix-react-sdk/pull/9497)). Contributed by @kerryarchibald. - * Show thread notification if thread timeline is closed ([\#9495](https://github.com/matrix-org/matrix-react-sdk/pull/9495)). Fixes vector-im/element-web#23589. - * Add message editing to wysiwyg composer ([\#9488](https://github.com/matrix-org/matrix-react-sdk/pull/9488)). Contributed by @florianduros. - * Device manager - confirm sign out of other sessions ([\#9487](https://github.com/matrix-org/matrix-react-sdk/pull/9487)). Contributed by @kerryarchibald. - * Automatically request logs from other users in a call when submitting logs ([\#9492](https://github.com/matrix-org/matrix-react-sdk/pull/9492)). - * Add thread notification with server assistance (MSC3773) ([\#9400](https://github.com/matrix-org/matrix-react-sdk/pull/9400)). Fixes vector-im/element-web#21114, vector-im/element-web#21413, vector-im/element-web#21416, vector-im/element-web#21433, vector-im/element-web#21481, vector-im/element-web#21798, vector-im/element-web#21823 vector-im/element-web#23192 and vector-im/element-web#21765. - * Support for login + E2EE set up with QR ([\#9403](https://github.com/matrix-org/matrix-react-sdk/pull/9403)). Contributed by @hughns. - * Allow pressing Enter to send messages in new composer ([\#9451](https://github.com/matrix-org/matrix-react-sdk/pull/9451)). Contributed by @andybalaam. - -## 🐛 Bug Fixes - * Fix regressions around media uploads failing and causing soft crashes ([\#9549](https://github.com/matrix-org/matrix-react-sdk/pull/9549)). Fixes matrix-org/element-web-rageshakes#16831, matrix-org/element-web-rageshakes#16824 matrix-org/element-web-rageshakes#16810 and vector-im/element-web#23641. - * Fix /myroomavatar slash command ([\#9536](https://github.com/matrix-org/matrix-react-sdk/pull/9536)). Fixes matrix-org/synapse#14321. - * Fix NotificationBadge unsent color ([\#9522](https://github.com/matrix-org/matrix-react-sdk/pull/9522)). Fixes vector-im/element-web#23646. - * Fix room list sorted by recent on app startup ([\#9515](https://github.com/matrix-org/matrix-react-sdk/pull/9515)). Fixes vector-im/element-web#23635. - * Reset custom power selector when blurred on empty ([\#9508](https://github.com/matrix-org/matrix-react-sdk/pull/9508)). Fixes vector-im/element-web#23481. - * Reinstate timeline/redaction callbacks when updating notification state ([\#9494](https://github.com/matrix-org/matrix-react-sdk/pull/9494)). Fixes vector-im/element-web#23554. - * Only render NotificationBadge when needed ([\#9493](https://github.com/matrix-org/matrix-react-sdk/pull/9493)). Fixes vector-im/element-web#23584. - * Fix embedded Element Call screen sharing ([\#9485](https://github.com/matrix-org/matrix-react-sdk/pull/9485)). Fixes vector-im/element-web#23571. - * Send Content-Type: application/json header for integration manager /register API ([\#9490](https://github.com/matrix-org/matrix-react-sdk/pull/9490)). Fixes vector-im/element-web#23580. - * Fix joining calls without audio or video inputs ([\#9486](https://github.com/matrix-org/matrix-react-sdk/pull/9486)). Fixes vector-im/element-web#23511. - * Ensure spaces in the spotlight dialog have rounded square avatars ([\#9480](https://github.com/matrix-org/matrix-react-sdk/pull/9480)). Fixes vector-im/element-web#23515. - * Only show mini avatar uploader in room intro when no avatar yet exists ([\#9479](https://github.com/matrix-org/matrix-react-sdk/pull/9479)). Fixes vector-im/element-web#23552. - * Fix threads fallback incorrectly targets root event ([\#9229](https://github.com/matrix-org/matrix-react-sdk/pull/9229)). Fixes vector-im/element-web#23147. - * Align video call icon with banner text ([\#9460](https://github.com/matrix-org/matrix-react-sdk/pull/9460)). - * Set relations helper when creating event tile context menu ([\#9253](https://github.com/matrix-org/matrix-react-sdk/pull/9253)). Fixes vector-im/element-web#22018. - * Device manager - put client/browser device metadata in correct section ([\#9447](https://github.com/matrix-org/matrix-react-sdk/pull/9447)). Contributed by @kerryarchibald. - * Update the room unread notification counter when the server changes the value without any related read receipt ([\#9438](https://github.com/matrix-org/matrix-react-sdk/pull/9438)). - -Changes in [3.59.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.59.1) (2022-11-01) -===================================================================================================== - -## 🐛 Bug Fixes - * Fix default behavior of Room.getBlacklistUnverifiedDevices ([\#2830](https://github.com/matrix-org/matrix-js-sdk/pull/2830)). Contributed by @duxovni. - * Catch server versions API call exception when starting the client ([\#2828](https://github.com/matrix-org/matrix-js-sdk/pull/2828)). Fixes vector-im/element-web#23634. - * Fix authedRequest including `Authorization: Bearer undefined` for password resets ([\#2822](https://github.com/matrix-org/matrix-js-sdk/pull/2822)). Fixes vector-im/element-web#23655. - -Changes in [3.59.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.59.0) (2022-10-25) -===================================================================================================== - -## ✨ Features - * Include a file-safe room name and ISO date in chat exports ([\#9440](https://github.com/matrix-org/matrix-react-sdk/pull/9440)). Fixes vector-im/element-web#21812 and vector-im/element-web#19724. - * Room call banner ([\#9378](https://github.com/matrix-org/matrix-react-sdk/pull/9378)). Fixes vector-im/element-web#23453. Contributed by @toger5. - * Device manager - spinners while devices are signing out ([\#9433](https://github.com/matrix-org/matrix-react-sdk/pull/9433)). Fixes vector-im/element-web#15865. - * Device manager - silence call ringers when local notifications are silenced ([\#9420](https://github.com/matrix-org/matrix-react-sdk/pull/9420)). - * Pass the current language to Element Call ([\#9427](https://github.com/matrix-org/matrix-react-sdk/pull/9427)). - * Hide screen-sharing button in Element Call on desktop ([\#9423](https://github.com/matrix-org/matrix-react-sdk/pull/9423)). - * Add reply support to WysiwygComposer ([\#9422](https://github.com/matrix-org/matrix-react-sdk/pull/9422)). Contributed by @florianduros. - * Disconnect other connected devices (of the same user) when joining an Element call ([\#9379](https://github.com/matrix-org/matrix-react-sdk/pull/9379)). - * Device manager - device tile main click target ([\#9409](https://github.com/matrix-org/matrix-react-sdk/pull/9409)). - * Add formatting buttons to the rich text editor ([\#9410](https://github.com/matrix-org/matrix-react-sdk/pull/9410)). Contributed by @florianduros. - * Device manager - current session context menu ([\#9386](https://github.com/matrix-org/matrix-react-sdk/pull/9386)). - * Remove piwik config fallback for privacy policy URL ([\#9390](https://github.com/matrix-org/matrix-react-sdk/pull/9390)). - * Add the first step to integrate the matrix wysiwyg composer ([\#9374](https://github.com/matrix-org/matrix-react-sdk/pull/9374)). Contributed by @florianduros. - * Device manager - UA parsing tweaks ([\#9382](https://github.com/matrix-org/matrix-react-sdk/pull/9382)). - * Device manager - remove client information events when disabling setting ([\#9384](https://github.com/matrix-org/matrix-react-sdk/pull/9384)). - * Add Element Call participant limit ([\#9358](https://github.com/matrix-org/matrix-react-sdk/pull/9358)). - * Add Element Call room settings ([\#9347](https://github.com/matrix-org/matrix-react-sdk/pull/9347)). - * Device manager - render extended device information ([\#9360](https://github.com/matrix-org/matrix-react-sdk/pull/9360)). - * New group call experience: Room header and PiP designs ([\#9351](https://github.com/matrix-org/matrix-react-sdk/pull/9351)). - * Pass language to Jitsi Widget ([\#9346](https://github.com/matrix-org/matrix-react-sdk/pull/9346)). Contributed by @Fox32. - * Add notifications and toasts for Element Call calls ([\#9337](https://github.com/matrix-org/matrix-react-sdk/pull/9337)). - * Device manager - device type icon ([\#9355](https://github.com/matrix-org/matrix-react-sdk/pull/9355)). - * Delete the remainder of groups ([\#9357](https://github.com/matrix-org/matrix-react-sdk/pull/9357)). Fixes vector-im/element-web#22770. - * Device manager - display client information in device details ([\#9315](https://github.com/matrix-org/matrix-react-sdk/pull/9315)). - -## 🐛 Bug Fixes - * Send Content-Type: application/json header for integration manager /register API ([\#9490](https://github.com/matrix-org/matrix-react-sdk/pull/9490)). Fixes vector-im/element-web#23580. - * Device manager - put client/browser device metadata in correct section ([\#9447](https://github.com/matrix-org/matrix-react-sdk/pull/9447)). - * update the room unread notification counter when the server changes the value without any related read receipt ([\#9438](https://github.com/matrix-org/matrix-react-sdk/pull/9438)). - * Don't show call banners in video rooms ([\#9441](https://github.com/matrix-org/matrix-react-sdk/pull/9441)). - * Prevent useContextMenu isOpen from being true if the button ref goes away ([\#9418](https://github.com/matrix-org/matrix-react-sdk/pull/9418)). Fixes matrix-org/element-web-rageshakes#15637. - * Automatically focus the WYSIWYG composer when you enter a room ([\#9412](https://github.com/matrix-org/matrix-react-sdk/pull/9412)). - * Improve the tooltips on the call lobby join button ([\#9428](https://github.com/matrix-org/matrix-react-sdk/pull/9428)). - * Pass the homeserver's base URL to Element Call ([\#9429](https://github.com/matrix-org/matrix-react-sdk/pull/9429)). Fixes vector-im/element-web#23301. - * Better accommodate long room names in call toasts ([\#9426](https://github.com/matrix-org/matrix-react-sdk/pull/9426)). - * Hide virtual widgets from the room info panel ([\#9424](https://github.com/matrix-org/matrix-react-sdk/pull/9424)). Fixes vector-im/element-web#23494. - * Inhibit clicking on sender avatar in threads list ([\#9417](https://github.com/matrix-org/matrix-react-sdk/pull/9417)). Fixes vector-im/element-web#23482. - * Correct the dir parameter of MSC3715 ([\#9391](https://github.com/matrix-org/matrix-react-sdk/pull/9391)). Contributed by @dhenneke. - * Use a more correct subset of users in `/remakeolm` developer command ([\#9402](https://github.com/matrix-org/matrix-react-sdk/pull/9402)). - * use correct default for notification silencing ([\#9388](https://github.com/matrix-org/matrix-react-sdk/pull/9388)). Fixes vector-im/element-web#23456. - * Device manager - eagerly create `m.local_notification_settings` events ([\#9353](https://github.com/matrix-org/matrix-react-sdk/pull/9353)). - * Close incoming Element call toast when viewing the call lobby ([\#9375](https://github.com/matrix-org/matrix-react-sdk/pull/9375)). - * Always allow enabling sending read receipts ([\#9367](https://github.com/matrix-org/matrix-react-sdk/pull/9367)). Fixes vector-im/element-web#23433. - * Fixes (vector-im/element-web/issues/22609) where the white theme is not applied when `white -> dark -> white` sequence is done. ([\#9320](https://github.com/matrix-org/matrix-react-sdk/pull/9320)). Contributed by @florianduros. - * Fix applying programmatically set height for "top" room layout ([\#9339](https://github.com/matrix-org/matrix-react-sdk/pull/9339)). Contributed by @Fox32. - -Changes in [3.58.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.58.1) (2022-10-11) -===================================================================================================== - -## 🐛 Bug Fixes - * Use correct default for notification silencing ([\#9388](https://github.com/matrix-org/matrix-react-sdk/pull/9388)). Fixes vector-im/element-web#23456. - -Changes in [3.58.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.58.0) (2022-10-11) -=============================================================================================================== - -## Deprecations - * Legacy Piwik config.json option `piwik.policy_url` is deprecated in favour of `privacy_policy_url`. Support will be removed in the next release. - -## ✨ Features - * Device manager - select all devices ([\#9330](https://github.com/matrix-org/matrix-react-sdk/pull/9330)). - * New group call experience: Call tiles ([\#9332](https://github.com/matrix-org/matrix-react-sdk/pull/9332)). - * Add Shift key to FormatQuote keyboard shortcut ([\#9298](https://github.com/matrix-org/matrix-react-sdk/pull/9298)). Contributed by @owi92. - * Device manager - sign out of multiple sessions ([\#9325](https://github.com/matrix-org/matrix-react-sdk/pull/9325)). - * Display push toggle for web sessions (MSC3890) ([\#9327](https://github.com/matrix-org/matrix-react-sdk/pull/9327)). - * Add device notifications enabled switch ([\#9324](https://github.com/matrix-org/matrix-react-sdk/pull/9324)). - * Implement push notification toggle in device detail ([\#9308](https://github.com/matrix-org/matrix-react-sdk/pull/9308)). - * New group call experience: Starting and ending calls ([\#9318](https://github.com/matrix-org/matrix-react-sdk/pull/9318)). - * New group call experience: Room header call buttons ([\#9311](https://github.com/matrix-org/matrix-react-sdk/pull/9311)). - * Make device ID copyable in device list ([\#9297](https://github.com/matrix-org/matrix-react-sdk/pull/9297)). - * Use display name instead of user ID when rendering power events ([\#9295](https://github.com/matrix-org/matrix-react-sdk/pull/9295)). - * Read receipts for threads ([\#9239](https://github.com/matrix-org/matrix-react-sdk/pull/9239)). Fixes vector-im/element-web#23191. - -## 🐛 Bug Fixes - * Use the correct sender key when checking shared secret ([\#2730](https://github.com/matrix-org/matrix-js-sdk/pull/2730)). Fixes vector-im/element-web#23374. - * Fix device selection in pre-join screen for Element Call video rooms ([\#9321](https://github.com/matrix-org/matrix-react-sdk/pull/9321)). Fixes vector-im/element-web#23331. - * Don't render a 1px high room topic if the room topic is empty ([\#9317](https://github.com/matrix-org/matrix-react-sdk/pull/9317)). Contributed by @Arnei. - * Don't show feedback prompts when that UIFeature is disabled ([\#9305](https://github.com/matrix-org/matrix-react-sdk/pull/9305)). Fixes vector-im/element-web#23327. - * Fix soft crash around unknown room pills ([\#9301](https://github.com/matrix-org/matrix-react-sdk/pull/9301)). Fixes matrix-org/element-web-rageshakes#15465. - * Fix spaces feedback prompt wrongly showing when feedback is disabled ([\#9302](https://github.com/matrix-org/matrix-react-sdk/pull/9302)). Fixes vector-im/element-web#23314. - * Fix tile soft crash in ReplyInThreadButton ([\#9300](https://github.com/matrix-org/matrix-react-sdk/pull/9300)). Fixes matrix-org/element-web-rageshakes#15493. - -Changes in [3.57.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.57.0) (2022-09-28) -===================================================================================================== - -## 🐛 Bug Fixes - * Bump IDB crypto store version ([\#2705](https://github.com/matrix-org/matrix-js-sdk/pull/2705)). - -Changes in [3.56.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.56.0) (2022-09-28) -===================================================================================================== - -## 🔒 Security -* Fix for [CVE-2022-39249](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D39249) -* Fix for [CVE-2022-39250](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D39250) -* Fix for [CVE-2022-39251](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D39251) -* Fix for [CVE-2022-39236](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D39236) - -Changes in [3.55.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.55.0) (2022-09-20) -=============================================================================================================== - -## ✨ Features - * Element Call video rooms ([\#9267](https://github.com/matrix-org/matrix-react-sdk/pull/9267)). - * Device manager - rename session ([\#9282](https://github.com/matrix-org/matrix-react-sdk/pull/9282)). - * Allow widgets to read related events ([\#9210](https://github.com/matrix-org/matrix-react-sdk/pull/9210)). Contributed by @dhenneke. - * Device manager - logout of other session ([\#9280](https://github.com/matrix-org/matrix-react-sdk/pull/9280)). - * Device manager - logout current session ([\#9275](https://github.com/matrix-org/matrix-react-sdk/pull/9275)). - * Device manager - verify other devices ([\#9274](https://github.com/matrix-org/matrix-react-sdk/pull/9274)). - * Allow integration managers to remove users ([\#9211](https://github.com/matrix-org/matrix-react-sdk/pull/9211)). - * Device manager - add verify current session button ([\#9252](https://github.com/matrix-org/matrix-react-sdk/pull/9252)). - * Add NotifPanel dot back. ([\#9242](https://github.com/matrix-org/matrix-react-sdk/pull/9242)). Fixes vector-im/element-web#17641. - * Implement MSC3575: Sliding Sync ([\#8328](https://github.com/matrix-org/matrix-react-sdk/pull/8328)). - * Add the clipboard read permission for widgets ([\#9250](https://github.com/matrix-org/matrix-react-sdk/pull/9250)). Contributed by @stefanmuhle. - -## 🐛 Bug Fixes - * Make autocomplete pop-up wider in thread view ([\#9289](https://github.com/matrix-org/matrix-react-sdk/pull/9289)). - * Fix soft crash around inviting invalid MXIDs in start DM on first message flow ([\#9281](https://github.com/matrix-org/matrix-react-sdk/pull/9281)). Fixes matrix-org/element-web-rageshakes#15060 and matrix-org/element-web-rageshakes#15140. - * Fix in-reply-to previews not disappearing when swapping rooms ([\#9278](https://github.com/matrix-org/matrix-react-sdk/pull/9278)). - * Fix invalid instanceof operand window.OffscreenCanvas ([\#9276](https://github.com/matrix-org/matrix-react-sdk/pull/9276)). Fixes vector-im/element-web#23275. - * Fix memory leak caused by unremoved listener ([\#9273](https://github.com/matrix-org/matrix-react-sdk/pull/9273)). - * Fix thumbnail generation when offscreen canvas fails ([\#9272](https://github.com/matrix-org/matrix-react-sdk/pull/9272)). Fixes vector-im/element-web#23265. - * Prevent sliding sync from showing a room under multiple sublists ([\#9266](https://github.com/matrix-org/matrix-react-sdk/pull/9266)). - * Fix tile crash around tooltipify links ([\#9270](https://github.com/matrix-org/matrix-react-sdk/pull/9270)). Fixes vector-im/element-web#23253. - * Device manager - filter out nulled metadatas in device tile properly ([\#9251](https://github.com/matrix-org/matrix-react-sdk/pull/9251)). - * Fix a sliding sync bug which could cause rooms to loop ([\#9268](https://github.com/matrix-org/matrix-react-sdk/pull/9268)). - * Remove the grey gradient on images in bubbles in the timeline ([\#9241](https://github.com/matrix-org/matrix-react-sdk/pull/9241)). Fixes vector-im/element-web#21651. - * Fix html export not including images ([\#9260](https://github.com/matrix-org/matrix-react-sdk/pull/9260)). Fixes vector-im/element-web#22059. - * Fix possible soft crash from a race condition in space hierarchies ([\#9254](https://github.com/matrix-org/matrix-react-sdk/pull/9254)). Fixes matrix-org/element-web-rageshakes#15225. - * Disable all types of autocorrect, -complete, -capitalize, etc on Spotlight's search field ([\#9259](https://github.com/matrix-org/matrix-react-sdk/pull/9259)). - * Handle M_INVALID_USERNAME on /register/available ([\#9237](https://github.com/matrix-org/matrix-react-sdk/pull/9237)). Fixes vector-im/element-web#23161. - * Fix issue with quiet zone around QR code ([\#9243](https://github.com/matrix-org/matrix-react-sdk/pull/9243)). Fixes vector-im/element-web#23199. - -Changes in [3.54.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.54.0) (2022-09-13) -===================================================================================================== - -## ✨ Features - * Device manager - hide unverified security recommendation when only current session is unverified ([\#9228](https://github.com/matrix-org/matrix-react-sdk/pull/9228)). Contributed by @kerryarchibald. - * Device manager - scroll to filtered list from security recommendations ([\#9227](https://github.com/matrix-org/matrix-react-sdk/pull/9227)). Contributed by @kerryarchibald. - * Device manager - updated dropdown style in filtered device list ([\#9226](https://github.com/matrix-org/matrix-react-sdk/pull/9226)). Contributed by @kerryarchibald. - * Device manager - device type and verification icons on device tile ([\#9197](https://github.com/matrix-org/matrix-react-sdk/pull/9197)). Contributed by @kerryarchibald. - -## 🐛 Bug Fixes - * Description of DM room with more than two other people is now being displayed correctly ([\#9231](https://github.com/matrix-org/matrix-react-sdk/pull/9231)). Fixes vector-im/element-web#23094. - * Fix voice messages with multiple composers ([\#9208](https://github.com/matrix-org/matrix-react-sdk/pull/9208)). Fixes vector-im/element-web#23023. Contributed by @grimhilt. - * Fix suggested rooms going missing ([\#9236](https://github.com/matrix-org/matrix-react-sdk/pull/9236)). Fixes vector-im/element-web#23190. - * Fix tooltip infinitely recursing ([\#9235](https://github.com/matrix-org/matrix-react-sdk/pull/9235)). Fixes matrix-org/element-web-rageshakes#15107, matrix-org/element-web-rageshakes#15093 matrix-org/element-web-rageshakes#15092 and matrix-org/element-web-rageshakes#15077. - * Fix plain text export saving ([\#9230](https://github.com/matrix-org/matrix-react-sdk/pull/9230)). Contributed by @jryans. - * Add missing space in SecurityRoomSettingsTab ([\#9222](https://github.com/matrix-org/matrix-react-sdk/pull/9222)). Contributed by @gefgu. - * Make use of js-sdk roomNameGenerator to handle i18n for generated room names ([\#9209](https://github.com/matrix-org/matrix-react-sdk/pull/9209)). Fixes vector-im/element-web#21369. - * Fix progress bar regression throughout the app ([\#9219](https://github.com/matrix-org/matrix-react-sdk/pull/9219)). Fixes vector-im/element-web#23121. - * Reuse empty string & space string logic for event types in devtools ([\#9218](https://github.com/matrix-org/matrix-react-sdk/pull/9218)). Fixes vector-im/element-web#23115. - -Changes in [3.53.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.53.0) (2022-08-31) -===================================================================================================== - -## 🔒 Security -* Fix for [CVE-2022-36060](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D36060) - -Find more details at https://matrix.org/blog/2022/08/31/security-releases-matrix-js-sdk-19-4-0-and-matrix-react-sdk-3-53-0 - -## ✨ Features - * Device manager - scroll to filtered list from security recommendations ([\#9227](https://github.com/matrix-org/matrix-react-sdk/pull/9227)). Contributed by @kerryarchibald. - * Device manager - updated dropdown style in filtered device list ([\#9226](https://github.com/matrix-org/matrix-react-sdk/pull/9226)). Contributed by @kerryarchibald. - * Device manager - device type and verification icons on device tile ([\#9197](https://github.com/matrix-org/matrix-react-sdk/pull/9197)). Contributed by @kerryarchibald. - * Ignore unreads in low priority rooms in the space panel ([\#6518](https://github.com/matrix-org/matrix-react-sdk/pull/6518)). Fixes vector-im/element-web#16836. - * Release message right-click context menu out of labs ([\#8613](https://github.com/matrix-org/matrix-react-sdk/pull/8613)). - * Device manager - expandable session details in device list ([\#9188](https://github.com/matrix-org/matrix-react-sdk/pull/9188)). Contributed by @kerryarchibald. - * Device manager - device list filtering ([\#9181](https://github.com/matrix-org/matrix-react-sdk/pull/9181)). Contributed by @kerryarchibald. - * Device manager - add verification details to session details ([\#9187](https://github.com/matrix-org/matrix-react-sdk/pull/9187)). Contributed by @kerryarchibald. - * Device manager - current session expandable details ([\#9185](https://github.com/matrix-org/matrix-react-sdk/pull/9185)). Contributed by @kerryarchibald. - * Device manager - security recommendations section ([\#9179](https://github.com/matrix-org/matrix-react-sdk/pull/9179)). Contributed by @kerryarchibald. - * The Welcome Home Screen: Return Button ([\#9089](https://github.com/matrix-org/matrix-react-sdk/pull/9089)). Fixes vector-im/element-web#22917. Contributed by @justjanne. - * Device manager - label devices as inactive ([\#9175](https://github.com/matrix-org/matrix-react-sdk/pull/9175)). Contributed by @kerryarchibald. - * Device manager - other sessions list ([\#9155](https://github.com/matrix-org/matrix-react-sdk/pull/9155)). Contributed by @kerryarchibald. - * Implement MSC3846: Allowing widgets to access TURN servers ([\#9061](https://github.com/matrix-org/matrix-react-sdk/pull/9061)). - * Allow widgets to send/receive to-device messages ([\#8885](https://github.com/matrix-org/matrix-react-sdk/pull/8885)). - -## 🐛 Bug Fixes - * Add super cool feature ([\#9222](https://github.com/matrix-org/matrix-react-sdk/pull/9222)). Contributed by @gefgu. - * Make use of js-sdk roomNameGenerator to handle i18n for generated room names ([\#9209](https://github.com/matrix-org/matrix-react-sdk/pull/9209)). Fixes vector-im/element-web#21369. - * Fix progress bar regression throughout the app ([\#9219](https://github.com/matrix-org/matrix-react-sdk/pull/9219)). Fixes vector-im/element-web#23121. - * Reuse empty string & space string logic for event types in devtools ([\#9218](https://github.com/matrix-org/matrix-react-sdk/pull/9218)). Fixes vector-im/element-web#23115. - * Reduce amount of requests done by the onboarding task list ([\#9194](https://github.com/matrix-org/matrix-react-sdk/pull/9194)). Fixes vector-im/element-web#23085. Contributed by @justjanne. - * Avoid hardcoding branding in user onboarding ([\#9206](https://github.com/matrix-org/matrix-react-sdk/pull/9206)). Fixes vector-im/element-web#23111. Contributed by @justjanne. - * End jitsi call when member is banned ([\#8879](https://github.com/matrix-org/matrix-react-sdk/pull/8879)). Contributed by @maheichyk. - * Fix context menu being opened when clicking message action bar buttons ([\#9200](https://github.com/matrix-org/matrix-react-sdk/pull/9200)). Fixes vector-im/element-web#22279 and vector-im/element-web#23100. - * Add gap between checkbox and text in report dialog following the same pattern (8px) used in the gap between the two buttons. It fixes vector-im/element-web#23060 ([\#9195](https://github.com/matrix-org/matrix-react-sdk/pull/9195)). Contributed by @gefgu. - * Fix url preview AXE and layout issue & add percy test ([\#9189](https://github.com/matrix-org/matrix-react-sdk/pull/9189)). Fixes vector-im/element-web#23083. - * Wrap long space names ([\#9201](https://github.com/matrix-org/matrix-react-sdk/pull/9201)). Fixes vector-im/element-web#23095. - * Attempt to fix `Failed to execute 'removeChild' on 'Node'` ([\#9196](https://github.com/matrix-org/matrix-react-sdk/pull/9196)). - * Fix soft crash around space hierarchy changing between spaces ([\#9191](https://github.com/matrix-org/matrix-react-sdk/pull/9191)). Fixes matrix-org/element-web-rageshakes#14613. - * Fix soft crash around room view store metrics ([\#9190](https://github.com/matrix-org/matrix-react-sdk/pull/9190)). Fixes matrix-org/element-web-rageshakes#14361. - * Fix the same person appearing multiple times when searching for them. ([\#9177](https://github.com/matrix-org/matrix-react-sdk/pull/9177)). Fixes vector-im/element-web#22851. - * Fix space panel subspace indentation going missing ([\#9167](https://github.com/matrix-org/matrix-react-sdk/pull/9167)). Fixes vector-im/element-web#23049. - * Fix invisible power levels tile when showing hidden events ([\#9162](https://github.com/matrix-org/matrix-react-sdk/pull/9162)). Fixes vector-im/element-web#23013. - * Space panel accessibility improvements ([\#9157](https://github.com/matrix-org/matrix-react-sdk/pull/9157)). Fixes vector-im/element-web#22995. - * Fix inverted logic for showing UserWelcomeTop component ([\#9164](https://github.com/matrix-org/matrix-react-sdk/pull/9164)). Fixes vector-im/element-web#23037. - -Changes in [3.52.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.52.0) (2022-08-16) -===================================================================================================== - -## ✨ Features - * Device manager - New device tile info design ([\#9122](https://github.com/matrix-org/matrix-react-sdk/pull/9122)). Contributed by @kerryarchibald. - * Device manager generic settings subsection component ([\#9147](https://github.com/matrix-org/matrix-react-sdk/pull/9147)). Contributed by @kerryarchibald. - * Migrate the hidden read receipts flag to new "send read receipts" option ([\#9141](https://github.com/matrix-org/matrix-react-sdk/pull/9141)). - * Live location sharing - share location at most every 5 seconds ([\#9148](https://github.com/matrix-org/matrix-react-sdk/pull/9148)). Contributed by @kerryarchibald. - * Increase max length of voice messages to 15m ([\#9133](https://github.com/matrix-org/matrix-react-sdk/pull/9133)). Fixes vector-im/element-web#18620. - * Move pin drop out of labs ([\#9135](https://github.com/matrix-org/matrix-react-sdk/pull/9135)). - * Start DM on first message ([\#8612](https://github.com/matrix-org/matrix-react-sdk/pull/8612)). Fixes vector-im/element-web#14736. - * Remove "Add Space" button from RoomListHeader when user cannot create spaces ([\#9129](https://github.com/matrix-org/matrix-react-sdk/pull/9129)). - * The Welcome Home Screen: Dedicated Download Apps Dialog ([\#9120](https://github.com/matrix-org/matrix-react-sdk/pull/9120)). Fixes vector-im/element-web#22921. Contributed by @justjanne. - * The Welcome Home Screen: "Submit Feedback" pane ([\#9090](https://github.com/matrix-org/matrix-react-sdk/pull/9090)). Fixes vector-im/element-web#22918. Contributed by @justjanne. - * New User Onboarding Task List ([\#9083](https://github.com/matrix-org/matrix-react-sdk/pull/9083)). Fixes vector-im/element-web#22919. Contributed by @justjanne. - * Add support for disabling spell checking ([\#8604](https://github.com/matrix-org/matrix-react-sdk/pull/8604)). Fixes vector-im/element-web#21901. - * Live location share - leave maximised map open when beacons expire ([\#9098](https://github.com/matrix-org/matrix-react-sdk/pull/9098)). Contributed by @kerryarchibald. - -## 🐛 Bug Fixes - * Some slash-commands (`/myroomnick`) have temporarily been disabled before the first message in a DM is sent. ([\#9193](https://github.com/matrix-org/matrix-react-sdk/pull/9193)). - * Use stable reference for active tab in tabbedView ([\#9145](https://github.com/matrix-org/matrix-react-sdk/pull/9145)). Contributed by @kerryarchibald. - * Fix pillification sometimes doubling up ([\#9152](https://github.com/matrix-org/matrix-react-sdk/pull/9152)). Fixes vector-im/element-web#23036. - * Fix composer padding ([\#9137](https://github.com/matrix-org/matrix-react-sdk/pull/9137)). Fixes vector-im/element-web#22992. - * Fix highlights not being applied to plaintext messages ([\#9126](https://github.com/matrix-org/matrix-react-sdk/pull/9126)). Fixes vector-im/element-web#22787. - * Fix dismissing edit composer when change was undone ([\#9109](https://github.com/matrix-org/matrix-react-sdk/pull/9109)). Fixes vector-im/element-web#22932. - * 1-to-1 DM rooms with bots now act like DM rooms instead of multi-user-rooms before ([\#9124](https://github.com/matrix-org/matrix-react-sdk/pull/9124)). Fixes vector-im/element-web#22894. - * Apply inline start padding to selected lines on modern layout only ([\#9006](https://github.com/matrix-org/matrix-react-sdk/pull/9006)). Fixes vector-im/element-web#22768. Contributed by @luixxiul. - * Peek into world-readable rooms from spotlight ([\#9115](https://github.com/matrix-org/matrix-react-sdk/pull/9115)). Fixes vector-im/element-web#22862. - * Use default styling on nested numbered lists due to MD being sensitive ([\#9110](https://github.com/matrix-org/matrix-react-sdk/pull/9110)). Fixes vector-im/element-web#22935. - * Fix replying using chat effect commands ([\#9101](https://github.com/matrix-org/matrix-react-sdk/pull/9101)). Fixes vector-im/element-web#22824. - * The first message in a DM can no longer be a sticker. This has been changed to avoid issues with the integration manager. ([\#9180](https://github.com/matrix-org/matrix-react-sdk/pull/9180)). - -Changes in [3.51.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.51.0) (2022-08-02) -===================================================================================================== - -## ✨ Features - * Live location share - focus on user location on list item click ([\#9051](https://github.com/matrix-org/matrix-react-sdk/pull/9051)). Contributed by @kerryarchibald. - * Live location sharing - don't trigger unread counts for beacon location events ([\#9071](https://github.com/matrix-org/matrix-react-sdk/pull/9071)). Contributed by @kerryarchibald. - * Support for sending voice messages as replies and in threads ([\#9097](https://github.com/matrix-org/matrix-react-sdk/pull/9097)). Fixes vector-im/element-web#22031. - * Add `Reply in thread` button to the right-click message context-menu ([\#9004](https://github.com/matrix-org/matrix-react-sdk/pull/9004)). Fixes vector-im/element-web#22745. - * Starred_Messages_Feature_Contd_II/Outreachy ([\#9086](https://github.com/matrix-org/matrix-react-sdk/pull/9086)). - * Use "frequently used emojis" for autocompletion in composer ([\#8998](https://github.com/matrix-org/matrix-react-sdk/pull/8998)). Fixes vector-im/element-web#18978. Contributed by @grimhilt. - * Improve clickability of view source event toggle button ([\#9068](https://github.com/matrix-org/matrix-react-sdk/pull/9068)). Fixes vector-im/element-web#21856. Contributed by @luixxiul. - * Improve clickability of "collapse" link button on bubble layout ([\#9037](https://github.com/matrix-org/matrix-react-sdk/pull/9037)). Fixes vector-im/element-web#22864. Contributed by @luixxiul. - * Starred_Messages_Feature/Outreachy ([\#8842](https://github.com/matrix-org/matrix-react-sdk/pull/8842)). - * Implement Use Case Selection screen ([\#8984](https://github.com/matrix-org/matrix-react-sdk/pull/8984)). Contributed by @justjanne. - * Live location share - handle insufficient permissions in location sharing ([\#9047](https://github.com/matrix-org/matrix-react-sdk/pull/9047)). Contributed by @kerryarchibald. - * Improve _FilePanel.scss ([\#9031](https://github.com/matrix-org/matrix-react-sdk/pull/9031)). Contributed by @luixxiul. - * Improve spotlight accessibility by adding context menus ([\#8907](https://github.com/matrix-org/matrix-react-sdk/pull/8907)). Fixes vector-im/element-web#20875 and vector-im/element-web#22675. Contributed by @justjanne. - -## 🐛 Bug Fixes - * Replace mask-images with svg components in MessageActionBar ([\#9088](https://github.com/matrix-org/matrix-react-sdk/pull/9088)). Fixes vector-im/element-web#22912. Contributed by @kerryarchibald. - * Unbreak in-app permalink tooltips ([\#9087](https://github.com/matrix-org/matrix-react-sdk/pull/9087)). Fixes vector-im/element-web#22874. - * Show a back button when viewing a space member ([\#9095](https://github.com/matrix-org/matrix-react-sdk/pull/9095)). Fixes vector-im/element-web#22898. - * Align the right edge of info tile lines with normal ones on IRC layout ([\#9058](https://github.com/matrix-org/matrix-react-sdk/pull/9058)). Fixes vector-im/element-web#22871. Contributed by @luixxiul. - * Prevent email verification from overriding existing sessions ([\#9075](https://github.com/matrix-org/matrix-react-sdk/pull/9075)). Fixes vector-im/element-web#22881. Contributed by @justjanne. - * Fix wrong buttons being used when exploring public rooms ([\#9062](https://github.com/matrix-org/matrix-react-sdk/pull/9062)). Fixes vector-im/element-web#22862. - * Re-add padding to generic event list summary on IRC layout ([\#9063](https://github.com/matrix-org/matrix-react-sdk/pull/9063)). Fixes vector-im/element-web#22869. Contributed by @luixxiul. - * Joining federated rooms via the spotlight search should no longer cause a "No known servers" error. ([\#9055](https://github.com/matrix-org/matrix-react-sdk/pull/9055)). Fixes vector-im/element-web#22845. Contributed by @Half-Shot. - -Changes in [3.49.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.49.0) (2022-07-26) -===================================================================================================== - -## ✨ Features - * Hide screenshare button in video rooms on Desktop ([\#9045](https://github.com/matrix-org/matrix-react-sdk/pull/9045)). - * Add a developer command to reset Megolm and Olm sessions ([\#9044](https://github.com/matrix-org/matrix-react-sdk/pull/9044)). - * add spaces to TileErrorBoundary ([\#9012](https://github.com/matrix-org/matrix-react-sdk/pull/9012)). Contributed by @HarHarLinks. - * Location sharing - add localised strings to map ([\#9025](https://github.com/matrix-org/matrix-react-sdk/pull/9025)). Fixes vector-im/element-web#21443. Contributed by @kerryarchibald. - * Added trim to ignore whitespaces in email check ([\#9027](https://github.com/matrix-org/matrix-react-sdk/pull/9027)). Contributed by @ankur12-1610. - * Improve _GenericEventListSummary.scss ([\#9005](https://github.com/matrix-org/matrix-react-sdk/pull/9005)). Contributed by @luixxiul. - * Live location share - tiles without tile server (PSG-591) ([\#8962](https://github.com/matrix-org/matrix-react-sdk/pull/8962)). Contributed by @kerryarchibald. - * Add option to display tooltip on link hover ([\#8394](https://github.com/matrix-org/matrix-react-sdk/pull/8394)). Fixes vector-im/element-web#21907. - * Support a module API surface for custom functionality ([\#8246](https://github.com/matrix-org/matrix-react-sdk/pull/8246)). - * Adjust encryption copy when creating a video room ([\#8989](https://github.com/matrix-org/matrix-react-sdk/pull/8989)). Fixes vector-im/element-web#22737. - * Add bidirectonal isolation for pills ([\#8985](https://github.com/matrix-org/matrix-react-sdk/pull/8985)). Contributed by @sha-265. - * Delabs `Show current avatar and name for users in message history` ([\#8764](https://github.com/matrix-org/matrix-react-sdk/pull/8764)). Fixes vector-im/element-web#22336. - * Live location share - open latest location in map site ([\#8981](https://github.com/matrix-org/matrix-react-sdk/pull/8981)). Contributed by @kerryarchibald. - * Improve LinkPreviewWidget ([\#8881](https://github.com/matrix-org/matrix-react-sdk/pull/8881)). Fixes vector-im/element-web#22634. Contributed by @luixxiul. - * Render HTML topics in rooms on space home ([\#8939](https://github.com/matrix-org/matrix-react-sdk/pull/8939)). - * Hide timestamp on event tiles being edited on every layout ([\#8956](https://github.com/matrix-org/matrix-react-sdk/pull/8956)). Contributed by @luixxiul. - * Introduce new copy icon ([\#8942](https://github.com/matrix-org/matrix-react-sdk/pull/8942)). - * Allow finding group DMs by members in spotlight ([\#8922](https://github.com/matrix-org/matrix-react-sdk/pull/8922)). Fixes vector-im/element-web#22564. Contributed by @justjanne. - * Live location share - explicitly stop beacons replaced beacons ([\#8933](https://github.com/matrix-org/matrix-react-sdk/pull/8933)). Contributed by @kerryarchibald. - * Remove unpin from widget kebab menu ([\#8924](https://github.com/matrix-org/matrix-react-sdk/pull/8924)). - * Live location share - redact related locations on beacon redaction ([\#8926](https://github.com/matrix-org/matrix-react-sdk/pull/8926)). Contributed by @kerryarchibald. - * Live location share - disallow message pinning ([\#8928](https://github.com/matrix-org/matrix-react-sdk/pull/8928)). Contributed by @kerryarchibald. - -## 🐛 Bug Fixes - * Unbreak in-app permalink tooltips ([\#9100](https://github.com/matrix-org/matrix-react-sdk/pull/9100)). - * Add space for the stroke on message editor on IRC layout ([\#9030](https://github.com/matrix-org/matrix-react-sdk/pull/9030)). Fixes vector-im/element-web#22785. Contributed by @luixxiul. - * Fix pinned messages not re-linkifying on edit ([\#9042](https://github.com/matrix-org/matrix-react-sdk/pull/9042)). Fixes vector-im/element-web#22726. - * Don't unnecessarily persist the host signup dialog ([\#9043](https://github.com/matrix-org/matrix-react-sdk/pull/9043)). Fixes vector-im/element-web#22778. - * Fix URL previews causing messages to become unrenderable ([\#9028](https://github.com/matrix-org/matrix-react-sdk/pull/9028)). Fixes vector-im/element-web#22766. - * Fix event list summaries including invalid events ([\#9041](https://github.com/matrix-org/matrix-react-sdk/pull/9041)). Fixes vector-im/element-web#22790. - * Correct accessibility labels for unread rooms in spotlight ([\#9003](https://github.com/matrix-org/matrix-react-sdk/pull/9003)). Contributed by @justjanne. - * Enable search strings highlight on bubble layout ([\#9032](https://github.com/matrix-org/matrix-react-sdk/pull/9032)). Fixes vector-im/element-web#22786. Contributed by @luixxiul. - * Unbreak URL preview for formatted links with tooltips ([\#9022](https://github.com/matrix-org/matrix-react-sdk/pull/9022)). Fixes vector-im/element-web#22764. - * Re-add margin to tiles based on EventTileBubble ([\#9015](https://github.com/matrix-org/matrix-react-sdk/pull/9015)). Fixes vector-im/element-web#22772. Contributed by @luixxiul. - * Fix Shortcut prompt for Search showing in minimized Roomlist ([\#9014](https://github.com/matrix-org/matrix-react-sdk/pull/9014)). Fixes vector-im/element-web#22739. Contributed by @justjanne. - * Fix avatar position on event info line for hidden events on a thread ([\#9019](https://github.com/matrix-org/matrix-react-sdk/pull/9019)). Fixes vector-im/element-web#22777. Contributed by @luixxiul. - * Fix lost padding of event tile info line ([\#9009](https://github.com/matrix-org/matrix-react-sdk/pull/9009)). Fixes vector-im/element-web#22754 and vector-im/element-web#22759. Contributed by @luixxiul. - * Align verification bubble with normal event tiles on IRC layout ([\#9001](https://github.com/matrix-org/matrix-react-sdk/pull/9001)). Fixes vector-im/element-web#22758. Contributed by @luixxiul. - * Ensure timestamp on generic event list summary is not hidden from TimelineCard ([\#9000](https://github.com/matrix-org/matrix-react-sdk/pull/9000)). Fixes vector-im/element-web#22755. Contributed by @luixxiul. - * Fix headings margin on security user settings tab ([\#8826](https://github.com/matrix-org/matrix-react-sdk/pull/8826)). Contributed by @luixxiul. - * Fix timestamp position on file panel ([\#8976](https://github.com/matrix-org/matrix-react-sdk/pull/8976)). Fixes vector-im/element-web#22718. Contributed by @luixxiul. - * Stop using :not() pseudo class for mx_GenericEventListSummary ([\#8944](https://github.com/matrix-org/matrix-react-sdk/pull/8944)). Fixes vector-im/element-web#22602. Contributed by @luixxiul. - * Don't show the same user twice in Spotlight ([\#8978](https://github.com/matrix-org/matrix-react-sdk/pull/8978)). Fixes vector-im/element-web#22697. - * Align the right edge of expand / collapse link buttons of generic event list summary in bubble layout with a variable ([\#8992](https://github.com/matrix-org/matrix-react-sdk/pull/8992)). Fixes vector-im/element-web#22743. Contributed by @luixxiul. - * Display own avatars on search results panel in bubble layout ([\#8990](https://github.com/matrix-org/matrix-react-sdk/pull/8990)). Contributed by @luixxiul. - * Fix text flow of thread summary content on threads list ([\#8991](https://github.com/matrix-org/matrix-react-sdk/pull/8991)). Fixes vector-im/element-web#22738. Contributed by @luixxiul. - * Fix the size of the clickable area of images ([\#8987](https://github.com/matrix-org/matrix-react-sdk/pull/8987)). Fixes vector-im/element-web#22282. - * Fix font size of MessageTimestamp on TimelineCard ([\#8950](https://github.com/matrix-org/matrix-react-sdk/pull/8950)). Contributed by @luixxiul. - * Improve security room settings tab style rules ([\#8844](https://github.com/matrix-org/matrix-react-sdk/pull/8844)). Fixes vector-im/element-web#22575. Contributed by @luixxiul. - * Align E2E icon and avatar of info tile in compact modern layout ([\#8965](https://github.com/matrix-org/matrix-react-sdk/pull/8965)). Fixes vector-im/element-web#22652. Contributed by @luixxiul. - * Fix clickable area of general event list summary toggle ([\#8979](https://github.com/matrix-org/matrix-react-sdk/pull/8979)). Fixes vector-im/element-web#22722. Contributed by @luixxiul. - * Fix resizing room topic ([\#8966](https://github.com/matrix-org/matrix-react-sdk/pull/8966)). Fixes vector-im/element-web#22689. - * Dismiss the search dialogue when starting a DM ([\#8967](https://github.com/matrix-org/matrix-react-sdk/pull/8967)). Fixes vector-im/element-web#22700. - * Fix "greyed out" text style inconsistency on search result panel ([\#8974](https://github.com/matrix-org/matrix-react-sdk/pull/8974)). Contributed by @luixxiul. - * Add top padding to EventTilePreview loader ([\#8977](https://github.com/matrix-org/matrix-react-sdk/pull/8977)). Fixes vector-im/element-web#22719. Contributed by @luixxiul. - * Fix read receipts group position on TimelineCard in compact modern/group layout ([\#8971](https://github.com/matrix-org/matrix-react-sdk/pull/8971)). Fixes vector-im/element-web#22715. Contributed by @luixxiul. - * Fix calls on homeservers without the unstable thirdparty endpoints. ([\#8931](https://github.com/matrix-org/matrix-react-sdk/pull/8931)). Fixes vector-im/element-web#21680. Contributed by @deepbluev7. - * Enable ReplyChain text to be expanded on IRC layout ([\#8959](https://github.com/matrix-org/matrix-react-sdk/pull/8959)). Fixes vector-im/element-web#22709. Contributed by @luixxiul. - * Fix hidden timestamp on message edit history dialog ([\#8955](https://github.com/matrix-org/matrix-react-sdk/pull/8955)). Fixes vector-im/element-web#22701. Contributed by @luixxiul. - * Enable ReplyChain text to be expanded on bubble layout ([\#8958](https://github.com/matrix-org/matrix-react-sdk/pull/8958)). Fixes vector-im/element-web#22709. Contributed by @luixxiul. - * Fix expand/collapse state wrong in metaspaces ([\#8952](https://github.com/matrix-org/matrix-react-sdk/pull/8952)). Fixes vector-im/element-web#22632. - * Location (live) share replies now provide a fallback content ([\#8949](https://github.com/matrix-org/matrix-react-sdk/pull/8949)). - * Fix space settings not opening for script-created spaces ([\#8957](https://github.com/matrix-org/matrix-react-sdk/pull/8957)). Fixes vector-im/element-web#22703. - * Respect `filename` field on `m.file` events ([\#8951](https://github.com/matrix-org/matrix-react-sdk/pull/8951)). - * Fix PlatformSettingsHandler always returning true due to returning a Promise ([\#8954](https://github.com/matrix-org/matrix-react-sdk/pull/8954)). Fixes vector-im/element-web#22616. - * Improve high-contrast support for spotlight ([\#8948](https://github.com/matrix-org/matrix-react-sdk/pull/8948)). Fixes vector-im/element-web#22481. Contributed by @justjanne. - * Fix wrong assertions that all media events have a mimetype ([\#8946](https://github.com/matrix-org/matrix-react-sdk/pull/8946)). Fixes matrix-org/element-web-rageshakes#13727. - * Make invite dialogue fixed height ([\#8934](https://github.com/matrix-org/matrix-react-sdk/pull/8934)). Fixes vector-im/element-web#22659. - * Fix all megolm error reported as unknown ([\#8916](https://github.com/matrix-org/matrix-react-sdk/pull/8916)). - * Remove line-height declarations from _ReplyTile.scss ([\#8932](https://github.com/matrix-org/matrix-react-sdk/pull/8932)). Fixes vector-im/element-web#22687. Contributed by @luixxiul. - * Reduce video rooms log spam ([\#8913](https://github.com/matrix-org/matrix-react-sdk/pull/8913)). - * Correct new search input’s rounded corners ([\#8921](https://github.com/matrix-org/matrix-react-sdk/pull/8921)). Fixes vector-im/element-web#22576. Contributed by @justjanne. - * Align unread notification dot on threads list in compact modern=group layout ([\#8911](https://github.com/matrix-org/matrix-react-sdk/pull/8911)). Fixes vector-im/element-web#22677. Contributed by @luixxiul. - -Changes in [3.48.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.48.0) (2022-07-05) -===================================================================================================== - -## 🚨 BREAKING CHANGES - * Remove Piwik support ([\#8835](https://github.com/matrix-org/matrix-react-sdk/pull/8835)). - -## ✨ Features - * Move New Search Experience out of beta ([\#8859](https://github.com/matrix-org/matrix-react-sdk/pull/8859)). Contributed by @justjanne. - * Switch video rooms to spotlight layout when in PiP mode ([\#8912](https://github.com/matrix-org/matrix-react-sdk/pull/8912)). Fixes vector-im/element-web#22574. - * Live location sharing - render message deleted tile for redacted beacons ([\#8905](https://github.com/matrix-org/matrix-react-sdk/pull/8905)). Contributed by @kerryarchibald. - * Improve view source dialog style ([\#8883](https://github.com/matrix-org/matrix-react-sdk/pull/8883)). Fixes vector-im/element-web#22636. Contributed by @luixxiul. - * Improve integration manager dialog style ([\#8888](https://github.com/matrix-org/matrix-react-sdk/pull/8888)). Fixes vector-im/element-web#22642. Contributed by @luixxiul. - * Implement MSC3827: Filtering of `/publicRooms` by room type ([\#8866](https://github.com/matrix-org/matrix-react-sdk/pull/8866)). Fixes vector-im/element-web#22578. - * Show chat panel when opening a video room with unread messages ([\#8812](https://github.com/matrix-org/matrix-react-sdk/pull/8812)). Fixes vector-im/element-web#22527. - * Live location share - forward latest location ([\#8860](https://github.com/matrix-org/matrix-react-sdk/pull/8860)). Contributed by @kerryarchibald. - * Allow integration managers to validate user identity after opening ([\#8782](https://github.com/matrix-org/matrix-react-sdk/pull/8782)). Contributed by @Half-Shot. - * Create a common header on right panel cards on BaseCard ([\#8808](https://github.com/matrix-org/matrix-react-sdk/pull/8808)). Contributed by @luixxiul. - * Integrate searching public rooms and people into the new search experience ([\#8707](https://github.com/matrix-org/matrix-react-sdk/pull/8707)). Fixes vector-im/element-web#21354 and vector-im/element-web#19349. Contributed by @justjanne. - * Bring back waveform for voice messages and retain seeking ([\#8843](https://github.com/matrix-org/matrix-react-sdk/pull/8843)). Fixes vector-im/element-web#21904. - * Improve colors in settings ([\#7283](https://github.com/matrix-org/matrix-react-sdk/pull/7283)). - * Keep draft in composer when a slash command syntax errors ([\#8811](https://github.com/matrix-org/matrix-react-sdk/pull/8811)). Fixes vector-im/element-web#22384. - * Release video rooms as a beta feature ([\#8431](https://github.com/matrix-org/matrix-react-sdk/pull/8431)). - * Clarify logout key backup warning dialog. Contributed by @notramo. ([\#8741](https://github.com/matrix-org/matrix-react-sdk/pull/8741)). Fixes vector-im/element-web#15565. Contributed by @MadLittleMods. - * Slightly improve the look of the `Message edits` dialog ([\#8763](https://github.com/matrix-org/matrix-react-sdk/pull/8763)). Fixes vector-im/element-web#22410. - * Add support for MD / HTML in room topics ([\#8215](https://github.com/matrix-org/matrix-react-sdk/pull/8215)). Fixes vector-im/element-web#5180. Contributed by @Johennes. - * Live location share - link to timeline tile from share warning ([\#8752](https://github.com/matrix-org/matrix-react-sdk/pull/8752)). Contributed by @kerryarchibald. - * Improve composer visiblity ([\#8578](https://github.com/matrix-org/matrix-react-sdk/pull/8578)). Fixes vector-im/element-web#22072 and vector-im/element-web#17362. - * Makes the avatar of the user menu non-draggable ([\#8765](https://github.com/matrix-org/matrix-react-sdk/pull/8765)). Contributed by @luixxiul. - * Improve widget buttons behaviour and layout ([\#8734](https://github.com/matrix-org/matrix-react-sdk/pull/8734)). - * Use AccessibleButton for 'Reset All' link button on SetupEncryptionBody ([\#8730](https://github.com/matrix-org/matrix-react-sdk/pull/8730)). Contributed by @luixxiul. - * Adjust message timestamp position on TimelineCard in non-bubble layouts ([\#8745](https://github.com/matrix-org/matrix-react-sdk/pull/8745)). Fixes vector-im/element-web#22426. Contributed by @luixxiul. - * Use AccessibleButton for 'In reply to' link button on ReplyChain ([\#8726](https://github.com/matrix-org/matrix-react-sdk/pull/8726)). Fixes vector-im/element-web#22407. Contributed by @luixxiul. - * Live location share - enable reply and react to tiles ([\#8721](https://github.com/matrix-org/matrix-react-sdk/pull/8721)). Contributed by @kerryarchibald. - * Change dash to em dash issues fixed ([\#8455](https://github.com/matrix-org/matrix-react-sdk/pull/8455)). Fixes vector-im/element-web#21895. Contributed by @goelesha. - -## 🐛 Bug Fixes - * Make invite dialogue fixed height ([\#8945](https://github.com/matrix-org/matrix-react-sdk/pull/8945)). - * Correct issue with tab order in new search experience ([\#8919](https://github.com/matrix-org/matrix-react-sdk/pull/8919)). Fixes vector-im/element-web#22670. Contributed by @justjanne. - * Clicking location replies now redirects to the replied event instead of opening the map ([\#8918](https://github.com/matrix-org/matrix-react-sdk/pull/8918)). Fixes vector-im/element-web#22667. - * Keep clicks on pills within the app ([\#8917](https://github.com/matrix-org/matrix-react-sdk/pull/8917)). Fixes vector-im/element-web#22653. - * Don't overlap tile bubbles with timestamps in modern layout ([\#8908](https://github.com/matrix-org/matrix-react-sdk/pull/8908)). Fixes vector-im/element-web#22425. - * Connect to Jitsi unmuted by default ([\#8909](https://github.com/matrix-org/matrix-react-sdk/pull/8909)). - * Maximize width value of display name on TimelineCard with IRC/modern layout ([\#8904](https://github.com/matrix-org/matrix-react-sdk/pull/8904)). Fixes vector-im/element-web#22651. Contributed by @luixxiul. - * Align the avatar and the display name on TimelineCard ([\#8900](https://github.com/matrix-org/matrix-react-sdk/pull/8900)). Contributed by @luixxiul. - * Remove inline margin from reactions row on IRC layout ([\#8891](https://github.com/matrix-org/matrix-react-sdk/pull/8891)). Fixes vector-im/element-web#22644. Contributed by @luixxiul. - * Align "From a thread" on search result panel on IRC layout ([\#8892](https://github.com/matrix-org/matrix-react-sdk/pull/8892)). Fixes vector-im/element-web#22645. Contributed by @luixxiul. - * Display description of E2E advanced panel as subsection text ([\#8889](https://github.com/matrix-org/matrix-react-sdk/pull/8889)). Contributed by @luixxiul. - * Remove inline end margin from images on file panel ([\#8886](https://github.com/matrix-org/matrix-react-sdk/pull/8886)). Fixes vector-im/element-web#22640. Contributed by @luixxiul. - * Disable option to `Quote` when we don't have sufficient permissions ([\#8893](https://github.com/matrix-org/matrix-react-sdk/pull/8893)). Fixes vector-im/element-web#22643. - * Add padding to font scaling loader for message bubble layout ([\#8875](https://github.com/matrix-org/matrix-react-sdk/pull/8875)). Fixes vector-im/element-web#22626. Contributed by @luixxiul. - * Set 100% max-width to display name on reply tiles ([\#8867](https://github.com/matrix-org/matrix-react-sdk/pull/8867)). Fixes vector-im/element-web#22615. Contributed by @luixxiul. - * Fix alignment of pill letter ([\#8874](https://github.com/matrix-org/matrix-react-sdk/pull/8874)). Fixes vector-im/element-web#22622. Contributed by @luixxiul. - * Move the beta pill to the right side and display the pill on video room only ([\#8873](https://github.com/matrix-org/matrix-react-sdk/pull/8873)). Fixes vector-im/element-web#22619 and vector-im/element-web#22620. Contributed by @luixxiul. - * Stop using absolute property to place beta pill on RoomPreviewCard ([\#8872](https://github.com/matrix-org/matrix-react-sdk/pull/8872)). Fixes vector-im/element-web#22617. Contributed by @luixxiul. - * Make the pill text single line ([\#8744](https://github.com/matrix-org/matrix-react-sdk/pull/8744)). Fixes vector-im/element-web#22427. Contributed by @luixxiul. - * Hide overflow of public room description on spotlight dialog result ([\#8870](https://github.com/matrix-org/matrix-react-sdk/pull/8870)). Contributed by @luixxiul. - * Fix position of message action bar on the info tile on TimelineCard in message bubble layout ([\#8865](https://github.com/matrix-org/matrix-react-sdk/pull/8865)). Fixes vector-im/element-web#22614. Contributed by @luixxiul. - * Remove inline start margin from display name on reply tiles on TimelineCard ([\#8864](https://github.com/matrix-org/matrix-react-sdk/pull/8864)). Fixes vector-im/element-web#22613. Contributed by @luixxiul. - * Improve homeserver dropdown dialog styling ([\#8850](https://github.com/matrix-org/matrix-react-sdk/pull/8850)). Fixes vector-im/element-web#22552. Contributed by @justjanne. - * Fix crash when drawing blurHash for portrait videos PSB-139 ([\#8855](https://github.com/matrix-org/matrix-react-sdk/pull/8855)). Fixes vector-im/element-web#22597. Contributed by @andybalaam. - * Fix grid blowout on pinned event tiles ([\#8816](https://github.com/matrix-org/matrix-react-sdk/pull/8816)). Fixes vector-im/element-web#22543. Contributed by @luixxiul. - * Fix temporary sync errors if there's weird settings stored in account data ([\#8857](https://github.com/matrix-org/matrix-react-sdk/pull/8857)). - * Fix reactions row overflow and gap between reactions ([\#8813](https://github.com/matrix-org/matrix-react-sdk/pull/8813)). Fixes vector-im/element-web#22093. Contributed by @luixxiul. - * Fix issues with the Create new room button in Spotlight ([\#8851](https://github.com/matrix-org/matrix-react-sdk/pull/8851)). Contributed by @justjanne. - * Remove margin from E2E icon between avatar and hidden event ([\#8584](https://github.com/matrix-org/matrix-react-sdk/pull/8584)). Fixes vector-im/element-web#22186. Contributed by @luixxiul. - * Fix waveform on a message bubble ([\#8852](https://github.com/matrix-org/matrix-react-sdk/pull/8852)). Contributed by @luixxiul. - * Location sharing maps are now loaded after reconnection ([\#8848](https://github.com/matrix-org/matrix-react-sdk/pull/8848)). Fixes vector-im/element-web#20993. - * Update the avatar mask so it doesn’t cut off spaces’ avatars anymore ([\#8849](https://github.com/matrix-org/matrix-react-sdk/pull/8849)). Contributed by @justjanne. - * Add a bit of safety around timestamp handling for threads ([\#8845](https://github.com/matrix-org/matrix-react-sdk/pull/8845)). - * Remove top margin from event tile on a narrow viewport ([\#8814](https://github.com/matrix-org/matrix-react-sdk/pull/8814)). Contributed by @luixxiul. - * Fix keyboard shortcuts on settings tab being wrapped ([\#8825](https://github.com/matrix-org/matrix-react-sdk/pull/8825)). Fixes vector-im/element-web#22547. Contributed by @luixxiul. - * Add try-catch around blurhash loading ([\#8830](https://github.com/matrix-org/matrix-react-sdk/pull/8830)). - * Prevent new composer from overflowing from non-breakable text ([\#8829](https://github.com/matrix-org/matrix-react-sdk/pull/8829)). Fixes vector-im/element-web#22507. Contributed by @justjanne. - * Use common subheading on sidebar user settings tab ([\#8823](https://github.com/matrix-org/matrix-react-sdk/pull/8823)). Contributed by @luixxiul. - * Fix clickable area of advanced toggle on appearance user settings tab ([\#8820](https://github.com/matrix-org/matrix-react-sdk/pull/8820)). Fixes vector-im/element-web#22546. Contributed by @luixxiul. - * Disable redacting reactions if we don't have sufficient permissions ([\#8767](https://github.com/matrix-org/matrix-react-sdk/pull/8767)). Fixes vector-im/element-web#22262. - * Update the live timeline when the JS SDK resets it ([\#8806](https://github.com/matrix-org/matrix-react-sdk/pull/8806)). Fixes vector-im/element-web#22421. - * Fix flex blowout on image reply ([\#8809](https://github.com/matrix-org/matrix-react-sdk/pull/8809)). Fixes vector-im/element-web#22509 and vector-im/element-web#22510. Contributed by @luixxiul. - * Enable background color on hover for chat panel and thread panel ([\#8644](https://github.com/matrix-org/matrix-react-sdk/pull/8644)). Fixes vector-im/element-web#22273. Contributed by @luixxiul. - * Fix #20026: send read marker as soon as we change it ([\#8802](https://github.com/matrix-org/matrix-react-sdk/pull/8802)). Fixes vector-im/element-web#20026. Contributed by @andybalaam. - * Allow AppTiles to shrink as much as necessary ([\#8805](https://github.com/matrix-org/matrix-react-sdk/pull/8805)). Fixes vector-im/element-web#22499. - * Make widgets in video rooms immutable again ([\#8803](https://github.com/matrix-org/matrix-react-sdk/pull/8803)). Fixes vector-im/element-web#22497. - * Use MessageActionBar style declarations on pinned message card ([\#8757](https://github.com/matrix-org/matrix-react-sdk/pull/8757)). Fixes vector-im/element-web#22444. Contributed by @luixxiul. - * Expire video member events after 1 hour ([\#8776](https://github.com/matrix-org/matrix-react-sdk/pull/8776)). - * Name lists on invite dialog ([\#8046](https://github.com/matrix-org/matrix-react-sdk/pull/8046)). Fixes vector-im/element-web#21400 and vector-im/element-web#19463. Contributed by @luixxiul. - * Live location share - show loading UI for beacons with start timestamp in the future ([\#8775](https://github.com/matrix-org/matrix-react-sdk/pull/8775)). Fixes vector-im/element-web#22437. Contributed by @kerryarchibald. - * Fix scroll jump issue with the composer ([\#8788](https://github.com/matrix-org/matrix-react-sdk/pull/8788)). Fixes vector-im/element-web#22464. - * Fix the incorrect nesting of download button on MessageActionBar ([\#8785](https://github.com/matrix-org/matrix-react-sdk/pull/8785)). Contributed by @luixxiul. - * Revert link color change in composer ([\#8784](https://github.com/matrix-org/matrix-react-sdk/pull/8784)). Fixes vector-im/element-web#22468. - * Fix 'Logout' inline link on the splash screen ([\#8770](https://github.com/matrix-org/matrix-react-sdk/pull/8770)). Fixes vector-im/element-web#22449. Contributed by @luixxiul. - * Fix disappearing widget poput button when changing the widget layout ([\#8754](https://github.com/matrix-org/matrix-react-sdk/pull/8754)). - * Reduce gutter with the new read receipt UI ([\#8736](https://github.com/matrix-org/matrix-react-sdk/pull/8736)). Fixes vector-im/element-web#21890. - * Add ellipsis effect to hidden beacon status ([\#8755](https://github.com/matrix-org/matrix-react-sdk/pull/8755)). Fixes vector-im/element-web#22441. Contributed by @luixxiul. - * Make the pill on the basic message composer compatible with display name in RTL languages ([\#8758](https://github.com/matrix-org/matrix-react-sdk/pull/8758)). Fixes vector-im/element-web#22445. Contributed by @luixxiul. - * Prevent the banner text from being selected, replacing the spacing values with the variable ([\#8756](https://github.com/matrix-org/matrix-react-sdk/pull/8756)). Fixes vector-im/element-web#22442. Contributed by @luixxiul. - * Ensure the first device on a newly-registered account gets cross-signed properly ([\#8750](https://github.com/matrix-org/matrix-react-sdk/pull/8750)). Fixes vector-im/element-web#21977. Contributed by @duxovni. - * Hide live location option in threads composer ([\#8746](https://github.com/matrix-org/matrix-react-sdk/pull/8746)). Fixes vector-im/element-web#22424. Contributed by @kerryarchibald. - * Make sure MessageTimestamp is not hidden by EventTile_line on TimelineCard ([\#8748](https://github.com/matrix-org/matrix-react-sdk/pull/8748)). Contributed by @luixxiul. - * Make PiP motion smoother and react to window resizes correctly ([\#8747](https://github.com/matrix-org/matrix-react-sdk/pull/8747)). Fixes vector-im/element-web#22292. - * Prevent Invite and DevTools dialogs from being cut off ([\#8646](https://github.com/matrix-org/matrix-react-sdk/pull/8646)). Fixes vector-im/element-web#20911 and undefined/matrix-react-sdk#8165. Contributed by @justjanne. - * Squish event bubble tiles less ([\#8740](https://github.com/matrix-org/matrix-react-sdk/pull/8740)). - * Use random widget IDs for video rooms ([\#8739](https://github.com/matrix-org/matrix-react-sdk/pull/8739)). Fixes vector-im/element-web#22417. - * Fix read avatars overflow from the right chat panel with a maximized widget on bubble message layout ([\#8470](https://github.com/matrix-org/matrix-react-sdk/pull/8470)). Contributed by @luixxiul. - * Fix `CallView` crash ([\#8735](https://github.com/matrix-org/matrix-react-sdk/pull/8735)). Fixes vector-im/element-web#22394. - -Changes in [3.47.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.47.0) (2022-06-14) -===================================================================================================== - -## 🐛 Bug Fixes - * Fix CallView crash ([\#8735](https://github.com/matrix-org/matrix-react-sdk/pull/8735)). Contributed by @SimonBrandner. - * Fix missing element desktop preferences ([\#8798](https://github.com/matrix-org/matrix-react-sdk/pull/8798)). Contributed by @t3chguy. - - -Changes in [3.46.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.46.0) (2022-06-07) -===================================================================================================== - -## ✨ Features - * Configure custom home.html via `.well-known/matrix/client["io.element.embedded_pages"]["home_url"]` for all your element-web/desktop users ([\#7790](https://github.com/matrix-org/matrix-react-sdk/pull/7790)). Contributed by @johannes-krude. - * Live location sharing - open location in OpenStreetMap ([\#8695](https://github.com/matrix-org/matrix-react-sdk/pull/8695)). Contributed by @kerryarchibald. - * Show a dialog when Jitsi encounters an error ([\#8701](https://github.com/matrix-org/matrix-react-sdk/pull/8701)). Fixes vector-im/element-web#22284. - * Add support for setting the `avatar_url` of widgets by integration managers. ([\#8550](https://github.com/matrix-org/matrix-react-sdk/pull/8550)). Contributed by @Fox32. - * Add an option to ignore (block) a user when reporting their events ([\#8471](https://github.com/matrix-org/matrix-react-sdk/pull/8471)). - * Add the option to disable hardware acceleration ([\#8655](https://github.com/matrix-org/matrix-react-sdk/pull/8655)). Contributed by @novocaine. - * Slightly better presentation of read receipts to screen reader users ([\#8662](https://github.com/matrix-org/matrix-react-sdk/pull/8662)). Fixes vector-im/element-web#22293. Contributed by @pvagner. - * Add jump to related event context menu item ([\#6775](https://github.com/matrix-org/matrix-react-sdk/pull/6775)). Fixes vector-im/element-web#19883. - * Add public room directory hook ([\#8626](https://github.com/matrix-org/matrix-react-sdk/pull/8626)). - -## 🐛 Bug Fixes - * Remove inline margin from UTD error message inside a reply tile on ThreadView ([\#8708](https://github.com/matrix-org/matrix-react-sdk/pull/8708)). Fixes vector-im/element-web#22376. Contributed by @luixxiul. - * Move unread notification dots of the threads list to the expected position ([\#8700](https://github.com/matrix-org/matrix-react-sdk/pull/8700)). Fixes vector-im/element-web#22350. Contributed by @luixxiul. - * Prevent overflow of grid items on a bubble with UTD generally ([\#8697](https://github.com/matrix-org/matrix-react-sdk/pull/8697)). Contributed by @luixxiul. - * Create 'Unable To Decrypt' grid layout for hidden events on a bubble layout ([\#8704](https://github.com/matrix-org/matrix-react-sdk/pull/8704)). Fixes vector-im/element-web#22365. Contributed by @luixxiul. - * Fix - AccessibleButton does not set disabled attribute ([\#8682](https://github.com/matrix-org/matrix-react-sdk/pull/8682)). Contributed by @kerryarchibald. - * Fix font not resetting when logging out ([\#8670](https://github.com/matrix-org/matrix-react-sdk/pull/8670)). Fixes vector-im/element-web#17228. - * Fix local aliases section of room settings not working for some homeservers (ie ([\#8698](https://github.com/matrix-org/matrix-react-sdk/pull/8698)). Fixes vector-im/element-web#22337. - * Align EventTile_line with display name on message bubble ([\#8692](https://github.com/matrix-org/matrix-react-sdk/pull/8692)). Fixes vector-im/element-web#22343. Contributed by @luixxiul. - * Convert references to direct chat -> direct message ([\#8694](https://github.com/matrix-org/matrix-react-sdk/pull/8694)). Contributed by @novocaine. - * Improve combining diacritics for U+20D0 to U+20F0 in Chrome ([\#8687](https://github.com/matrix-org/matrix-react-sdk/pull/8687)). - * Make the empty thread panel fill BaseCard ([\#8690](https://github.com/matrix-org/matrix-react-sdk/pull/8690)). Fixes vector-im/element-web#22338. Contributed by @luixxiul. - * Fix edge case around composer handling gendered facepalm emoji ([\#8686](https://github.com/matrix-org/matrix-react-sdk/pull/8686)). - * Fix a grid blowout due to nowrap displayName on a bubble with UTD ([\#8688](https://github.com/matrix-org/matrix-react-sdk/pull/8688)). Fixes vector-im/element-web#21914. Contributed by @luixxiul. - * Apply the same max-width to image tile on the thread timeline as message bubble ([\#8669](https://github.com/matrix-org/matrix-react-sdk/pull/8669)). Fixes vector-im/element-web#22313. Contributed by @luixxiul. - * Fix dropdown button size for picture-in-picture CallView ([\#8680](https://github.com/matrix-org/matrix-react-sdk/pull/8680)). Fixes vector-im/element-web#22316. Contributed by @luixxiul. - * Live location sharing - fix square border for image-less avatar (PSF-1052) ([\#8679](https://github.com/matrix-org/matrix-react-sdk/pull/8679)). Contributed by @kerryarchibald. - * Stop connecting to a video room if the widget messaging disappears ([\#8660](https://github.com/matrix-org/matrix-react-sdk/pull/8660)). - * Fix file button and audio player overflowing from message bubble ([\#8666](https://github.com/matrix-org/matrix-react-sdk/pull/8666)). Fixes vector-im/element-web#22308. Contributed by @luixxiul. - * Don't show broken composer format bar when selection is whitespace ([\#8673](https://github.com/matrix-org/matrix-react-sdk/pull/8673)). Fixes vector-im/element-web#10788. - * Fix media upload http 413 handling ([\#8674](https://github.com/matrix-org/matrix-react-sdk/pull/8674)). - * Fix emoji picker for editing thread responses ([\#8671](https://github.com/matrix-org/matrix-react-sdk/pull/8671)). Fixes matrix-org/element-web-rageshakes#13129. - * Map attribution while sharing live location is now visible ([\#8621](https://github.com/matrix-org/matrix-react-sdk/pull/8621)). Fixes vector-im/element-web#22236. Contributed by @weeman1337. - * Fix info tile overlapping the time stamp on TimelineCard ([\#8639](https://github.com/matrix-org/matrix-react-sdk/pull/8639)). Fixes vector-im/element-web#22256. Contributed by @luixxiul. - * Fix position of wide images on IRC / modern layout ([\#8667](https://github.com/matrix-org/matrix-react-sdk/pull/8667)). Fixes vector-im/element-web#22309. Contributed by @luixxiul. - * Fix other user's displayName being wrapped on the bubble message layout ([\#8456](https://github.com/matrix-org/matrix-react-sdk/pull/8456)). Fixes vector-im/element-web#22004. Contributed by @luixxiul. - * Set spacing declarations to elements in mx_EventTile_mediaLine ([\#8665](https://github.com/matrix-org/matrix-react-sdk/pull/8665)). Fixes vector-im/element-web#22307. Contributed by @luixxiul. - * Fix wide image overflowing from the thumbnail container ([\#8663](https://github.com/matrix-org/matrix-react-sdk/pull/8663)). Fixes vector-im/element-web#22303. Contributed by @luixxiul. - * Fix styles of "Show all" link button on ReactionsRow ([\#8658](https://github.com/matrix-org/matrix-react-sdk/pull/8658)). Fixes vector-im/element-web#22300. Contributed by @luixxiul. - * Automatically log in after registration ([\#8654](https://github.com/matrix-org/matrix-react-sdk/pull/8654)). Fixes vector-im/element-web#19305. Contributed by @justjanne. - * Fix offline status in window title not working reliably ([\#8656](https://github.com/matrix-org/matrix-react-sdk/pull/8656)). - * Align input area with event body's first letter in a thread on IRC/modern layout ([\#8636](https://github.com/matrix-org/matrix-react-sdk/pull/8636)). Fixes vector-im/element-web#22252. Contributed by @luixxiul. - * Fix crash on null idp for SSO buttons ([\#8650](https://github.com/matrix-org/matrix-react-sdk/pull/8650)). Contributed by @hughns. - * Don't open the regular browser or our context menu on right-clicking the `Options` button in the message action bar ([\#8648](https://github.com/matrix-org/matrix-react-sdk/pull/8648)). Fixes vector-im/element-web#22279. - * Show notifications even when Element is focused ([\#8590](https://github.com/matrix-org/matrix-react-sdk/pull/8590)). Contributed by @sumnerevans. - * Remove padding from the buttons on edit message composer of a event tile on a thread ([\#8632](https://github.com/matrix-org/matrix-react-sdk/pull/8632)). Contributed by @luixxiul. - * ensure metaspace changes correctly notify listeners ([\#8611](https://github.com/matrix-org/matrix-react-sdk/pull/8611)). Fixes vector-im/element-web#21006. Contributed by @justjanne. - * Hide image banner on stickers, they have a tooltip already ([\#8641](https://github.com/matrix-org/matrix-react-sdk/pull/8641)). Fixes vector-im/element-web#22244. - * Adjust EditMessageComposer style declarations ([\#8631](https://github.com/matrix-org/matrix-react-sdk/pull/8631)). Fixes vector-im/element-web#22231. Contributed by @luixxiul. - -Changes in [3.45.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.45.0) (2022-05-24) -===================================================================================================== - -## ✨ Features - * Go to space landing page when clicking on a selected space ([\#6442](https://github.com/matrix-org/matrix-react-sdk/pull/6442)). Fixes vector-im/element-web#20296. - * Fall back to untranslated string rather than showing missing translation error ([\#8609](https://github.com/matrix-org/matrix-react-sdk/pull/8609)). - * Show file name and size on images on hover ([\#6511](https://github.com/matrix-org/matrix-react-sdk/pull/6511)). Fixes vector-im/element-web#18197. - * Iterate on search results for message bubbles ([\#7047](https://github.com/matrix-org/matrix-react-sdk/pull/7047)). Fixes vector-im/element-web#20315. - * registration: redesign email verification page ([\#8554](https://github.com/matrix-org/matrix-react-sdk/pull/8554)). Fixes vector-im/element-web#21984. - * Show full thread message in hover title on thread summary ([\#8568](https://github.com/matrix-org/matrix-react-sdk/pull/8568)). Fixes vector-im/element-web#22037. - * Tweak video rooms copy ([\#8582](https://github.com/matrix-org/matrix-react-sdk/pull/8582)). Fixes vector-im/element-web#22176. - * Live location share - beacon tooltip in maximised view ([\#8572](https://github.com/matrix-org/matrix-react-sdk/pull/8572)). - * Add dialog to navigate long room topics ([\#8517](https://github.com/matrix-org/matrix-react-sdk/pull/8517)). Fixes vector-im/element-web#9623. - * Change spaceroomfacepile tooltip if memberlist is shown ([\#8571](https://github.com/matrix-org/matrix-react-sdk/pull/8571)). Fixes vector-im/element-web#17406. - * Improve message editing UI ([\#8483](https://github.com/matrix-org/matrix-react-sdk/pull/8483)). Fixes vector-im/element-web#9752 and vector-im/element-web#22108. - * Make date changes more obvious ([\#6410](https://github.com/matrix-org/matrix-react-sdk/pull/6410)). Fixes vector-im/element-web#16221. - * Enable forwarding static locations ([\#8553](https://github.com/matrix-org/matrix-react-sdk/pull/8553)). - * Log `TimelinePanel` debugging info when opening the bug report modal ([\#8502](https://github.com/matrix-org/matrix-react-sdk/pull/8502)). - * Improve welcome screen, add opt-out analytics ([\#8474](https://github.com/matrix-org/matrix-react-sdk/pull/8474)). Fixes vector-im/element-web#21946. - * Converting selected text to MD link when pasting a URL ([\#8242](https://github.com/matrix-org/matrix-react-sdk/pull/8242)). Fixes vector-im/element-web#21634. Contributed by @Sinharitik589. - * Support Inter on custom themes ([\#8399](https://github.com/matrix-org/matrix-react-sdk/pull/8399)). Fixes vector-im/element-web#16293. - * Add a `Copy link` button to the right-click message context-menu labs feature ([\#8527](https://github.com/matrix-org/matrix-react-sdk/pull/8527)). - * Move widget screenshots labs flag to devtools ([\#8522](https://github.com/matrix-org/matrix-react-sdk/pull/8522)). - * Remove some labs features which don't get used or create maintenance burden: custom status, multiple integration managers, and do not disturb ([\#8521](https://github.com/matrix-org/matrix-react-sdk/pull/8521)). - * Add a way to toggle `ScrollPanel` and `TimelinePanel` debug logs ([\#8513](https://github.com/matrix-org/matrix-react-sdk/pull/8513)). - * Spaces: remove blue beta dot ([\#8511](https://github.com/matrix-org/matrix-react-sdk/pull/8511)). Fixes vector-im/element-web#22061. - * Order new search dialog results by recency ([\#8444](https://github.com/matrix-org/matrix-react-sdk/pull/8444)). - * Improve pills ([\#6398](https://github.com/matrix-org/matrix-react-sdk/pull/6398)). Fixes vector-im/element-web#16948 and vector-im/element-web#21281. - * Add a way to maximize/pin widget from the PiP view ([\#7672](https://github.com/matrix-org/matrix-react-sdk/pull/7672)). Fixes vector-im/element-web#20723. - * Iterate video room designs in labs ([\#8499](https://github.com/matrix-org/matrix-react-sdk/pull/8499)). - * Improve UI/UX in calls ([\#7791](https://github.com/matrix-org/matrix-react-sdk/pull/7791)). Fixes vector-im/element-web#19937. - * Add ability to change audio and video devices during a call ([\#7173](https://github.com/matrix-org/matrix-react-sdk/pull/7173)). Fixes vector-im/element-web#15595. - -## 🐛 Bug Fixes - * Fix click behavior of notification badges on spaces ([\#8627](https://github.com/matrix-org/matrix-react-sdk/pull/8627)). Fixes vector-im/element-web#22241. - * Add missing return values in Read Receipt animation code ([\#8625](https://github.com/matrix-org/matrix-react-sdk/pull/8625)). Fixes vector-im/element-web#22175. - * Fix 'continue' button not working after accepting identity server terms of service ([\#8619](https://github.com/matrix-org/matrix-react-sdk/pull/8619)). Fixes vector-im/element-web#20003. - * Proactively fix stuck devices in video rooms ([\#8587](https://github.com/matrix-org/matrix-react-sdk/pull/8587)). Fixes vector-im/element-web#22131. - * Fix position of the message action bar on left side bubbles ([\#8398](https://github.com/matrix-org/matrix-react-sdk/pull/8398)). Fixes vector-im/element-web#21879. Contributed by @luixxiul. - * Fix edge case thread summaries around events without a msgtype ([\#8576](https://github.com/matrix-org/matrix-react-sdk/pull/8576)). - * Fix favourites metaspace not updating ([\#8594](https://github.com/matrix-org/matrix-react-sdk/pull/8594)). Fixes vector-im/element-web#22156. - * Stop spaces from displaying as rooms in new breadcrumbs ([\#8595](https://github.com/matrix-org/matrix-react-sdk/pull/8595)). Fixes vector-im/element-web#22165. - * Fix avatar position of hidden event on ThreadView ([\#8592](https://github.com/matrix-org/matrix-react-sdk/pull/8592)). Fixes vector-im/element-web#22199. Contributed by @luixxiul. - * Fix MessageTimestamp position next to redacted messages on IRC/modern layout ([\#8591](https://github.com/matrix-org/matrix-react-sdk/pull/8591)). Fixes vector-im/element-web#22181. Contributed by @luixxiul. - * Fix padding of messages in threads ([\#8574](https://github.com/matrix-org/matrix-react-sdk/pull/8574)). Contributed by @luixxiul. - * Enable overflow of hidden events content ([\#8585](https://github.com/matrix-org/matrix-react-sdk/pull/8585)). Fixes vector-im/element-web#22187. Contributed by @luixxiul. - * Increase composer line height to avoid cutting off emoji ([\#8583](https://github.com/matrix-org/matrix-react-sdk/pull/8583)). Fixes vector-im/element-web#22170. - * Don't consider threads for breaking continuation until actually created ([\#8581](https://github.com/matrix-org/matrix-react-sdk/pull/8581)). Fixes vector-im/element-web#22164. - * Fix displaying hidden events on threads ([\#8555](https://github.com/matrix-org/matrix-react-sdk/pull/8555)). Fixes vector-im/element-web#22058. Contributed by @luixxiul. - * Fix button width and align 絵文字 (emoji) on the user panel ([\#8562](https://github.com/matrix-org/matrix-react-sdk/pull/8562)). Fixes vector-im/element-web#22142. Contributed by @luixxiul. - * Standardise the margin for settings tabs ([\#7963](https://github.com/matrix-org/matrix-react-sdk/pull/7963)). Fixes vector-im/element-web#20767. Contributed by @yuktea. - * Fix room history not being visible even if we have historical keys ([\#8563](https://github.com/matrix-org/matrix-react-sdk/pull/8563)). Fixes vector-im/element-web#16983. - * Fix oblong avatars in video room lobbies ([\#8565](https://github.com/matrix-org/matrix-react-sdk/pull/8565)). - * Update thread summary when latest event gets decrypted ([\#8564](https://github.com/matrix-org/matrix-react-sdk/pull/8564)). Fixes vector-im/element-web#22151. - * Fix codepath which can wrongly cause automatic space switch from all rooms ([\#8560](https://github.com/matrix-org/matrix-react-sdk/pull/8560)). Fixes vector-im/element-web#21373. - * Fix effect of URL preview toggle not updating live ([\#8561](https://github.com/matrix-org/matrix-react-sdk/pull/8561)). Fixes vector-im/element-web#22148. - * Fix visual bugs on AccessSecretStorageDialog ([\#8160](https://github.com/matrix-org/matrix-react-sdk/pull/8160)). Fixes vector-im/element-web#19426. Contributed by @luixxiul. - * Fix the width bounce of the clock on the AudioPlayer ([\#8320](https://github.com/matrix-org/matrix-react-sdk/pull/8320)). Fixes vector-im/element-web#21788. Contributed by @luixxiul. - * Hide the verification left stroke only on the thread list ([\#8525](https://github.com/matrix-org/matrix-react-sdk/pull/8525)). Fixes vector-im/element-web#22132. Contributed by @luixxiul. - * Hide recently_viewed dropdown when other modal opens ([\#8538](https://github.com/matrix-org/matrix-react-sdk/pull/8538)). Contributed by @yaya-usman. - * Only jump to date after pressing the 'go' button ([\#8548](https://github.com/matrix-org/matrix-react-sdk/pull/8548)). Fixes vector-im/element-web#20799. - * Fix download button not working on events that were decrypted too late ([\#8556](https://github.com/matrix-org/matrix-react-sdk/pull/8556)). Fixes vector-im/element-web#19427. - * Align thread summary button with bubble messages on the left side ([\#8388](https://github.com/matrix-org/matrix-react-sdk/pull/8388)). Fixes vector-im/element-web#21873. Contributed by @luixxiul. - * Fix unresponsive notification toggles ([\#8549](https://github.com/matrix-org/matrix-react-sdk/pull/8549)). Fixes vector-im/element-web#22109. - * Set color-scheme property in themes ([\#8547](https://github.com/matrix-org/matrix-react-sdk/pull/8547)). Fixes vector-im/element-web#22124. - * Improve the styling of error messages during search initialization. ([\#6899](https://github.com/matrix-org/matrix-react-sdk/pull/6899)). Fixes vector-im/element-web#19245 and vector-im/element-web#18164. Contributed by @KalleStruik. - * Don't leave button tooltips open when closing modals ([\#8546](https://github.com/matrix-org/matrix-react-sdk/pull/8546)). Fixes vector-im/element-web#22121. - * update matrix-analytics-events ([\#8543](https://github.com/matrix-org/matrix-react-sdk/pull/8543)). - * Handle Jitsi Meet crashes more gracefully ([\#8541](https://github.com/matrix-org/matrix-react-sdk/pull/8541)). - * Fix regression around pasting links ([\#8537](https://github.com/matrix-org/matrix-react-sdk/pull/8537)). Fixes vector-im/element-web#22117. - * Fixes suggested room not ellipsized on shrinking ([\#8536](https://github.com/matrix-org/matrix-react-sdk/pull/8536)). Contributed by @yaya-usman. - * Add global spacing between display name and location body ([\#8523](https://github.com/matrix-org/matrix-react-sdk/pull/8523)). Fixes vector-im/element-web#22111. Contributed by @luixxiul. - * Add box-shadow to the reply preview on the main (left) panel only ([\#8397](https://github.com/matrix-org/matrix-react-sdk/pull/8397)). Fixes vector-im/element-web#21894. Contributed by @luixxiul. - * Set line-height: 1 to RedactedBody inside GenericEventListSummary for IRC/modern layout ([\#8529](https://github.com/matrix-org/matrix-react-sdk/pull/8529)). Fixes vector-im/element-web#22112. Contributed by @luixxiul. - * Fix position of timestamp on the chat panel in IRC layout and message edits history modal window ([\#8464](https://github.com/matrix-org/matrix-react-sdk/pull/8464)). Fixes vector-im/element-web#22011 and vector-im/element-web#22014. Contributed by @luixxiul. - * Fix unexpected and inconsistent inheritance of line-height property for mx_TextualEvent ([\#8485](https://github.com/matrix-org/matrix-react-sdk/pull/8485)). Fixes vector-im/element-web#22041. Contributed by @luixxiul. - * Set the same margin to the right side of NewRoomIntro on TimelineCard ([\#8453](https://github.com/matrix-org/matrix-react-sdk/pull/8453)). Contributed by @luixxiul. - * Remove duplicate tooltip from user pills ([\#8512](https://github.com/matrix-org/matrix-react-sdk/pull/8512)). - * Set max-width for MLocationBody and MLocationBody_map by default ([\#8519](https://github.com/matrix-org/matrix-react-sdk/pull/8519)). Fixes vector-im/element-web#21983. Contributed by @luixxiul. - * Simplify ReplyPreview UI implementation ([\#8516](https://github.com/matrix-org/matrix-react-sdk/pull/8516)). Fixes vector-im/element-web#22091. Contributed by @luixxiul. - * Fix thread summary overflow on narrow message panel on bubble message layout ([\#8520](https://github.com/matrix-org/matrix-react-sdk/pull/8520)). Fixes vector-im/element-web#22097. Contributed by @luixxiul. - * Live location sharing - refresh beacon timers on tab becoming active ([\#8515](https://github.com/matrix-org/matrix-react-sdk/pull/8515)). - * Enlarge emoji again ([\#8509](https://github.com/matrix-org/matrix-react-sdk/pull/8509)). Fixes vector-im/element-web#22086. - * Order receipts with the most recent on the right ([\#8506](https://github.com/matrix-org/matrix-react-sdk/pull/8506)). Fixes vector-im/element-web#22044. - * Disconnect from video rooms when leaving ([\#8500](https://github.com/matrix-org/matrix-react-sdk/pull/8500)). - * Fix soft crash around threads when room isn't yet in store ([\#8496](https://github.com/matrix-org/matrix-react-sdk/pull/8496)). Fixes vector-im/element-web#22047. - * Fix reading of cached room device setting values ([\#8491](https://github.com/matrix-org/matrix-react-sdk/pull/8491)). - * Add loading spinners to threads panels ([\#8490](https://github.com/matrix-org/matrix-react-sdk/pull/8490)). Fixes vector-im/element-web#21335. - * Fix forwarding UI papercuts ([\#8482](https://github.com/matrix-org/matrix-react-sdk/pull/8482)). Fixes vector-im/element-web#17616. - -Changes in [3.44.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.44.0) (2022-05-10) -===================================================================================================== - -## ✨ Features - * Made the location map change the cursor to a pointer so it looks like it's clickable (https ([\#8451](https://github.com/matrix-org/matrix-react-sdk/pull/8451)). Fixes vector-im/element-web#21991. Contributed by @Odyssey346. - * Implement improved spacing for the thread list and timeline ([\#8337](https://github.com/matrix-org/matrix-react-sdk/pull/8337)). Fixes vector-im/element-web#21759. Contributed by @luixxiul. - * LLS: expose way to enable live sharing labs flag from location dialog ([\#8416](https://github.com/matrix-org/matrix-react-sdk/pull/8416)). - * Fix source text boxes in View Source modal should have full width ([\#8425](https://github.com/matrix-org/matrix-react-sdk/pull/8425)). Fixes vector-im/element-web#21938. Contributed by @EECvision. - * Read Receipts: never show +1, if it’s just 4, show all of them ([\#8428](https://github.com/matrix-org/matrix-react-sdk/pull/8428)). Fixes vector-im/element-web#21935. - * Add opt-in analytics to onboarding tasks ([\#8409](https://github.com/matrix-org/matrix-react-sdk/pull/8409)). Fixes vector-im/element-web#21705. - * Allow user to control if they are signed out of all devices when changing password ([\#8259](https://github.com/matrix-org/matrix-react-sdk/pull/8259)). Fixes vector-im/element-web#2671. - * Implement new Read Receipt design ([\#8389](https://github.com/matrix-org/matrix-react-sdk/pull/8389)). Fixes vector-im/element-web#20574. - * Stick connected video rooms to the top of the room list ([\#8353](https://github.com/matrix-org/matrix-react-sdk/pull/8353)). - * LLS: fix jumpy maximised map ([\#8387](https://github.com/matrix-org/matrix-react-sdk/pull/8387)). - * Persist audio and video mute state in video rooms ([\#8376](https://github.com/matrix-org/matrix-react-sdk/pull/8376)). - * Forcefully disconnect from video rooms on logout and tab close ([\#8375](https://github.com/matrix-org/matrix-react-sdk/pull/8375)). - * Add local echo of connected devices in video rooms ([\#8368](https://github.com/matrix-org/matrix-react-sdk/pull/8368)). - * Improve text of account deactivation dialog ([\#8371](https://github.com/matrix-org/matrix-react-sdk/pull/8371)). Fixes vector-im/element-web#17421. - * Live location sharing: own live beacon status on maximised view ([\#8374](https://github.com/matrix-org/matrix-react-sdk/pull/8374)). - * Show a lobby screen in video rooms ([\#8287](https://github.com/matrix-org/matrix-react-sdk/pull/8287)). - * Settings toggle to disable Composer Markdown ([\#8358](https://github.com/matrix-org/matrix-react-sdk/pull/8358)). Fixes vector-im/element-web#20321. - * Cache localStorage objects for SettingsStore ([\#8366](https://github.com/matrix-org/matrix-react-sdk/pull/8366)). - * Bring `View Source` back from behind developer mode ([\#8369](https://github.com/matrix-org/matrix-react-sdk/pull/8369)). Fixes vector-im/element-web#21771. - -## 🐛 Bug Fixes - * Fix race conditions around threads ([\#8448](https://github.com/matrix-org/matrix-react-sdk/pull/8448)). Fixes vector-im/element-web#21627. - * Fix reading of cached room device setting values ([\#8495](https://github.com/matrix-org/matrix-react-sdk/pull/8495)). - * Fix issue with dispatch happening mid-dispatch due to js-sdk emit ([\#8473](https://github.com/matrix-org/matrix-react-sdk/pull/8473)). Fixes vector-im/element-web#22019. - * Match MSC behaviour for threads when disabled (thread-aware mode) ([\#8476](https://github.com/matrix-org/matrix-react-sdk/pull/8476)). Fixes vector-im/element-web#22033. - * Specify position of DisambiguatedProfile inside a thread on bubble message layout ([\#8452](https://github.com/matrix-org/matrix-react-sdk/pull/8452)). Fixes vector-im/element-web#21998. Contributed by @luixxiul. - * Location sharing: do not trackuserlocation in location picker ([\#8466](https://github.com/matrix-org/matrix-react-sdk/pull/8466)). Fixes vector-im/element-web#22013. - * fix text and map indent in thread view ([\#8462](https://github.com/matrix-org/matrix-react-sdk/pull/8462)). Fixes vector-im/element-web#21997. - * Live location sharing: don't group beacon info with room creation summary ([\#8468](https://github.com/matrix-org/matrix-react-sdk/pull/8468)). - * Don't linkify code blocks ([\#7859](https://github.com/matrix-org/matrix-react-sdk/pull/7859)). Fixes vector-im/element-web#9613. - * read receipts: improve tooltips to show names of users ([\#8438](https://github.com/matrix-org/matrix-react-sdk/pull/8438)). Fixes vector-im/element-web#21940. - * Fix poll overflowing a reply tile on bubble message layout ([\#8459](https://github.com/matrix-org/matrix-react-sdk/pull/8459)). Fixes vector-im/element-web#22005. Contributed by @luixxiul. - * Fix text link buttons on UserInfo panel ([\#8247](https://github.com/matrix-org/matrix-react-sdk/pull/8247)). Fixes vector-im/element-web#21702. Contributed by @luixxiul. - * Clear local storage settings handler cache on logout ([\#8454](https://github.com/matrix-org/matrix-react-sdk/pull/8454)). Fixes vector-im/element-web#21994. - * Fix jump to bottom button being always displayed in non-overflowing timelines ([\#8460](https://github.com/matrix-org/matrix-react-sdk/pull/8460)). Fixes vector-im/element-web#22003. - * fix timeline search with empty text box should do nothing ([\#8262](https://github.com/matrix-org/matrix-react-sdk/pull/8262)). Fixes vector-im/element-web#21714. Contributed by @EECvision. - * Fixes "space panel kebab menu is rendered out of view on sub spaces" ([\#8350](https://github.com/matrix-org/matrix-react-sdk/pull/8350)). Contributed by @yaya-usman. - * Add margin to the location map inside ThreadView ([\#8442](https://github.com/matrix-org/matrix-react-sdk/pull/8442)). Fixes vector-im/element-web#21982. Contributed by @luixxiul. - * Patch: "Reloading the registration page should warn about data loss" ([\#8377](https://github.com/matrix-org/matrix-react-sdk/pull/8377)). Contributed by @yaya-usman. - * Live location sharing: fix safari timestamps pt 2 ([\#8443](https://github.com/matrix-org/matrix-react-sdk/pull/8443)). - * Fix issue with thread notification state ignoring initial events ([\#8417](https://github.com/matrix-org/matrix-react-sdk/pull/8417)). Fixes vector-im/element-web#21927. - * Fix event text overflow on bubble message layout ([\#8391](https://github.com/matrix-org/matrix-react-sdk/pull/8391)). Fixes vector-im/element-web#21882. Contributed by @luixxiul. - * Disable the message action bar when hovering over the 1px border between threads on the list ([\#8429](https://github.com/matrix-org/matrix-react-sdk/pull/8429)). Fixes vector-im/element-web#21955. Contributed by @luixxiul. - * correctly align read receipts to state events in bubble layout ([\#8419](https://github.com/matrix-org/matrix-react-sdk/pull/8419)). Fixes vector-im/element-web#21899. - * Fix issue with underfilled timelines when barren of content ([\#8432](https://github.com/matrix-org/matrix-react-sdk/pull/8432)). Fixes vector-im/element-web#21930. - * Fix baseline misalignment of thread panel summary by deduplication ([\#8413](https://github.com/matrix-org/matrix-react-sdk/pull/8413)). - * Fix editing of non-html replies ([\#8418](https://github.com/matrix-org/matrix-react-sdk/pull/8418)). Fixes vector-im/element-web#21928. - * Read Receipts "Fall from the Sky" ([\#8414](https://github.com/matrix-org/matrix-react-sdk/pull/8414)). Fixes vector-im/element-web#21888. - * Make read receipts handle nullable roomMembers correctly ([\#8410](https://github.com/matrix-org/matrix-react-sdk/pull/8410)). Fixes vector-im/element-web#21896. - * Don't form continuations on either side of a thread root ([\#8408](https://github.com/matrix-org/matrix-react-sdk/pull/8408)). Fixes vector-im/element-web#20908. - * Fix centering issue with sticker placeholder ([\#8404](https://github.com/matrix-org/matrix-react-sdk/pull/8404)). Fixes vector-im/element-web#18014 and vector-im/element-web#6449. - * Disable download option on
should match the snapshot 1`] = `
should support events with 1`] = `
should render dialog 1`] = ` class="mx_StyledRadioButton_content" > +
+ + + +
+
+`; + +exports[`CreateSecretStorageDialog handles the happy path 2`] = ` +
+
+ +
+
+`; + +exports[`CreateSecretStorageDialog when there is an error fetching the backup version shows an error 1`] = ` +
+
+ +
+
+`; + +exports[` renders correctly for MapStyleUrlNotConfigured 1`] = ` +
+
+ + + +

+ Unable to load map +

+

+ This homeserver is not configured to display maps. +

+ +
+
+`; + +exports[` renders correctly for MapStyleUrlNotReachable 1`] = ` +
+
+ + + +

+ Unable to load map +

+

+ This homeserver is not configured correctly to display maps, or the configured map server may be unreachable. +

+ +
+
+`; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/location/__snapshots__/Marker-test.tsx.snap b/test/unit-tests/components/views/location/__snapshots__/Marker-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/location/__snapshots__/Marker-test.tsx.snap rename to test/unit-tests/components/views/location/__snapshots__/Marker-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap b/test/unit-tests/components/views/location/__snapshots__/SmartMarker-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap rename to test/unit-tests/components/views/location/__snapshots__/SmartMarker-test.tsx.snap diff --git a/test/unit-tests/components/views/location/__snapshots__/ZoomButtons-test.tsx.snap b/test/unit-tests/components/views/location/__snapshots__/ZoomButtons-test.tsx.snap new file mode 100644 index 0000000000..4aa18b2f1e --- /dev/null +++ b/test/unit-tests/components/views/location/__snapshots__/ZoomButtons-test.tsx.snap @@ -0,0 +1,50 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders buttons 1`] = ` + +
+
+ + + +
+
+ + + +
+
+
+`; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/location/shareLocation-test.ts b/test/unit-tests/components/views/location/shareLocation-test.ts similarity index 88% rename from linked-dependencies/matrix-react-sdk/test/components/views/location/shareLocation-test.ts rename to test/unit-tests/components/views/location/shareLocation-test.ts index dbde0fde28..bdd0f7ab5c 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/location/shareLocation-test.ts +++ b/test/unit-tests/components/views/location/shareLocation-test.ts @@ -14,14 +14,14 @@ import { MLocationEventContent, } from "matrix-js-sdk/src/matrix"; -import { doMaybeLocalRoomAction } from "../../../../src/utils/local-room"; +import { doMaybeLocalRoomAction } from "../../../../../src/utils/local-room"; import { LocationShareType, shareLocation, ShareLocationFn, -} from "../../../../src/components/views/location/shareLocation"; +} from "../../../../../src/components/views/location/shareLocation"; -jest.mock("../../../../src/utils/local-room", () => ({ +jest.mock("../../../../../src/utils/local-room", () => ({ doMaybeLocalRoomAction: jest.fn(), })); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/CallEvent-test.tsx b/test/unit-tests/components/views/messages/CallEvent-test.tsx similarity index 89% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/CallEvent-test.tsx rename to test/unit-tests/components/views/messages/CallEvent-test.tsx index 2eff5e0112..c76b2ec826 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/CallEvent-test.tsx +++ b/test/unit-tests/components/views/messages/CallEvent-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen, act, cleanup, fireEvent, waitFor } from "@testing-library/react"; +import { render, screen, act, cleanup, fireEvent, waitFor } from "jest-matrix-react"; import { mocked, Mocked } from "jest-mock"; import { Room, RoomStateEvent, MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/matrix"; import { ClientWidgetApi, Widget } from "matrix-widget-api"; @@ -22,14 +22,14 @@ import { resetAsyncStoreWithClient, wrapInMatrixClientContext, useMockMediaDevices, -} from "../../../test-utils"; -import defaultDispatcher from "../../../../src/dispatcher/dispatcher"; -import { Action } from "../../../../src/dispatcher/actions"; -import { CallEvent as UnwrappedCallEvent } from "../../../../src/components/views/messages/CallEvent"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import { CallStore } from "../../../../src/stores/CallStore"; -import { WidgetMessagingStore } from "../../../../src/stores/widgets/WidgetMessagingStore"; -import { ConnectionState } from "../../../../src/models/Call"; +} from "../../../../test-utils"; +import defaultDispatcher from "../../../../../src/dispatcher/dispatcher"; +import { Action } from "../../../../../src/dispatcher/actions"; +import { CallEvent as UnwrappedCallEvent } from "../../../../../src/components/views/messages/CallEvent"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import { CallStore } from "../../../../../src/stores/CallStore"; +import { WidgetMessagingStore } from "../../../../../src/stores/widgets/WidgetMessagingStore"; +import { ConnectionState } from "../../../../../src/models/Call"; const CallEvent = wrapInMatrixClientContext(UnwrappedCallEvent); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/DateSeparator-test.tsx b/test/unit-tests/components/views/messages/DateSeparator-test.tsx similarity index 90% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/DateSeparator-test.tsx rename to test/unit-tests/components/views/messages/DateSeparator-test.tsx index 5f359d2e1f..0c953a1738 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/DateSeparator-test.tsx +++ b/test/unit-tests/components/views/messages/DateSeparator-test.tsx @@ -8,26 +8,26 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { mocked } from "jest-mock"; -import { fireEvent, render, screen } from "@testing-library/react"; +import { fireEvent, render, screen, waitFor } from "jest-matrix-react"; import { TimestampToEventResponse, ConnectionError, HTTPError, MatrixError } from "matrix-js-sdk/src/matrix"; -import dispatcher from "../../../../src/dispatcher/dispatcher"; -import { Action } from "../../../../src/dispatcher/actions"; -import { ViewRoomPayload } from "../../../../src/dispatcher/payloads/ViewRoomPayload"; -import { SdkContextClass } from "../../../../src/contexts/SDKContext"; -import { formatFullDateNoTime } from "../../../../src/DateUtils"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import { UIFeature } from "../../../../src/settings/UIFeature"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; +import dispatcher from "../../../../../src/dispatcher/dispatcher"; +import { Action } from "../../../../../src/dispatcher/actions"; +import { ViewRoomPayload } from "../../../../../src/dispatcher/payloads/ViewRoomPayload"; +import { SdkContextClass } from "../../../../../src/contexts/SDKContext"; +import { formatFullDateNoTime } from "../../../../../src/DateUtils"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import { UIFeature } from "../../../../../src/settings/UIFeature"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; import { clearAllModals, flushPromisesWithFakeTimers, getMockClientWithEventEmitter, waitEnoughCyclesForModal, -} from "../../../test-utils"; -import DateSeparator from "../../../../src/components/views/messages/DateSeparator"; +} from "../../../../test-utils"; +import DateSeparator from "../../../../../src/components/views/messages/DateSeparator"; -jest.mock("../../../../src/settings/SettingsStore"); +jest.mock("../../../../../src/settings/SettingsStore"); describe("DateSeparator", () => { const HOUR_MS = 3600000; @@ -91,6 +91,12 @@ describe("DateSeparator", () => { expect(getComponent({ ts, forExport: false }).container.textContent).toEqual(result); }); + it("renders invalid date separator correctly", () => { + const ts = new Date(-8640000000000004).getTime(); + const { asFragment } = getComponent({ ts }); + expect(asFragment()).toMatchSnapshot(); + }); + describe("when forExport is true", () => { it.each(testCases)("formats date in full when current time is %s", (_d, ts) => { expect(getComponent({ ts, forExport: true }).container.textContent).toEqual( @@ -291,7 +297,9 @@ describe("DateSeparator", () => { // The submit debug logs option should *NOT* be shown for network errors. // // We have to use `queryBy` so that it can return `null` for something that does not exist. - expect(screen.queryByTestId("jump-to-date-error-submit-debug-logs-button")).not.toBeInTheDocument(); + await waitFor(() => + expect(screen.queryByTestId("jump-to-date-error-submit-debug-logs-button")).not.toBeInTheDocument(), + ); }); }); }); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/DecryptionFailureBody-test.tsx b/test/unit-tests/components/views/messages/DecryptionFailureBody-test.tsx similarity index 92% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/DecryptionFailureBody-test.tsx rename to test/unit-tests/components/views/messages/DecryptionFailureBody-test.tsx index 021e58d071..94495c4349 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/DecryptionFailureBody-test.tsx +++ b/test/unit-tests/components/views/messages/DecryptionFailureBody-test.tsx @@ -7,14 +7,14 @@ */ import React from "react"; -import { render } from "@testing-library/react"; +import { render } from "jest-matrix-react"; import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { mkDecryptionFailureMatrixEvent } from "matrix-js-sdk/src/testing"; import { DecryptionFailureCode } from "matrix-js-sdk/src/crypto-api"; -import { mkEvent } from "../../../test-utils"; -import { DecryptionFailureBody } from "../../../../src/components/views/messages/DecryptionFailureBody"; -import { LocalDeviceVerificationStateContext } from "../../../../src/contexts/LocalDeviceVerificationStateContext"; +import { mkEvent } from "../../../../test-utils"; +import { DecryptionFailureBody } from "../../../../../src/components/views/messages/DecryptionFailureBody"; +import { LocalDeviceVerificationStateContext } from "../../../../../src/contexts/LocalDeviceVerificationStateContext"; describe("DecryptionFailureBody", () => { function customRender(event: MatrixEvent, localDeviceVerified: boolean = false) { @@ -129,6 +129,6 @@ describe("DecryptionFailureBody", () => { const { container } = customRender(event); // Then - expect(container).toHaveTextContent("Encrypted by a device not verified by its owner"); + expect(container).toHaveTextContent("Sent from an insecure device"); }); }); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/DownloadActionButton-test.tsx b/test/unit-tests/components/views/messages/DownloadActionButton-test.tsx similarity index 80% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/DownloadActionButton-test.tsx rename to test/unit-tests/components/views/messages/DownloadActionButton-test.tsx index 0f34e106bd..0d770a30d9 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/DownloadActionButton-test.tsx +++ b/test/unit-tests/components/views/messages/DownloadActionButton-test.tsx @@ -9,14 +9,14 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { mocked } from "jest-mock"; import fetchMockJest from "fetch-mock-jest"; -import { fireEvent, render, screen, waitFor } from "@testing-library/react"; +import { fireEvent, render, screen, waitFor } from "jest-matrix-react"; import { MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { stubClient } from "../../../test-utils"; -import DownloadActionButton from "../../../../src/components/views/messages/DownloadActionButton"; -import Modal from "../../../../src/Modal"; -import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper"; -import ErrorDialog from "../../../../src/components/views/dialogs/ErrorDialog"; +import { stubClient } from "../../../../test-utils"; +import DownloadActionButton from "../../../../../src/components/views/messages/DownloadActionButton"; +import Modal from "../../../../../src/Modal"; +import { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper"; +import ErrorDialog from "../../../../../src/components/views/dialogs/ErrorDialog"; describe("DownloadActionButton", () => { it("should show error if media API returns one", async () => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/EncryptionEvent-test.tsx b/test/unit-tests/components/views/messages/EncryptionEvent-test.tsx similarity index 89% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/EncryptionEvent-test.tsx rename to test/unit-tests/components/views/messages/EncryptionEvent-test.tsx index 9546294faf..3a78ef55e8 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/EncryptionEvent-test.tsx +++ b/test/unit-tests/components/views/messages/EncryptionEvent-test.tsx @@ -9,14 +9,14 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { mocked } from "jest-mock"; import { MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; -import { render, screen } from "@testing-library/react"; - -import EncryptionEvent from "../../../../src/components/views/messages/EncryptionEvent"; -import { createTestClient, mkMessage } from "../../../test-utils"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import { LocalRoom } from "../../../../src/models/LocalRoom"; -import DMRoomMap from "../../../../src/utils/DMRoomMap"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; +import { render, screen } from "jest-matrix-react"; + +import EncryptionEvent from "../../../../../src/components/views/messages/EncryptionEvent"; +import { createTestClient, mkMessage } from "../../../../test-utils"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import { LocalRoom } from "../../../../../src/models/LocalRoom"; +import DMRoomMap from "../../../../../src/utils/DMRoomMap"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; const renderEncryptionEvent = (client: MatrixClient, event: MatrixEvent) => { render( diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/JumpToDatePicker-test.tsx b/test/unit-tests/components/views/messages/JumpToDatePicker-test.tsx similarity index 85% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/JumpToDatePicker-test.tsx rename to test/unit-tests/components/views/messages/JumpToDatePicker-test.tsx index 260997a707..971ec1ac29 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/JumpToDatePicker-test.tsx +++ b/test/unit-tests/components/views/messages/JumpToDatePicker-test.tsx @@ -7,9 +7,9 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render } from "@testing-library/react"; +import { render } from "jest-matrix-react"; -import JumpToDatePicker from "../../../../src/components/views/messages/JumpToDatePicker"; +import JumpToDatePicker from "../../../../../src/components/views/messages/JumpToDatePicker"; describe("JumpToDatePicker", () => { const nowDate = new Date("2021-12-17T08:09:00.000Z"); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/LegacyCallEvent-test.tsx b/test/unit-tests/components/views/messages/LegacyCallEvent-test.tsx similarity index 90% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/LegacyCallEvent-test.tsx rename to test/unit-tests/components/views/messages/LegacyCallEvent-test.tsx index b306a5e796..afff6b3730 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/LegacyCallEvent-test.tsx +++ b/test/unit-tests/components/views/messages/LegacyCallEvent-test.tsx @@ -7,12 +7,12 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen } from "@testing-library/react"; +import { render, screen } from "jest-matrix-react"; import { CallErrorCode, CallState } from "matrix-js-sdk/src/webrtc/call"; import { MatrixEvent } from "matrix-js-sdk/src/matrix"; -import LegacyCallEvent from "../../../../src/components/views/messages/LegacyCallEvent"; -import LegacyCallEventGrouper from "../../../../src/components/structures/LegacyCallEventGrouper"; +import LegacyCallEvent from "../../../../../src/components/views/messages/LegacyCallEvent"; +import LegacyCallEventGrouper from "../../../../../src/components/structures/LegacyCallEventGrouper"; const THEIR_USER_ID = "@them:here"; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MBeaconBody-test.tsx b/test/unit-tests/components/views/messages/MBeaconBody-test.tsx similarity index 96% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MBeaconBody-test.tsx rename to test/unit-tests/components/views/messages/MBeaconBody-test.tsx index dbaa038f5f..b95a654106 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MBeaconBody-test.tsx +++ b/test/unit-tests/components/views/messages/MBeaconBody-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React, { ComponentProps } from "react"; -import { act, fireEvent, render } from "@testing-library/react"; +import { act, fireEvent, render } from "jest-matrix-react"; import * as maplibregl from "maplibre-gl"; import { BeaconEvent, @@ -20,21 +20,21 @@ import { Room, } from "matrix-js-sdk/src/matrix"; -import MBeaconBody from "../../../../src/components/views/messages/MBeaconBody"; +import MBeaconBody from "../../../../../src/components/views/messages/MBeaconBody"; import { getMockClientWithEventEmitter, makeBeaconEvent, makeBeaconInfoEvent, makeRoomWithBeacons, makeRoomWithStateEvents, -} from "../../../test-utils"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import Modal from "../../../../src/Modal"; -import { TILE_SERVER_WK_KEY } from "../../../../src/utils/WellKnownUtils"; -import * as mapUtilHooks from "../../../../src/utils/location/useMap"; -import { LocationShareError } from "../../../../src/utils/location"; +} from "../../../../test-utils"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import Modal from "../../../../../src/Modal"; +import { TILE_SERVER_WK_KEY } from "../../../../../src/utils/WellKnownUtils"; +import * as mapUtilHooks from "../../../../../src/utils/location/useMap"; +import { LocationShareError } from "../../../../../src/utils/location"; describe("", () => { // 14.03.2022 16:15 diff --git a/test/unit-tests/components/views/messages/MFileBody-test.tsx b/test/unit-tests/components/views/messages/MFileBody-test.tsx new file mode 100644 index 0000000000..60795babde --- /dev/null +++ b/test/unit-tests/components/views/messages/MFileBody-test.tsx @@ -0,0 +1,88 @@ +/* +Copyright 2024 New Vector Ltd. + +SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only +Please see LICENSE files in the repository root for full details. +*/ + +import React from "react"; +import { render } from "jest-matrix-react"; +import { EventType, getHttpUriForMxc, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; + +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { + getMockClientWithEventEmitter, + mockClientMethodsCrypto, + mockClientMethodsDevice, + mockClientMethodsServer, + mockClientMethodsUser, +} from "../../../../test-utils"; +import { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import MFileBody from "../../../../../src/components/views/messages/MFileBody.tsx"; +import RoomContext, { TimelineRenderingType } from "../../../../../src/contexts/RoomContext.ts"; + +jest.mock("matrix-encrypt-attachment", () => ({ + decryptAttachment: jest.fn(), +})); + +describe("", () => { + const userId = "@user:server"; + const deviceId = "DEADB33F"; + const cli = getMockClientWithEventEmitter({ + ...mockClientMethodsUser(userId), + ...mockClientMethodsServer(), + ...mockClientMethodsDevice(deviceId), + ...mockClientMethodsCrypto(), + getRooms: jest.fn().mockReturnValue([]), + getIgnoredUsers: jest.fn(), + getVersions: jest.fn().mockResolvedValue({ + unstable_features: { + "org.matrix.msc3882": true, + "org.matrix.msc3886": true, + }, + }), + }); + // eslint-disable-next-line no-restricted-properties + cli.mxcUrlToHttp.mockImplementation( + (mxcUrl: string, width?: number, height?: number, resizeMethod?: string, allowDirectLinks?: boolean) => { + return getHttpUriForMxc("https://server", mxcUrl, width, height, resizeMethod, allowDirectLinks); + }, + ); + const mediaEvent = new MatrixEvent({ + room_id: "!room:server", + sender: userId, + type: EventType.RoomMessage, + content: { + body: "alt for a image", + msgtype: "m.image", + url: "mxc://server/image", + }, + }); + + const props = { + onHeightChanged: jest.fn(), + onMessageAllowed: jest.fn(), + permalinkCreator: new RoomPermalinkCreator(new Room(mediaEvent.getRoomId()!, cli, cli.getUserId()!)), + }; + + beforeEach(() => { + jest.spyOn(SettingsStore, "getValue").mockRestore(); + }); + + it("should show a download button in file rendering type", async () => { + const { container, getByRole } = render( + + + , + ); + + expect(getByRole("link", { name: "Download" })).toBeInTheDocument(); + expect(container).toMatchSnapshot(); + }); +}); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MImageBody-test.tsx b/test/unit-tests/components/views/messages/MImageBody-test.tsx similarity index 95% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MImageBody-test.tsx rename to test/unit-tests/components/views/messages/MImageBody-test.tsx index d1ad3edd23..c15f2ea849 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MImageBody-test.tsx +++ b/test/unit-tests/components/views/messages/MImageBody-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { fireEvent, render, screen, waitForElementToBeRemoved } from "@testing-library/react"; +import { fireEvent, render, screen, waitForElementToBeRemoved } from "jest-matrix-react"; import { EventType, getHttpUriForMxc, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import fetchMock from "fetch-mock-jest"; import encrypt from "matrix-encrypt-attachment"; @@ -16,17 +16,17 @@ import fs from "fs"; import path from "path"; import userEvent from "@testing-library/user-event"; -import MImageBody from "../../../../src/components/views/messages/MImageBody"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; +import MImageBody from "../../../../../src/components/views/messages/MImageBody"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; import { getMockClientWithEventEmitter, mockClientMethodsCrypto, mockClientMethodsDevice, mockClientMethodsServer, mockClientMethodsUser, -} from "../../../test-utils"; -import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper"; -import SettingsStore from "../../../../src/settings/SettingsStore"; +} from "../../../../test-utils"; +import { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; jest.mock("matrix-encrypt-attachment", () => ({ decryptAttachment: jest.fn(), diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MKeyVerificationRequest-test.tsx b/test/unit-tests/components/views/messages/MKeyVerificationRequest-test.tsx similarity index 87% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MKeyVerificationRequest-test.tsx rename to test/unit-tests/components/views/messages/MKeyVerificationRequest-test.tsx index 8befe56aa4..3ab9a98921 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MKeyVerificationRequest-test.tsx +++ b/test/unit-tests/components/views/messages/MKeyVerificationRequest-test.tsx @@ -7,14 +7,14 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { RenderResult, render } from "@testing-library/react"; +import { RenderResult, render } from "jest-matrix-react"; import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix"; -import MKeyVerificationRequest from "../../../../src/components/views/messages/MKeyVerificationRequest"; -import TileErrorBoundary from "../../../../src/components/views/messages/TileErrorBoundary"; -import { Layout } from "../../../../src/settings/enums/Layout"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { filterConsole } from "../../../test-utils"; +import MKeyVerificationRequest from "../../../../../src/components/views/messages/MKeyVerificationRequest"; +import TileErrorBoundary from "../../../../../src/components/views/messages/TileErrorBoundary"; +import { Layout } from "../../../../../src/settings/enums/Layout"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { filterConsole } from "../../../../test-utils"; describe("MKeyVerificationRequest", () => { filterConsole( diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MLocationBody-test.tsx b/test/unit-tests/components/views/messages/MLocationBody-test.tsx similarity index 89% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MLocationBody-test.tsx rename to test/unit-tests/components/views/messages/MLocationBody-test.tsx index 7fbf5fd954..17fabc17d1 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MLocationBody-test.tsx +++ b/test/unit-tests/components/views/messages/MLocationBody-test.tsx @@ -7,21 +7,21 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { fireEvent, render, waitFor } from "@testing-library/react"; +import { fireEvent, render, waitFor } from "jest-matrix-react"; import { LocationAssetType, ClientEvent, RoomMember, SyncState } from "matrix-js-sdk/src/matrix"; import * as maplibregl from "maplibre-gl"; import { logger } from "matrix-js-sdk/src/logger"; import { sleep } from "matrix-js-sdk/src/utils"; -import MLocationBody from "../../../../src/components/views/messages/MLocationBody"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper"; -import Modal from "../../../../src/Modal"; -import SdkConfig from "../../../../src/SdkConfig"; -import { TILE_SERVER_WK_KEY } from "../../../../src/utils/WellKnownUtils"; -import { makeLocationEvent } from "../../../test-utils/location"; -import { getMockClientWithEventEmitter } from "../../../test-utils"; +import MLocationBody from "../../../../../src/components/views/messages/MLocationBody"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper"; +import Modal from "../../../../../src/Modal"; +import SdkConfig from "../../../../../src/SdkConfig"; +import { TILE_SERVER_WK_KEY } from "../../../../../src/utils/WellKnownUtils"; +import { makeLocationEvent } from "../../../../test-utils/location"; +import { getMockClientWithEventEmitter } from "../../../../test-utils"; describe("MLocationBody", () => { const mapOptions = { container: {} as unknown as HTMLElement, style: "" }; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MPollBody-test.tsx b/test/unit-tests/components/views/messages/MPollBody-test.tsx similarity index 98% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MPollBody-test.tsx rename to test/unit-tests/components/views/messages/MPollBody-test.tsx index 3486f4dfe5..598542d297 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MPollBody-test.tsx +++ b/test/unit-tests/components/views/messages/MPollBody-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { fireEvent, render, RenderResult } from "@testing-library/react"; +import { fireEvent, render, RenderResult, waitFor } from "jest-matrix-react"; import { MatrixEvent, Relations, @@ -20,19 +20,23 @@ import { M_TEXT, } from "matrix-js-sdk/src/matrix"; -import MPollBody, { allVotes, findTopAnswer, isPollEnded } from "../../../../src/components/views/messages/MPollBody"; -import { IBodyProps } from "../../../../src/components/views/messages/IBodyProps"; +import MPollBody, { + allVotes, + findTopAnswer, + isPollEnded, +} from "../../../../../src/components/views/messages/MPollBody"; +import { IBodyProps } from "../../../../../src/components/views/messages/IBodyProps"; import { flushPromises, getMockClientWithEventEmitter, makePollEndEvent, mockClientMethodsUser, setupRoomWithPollEvents, -} from "../../../test-utils"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper"; -import * as languageHandler from "../../../../src/languageHandler"; +} from "../../../../test-utils"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper"; +import * as languageHandler from "../../../../../src/languageHandler"; const CHECKED = "mx_PollOption_checked"; const userId = "@me:example.com"; @@ -79,7 +83,7 @@ describe("MPollBody", () => { expect(votesCount(renderResult, "poutine")).toBe(""); expect(votesCount(renderResult, "italian")).toBe(""); expect(votesCount(renderResult, "wings")).toBe(""); - expect(renderResult.getByTestId("totalVotes").innerHTML).toBe("No votes cast"); + await waitFor(() => expect(renderResult.getByTestId("totalVotes").innerHTML).toBe("No votes cast")); expect(renderResult.getByText("What should we order for the party?")).toBeTruthy(); }); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MPollEndBody-test.tsx b/test/unit-tests/components/views/messages/MPollEndBody-test.tsx similarity index 93% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MPollEndBody-test.tsx rename to test/unit-tests/components/views/messages/MPollEndBody-test.tsx index 57591ef1b4..e3883b7033 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MPollEndBody-test.tsx +++ b/test/unit-tests/components/views/messages/MPollEndBody-test.tsx @@ -7,15 +7,15 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, waitFor } from "@testing-library/react"; +import { render, waitFor } from "jest-matrix-react"; import { EventTimeline, MatrixEvent, Room, M_TEXT } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { IBodyProps } from "../../../../src/components/views/messages/IBodyProps"; -import { MPollEndBody } from "../../../../src/components/views/messages/MPollEndBody"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper"; +import { IBodyProps } from "../../../../../src/components/views/messages/IBodyProps"; +import { MPollEndBody } from "../../../../../src/components/views/messages/MPollEndBody"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper"; import { flushPromises, getMockClientWithEventEmitter, @@ -24,7 +24,7 @@ import { mockClientMethodsEvents, mockClientMethodsUser, setupRoomWithPollEvents, -} from "../../../test-utils"; +} from "../../../../test-utils"; describe("", () => { const userId = "@alice:domain.org"; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MStickerBody-test.tsx b/test/unit-tests/components/views/messages/MStickerBody-test.tsx similarity index 89% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MStickerBody-test.tsx rename to test/unit-tests/components/views/messages/MStickerBody-test.tsx index 71ef8f84b7..e5fe3ef450 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MStickerBody-test.tsx +++ b/test/unit-tests/components/views/messages/MStickerBody-test.tsx @@ -7,21 +7,21 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen } from "@testing-library/react"; +import { render, screen } from "jest-matrix-react"; import { EventType, getHttpUriForMxc, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import fetchMock from "fetch-mock-jest"; import userEvent from "@testing-library/user-event"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; import { getMockClientWithEventEmitter, mockClientMethodsCrypto, mockClientMethodsDevice, mockClientMethodsServer, mockClientMethodsUser, -} from "../../../test-utils"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import MStickerBody from "../../../../src/components/views/messages/MStickerBody"; +} from "../../../../test-utils"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import MStickerBody from "../../../../../src/components/views/messages/MStickerBody"; describe("", () => { const userId = "@user:server"; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MVideoBody-test.tsx b/test/unit-tests/components/views/messages/MVideoBody-test.tsx similarity index 91% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MVideoBody-test.tsx rename to test/unit-tests/components/views/messages/MVideoBody-test.tsx index ce5407965c..3f4289fea4 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MVideoBody-test.tsx +++ b/test/unit-tests/components/views/messages/MVideoBody-test.tsx @@ -8,20 +8,20 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { EventType, getHttpUriForMxc, IContent, MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { render, RenderResult } from "@testing-library/react"; +import { render, RenderResult } from "jest-matrix-react"; import fetchMock from "fetch-mock-jest"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper"; import { getMockClientWithEventEmitter, mockClientMethodsCrypto, mockClientMethodsDevice, mockClientMethodsServer, mockClientMethodsUser, -} from "../../../test-utils"; -import MVideoBody from "../../../../src/components/views/messages/MVideoBody"; +} from "../../../../test-utils"; +import MVideoBody from "../../../../../src/components/views/messages/MVideoBody"; describe("MVideoBody", () => { it("does not crash when given a portrait image", () => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MessageActionBar-test.tsx b/test/unit-tests/components/views/messages/MessageActionBar-test.tsx similarity index 96% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MessageActionBar-test.tsx rename to test/unit-tests/components/views/messages/MessageActionBar-test.tsx index e17fc1f875..8b639eb94e 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MessageActionBar-test.tsx +++ b/test/unit-tests/components/views/messages/MessageActionBar-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { act, render, fireEvent, screen, waitFor } from "@testing-library/react"; +import { act, render, fireEvent, screen, waitFor } from "jest-matrix-react"; import { EventType, EventStatus, @@ -21,22 +21,22 @@ import { RoomStateEvent, } from "matrix-js-sdk/src/matrix"; -import MessageActionBar from "../../../../src/components/views/messages/MessageActionBar"; +import MessageActionBar from "../../../../../src/components/views/messages/MessageActionBar"; import { getMockClientWithEventEmitter, mockClientMethodsUser, mockClientMethodsEvents, makeBeaconInfoEvent, -} from "../../../test-utils"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import RoomContext, { TimelineRenderingType } from "../../../../src/contexts/RoomContext"; -import { IRoomState } from "../../../../src/components/structures/RoomView"; -import dispatcher from "../../../../src/dispatcher/dispatcher"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import { Action } from "../../../../src/dispatcher/actions"; -import PinningUtils from "../../../../src/utils/PinningUtils"; - -jest.mock("../../../../src/dispatcher/dispatcher"); +} from "../../../../test-utils"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import RoomContext, { TimelineRenderingType } from "../../../../../src/contexts/RoomContext"; +import { IRoomState } from "../../../../../src/components/structures/RoomView"; +import dispatcher from "../../../../../src/dispatcher/dispatcher"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import { Action } from "../../../../../src/dispatcher/actions"; +import PinningUtils from "../../../../../src/utils/PinningUtils"; + +jest.mock("../../../../../src/dispatcher/dispatcher"); describe("", () => { const userId = "@alice:server.org"; diff --git a/test/unit-tests/components/views/messages/MessageEvent-test.tsx b/test/unit-tests/components/views/messages/MessageEvent-test.tsx new file mode 100644 index 0000000000..9ee323f175 --- /dev/null +++ b/test/unit-tests/components/views/messages/MessageEvent-test.tsx @@ -0,0 +1,172 @@ +/* +Copyright 2024 New Vector Ltd. +Copyright 2022 The Matrix.org Foundation C.I.C. + +SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only +Please see LICENSE files in the repository root for full details. +*/ + +import React from "react"; +import { render, RenderResult } from "jest-matrix-react"; +import { MatrixClient, MatrixEvent, EventType, Room, MsgType } from "matrix-js-sdk/src/matrix"; +import fetchMock from "fetch-mock-jest"; +import fs from "fs"; +import path from "path"; + +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import { VoiceBroadcastInfoEventType, VoiceBroadcastInfoState } from "../../../../../src/voice-broadcast"; +import { mkEvent, mkRoom, stubClient } from "../../../../test-utils"; +import MessageEvent from "../../../../../src/components/views/messages/MessageEvent"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; + +jest.mock("../../../../../src/components/views/messages/UnknownBody", () => ({ + __esModule: true, + default: () =>
, +})); + +jest.mock("../../../../../src/voice-broadcast/components/VoiceBroadcastBody", () => ({ + VoiceBroadcastBody: () =>
, +})); + +jest.mock("../../../../../src/components/views/messages/MImageBody", () => ({ + __esModule: true, + default: () =>
, +})); + +jest.mock("../../../../../src/components/views/messages/MVideoBody", () => ({ + __esModule: true, + default: () =>
, +})); + +jest.mock("../../../../../src/components/views/messages/MFileBody", () => ({ + __esModule: true, + default: () =>
, +})); + +jest.mock("../../../../../src/components/views/messages/MImageReplyBody", () => ({ + __esModule: true, + default: () =>
, +})); + +jest.mock("../../../../../src/components/views/messages/MStickerBody", () => ({ + __esModule: true, + default: () =>
, +})); + +jest.mock("../../../../../src/components/views/messages/TextualBody.tsx", () => ({ + __esModule: true, + default: () =>
, +})); + +describe("MessageEvent", () => { + let room: Room; + let client: MatrixClient; + let event: MatrixEvent; + + const renderMessageEvent = (): RenderResult => { + return render( + , + ); + }; + + beforeEach(() => { + client = stubClient(); + room = mkRoom(client, "!room:example.com"); + jest.spyOn(SettingsStore, "getValue"); + jest.spyOn(SettingsStore, "watchSetting"); + jest.spyOn(SettingsStore, "unwatchSetting").mockImplementation(jest.fn()); + }); + + describe("when a voice broadcast start event occurs", () => { + let result: RenderResult; + + beforeEach(() => { + event = mkEvent({ + event: true, + type: VoiceBroadcastInfoEventType, + user: client.getUserId()!, + room: room.roomId, + content: { + state: VoiceBroadcastInfoState.Started, + }, + }); + result = renderMessageEvent(); + }); + + it("should render a VoiceBroadcast component", () => { + result.getByTestId("voice-broadcast-body"); + }); + }); + + describe("when an image with a caption is sent", () => { + let result: RenderResult; + + function createEvent(mimetype: string, filename: string, msgtype: string) { + return mkEvent({ + event: true, + type: EventType.RoomMessage, + user: client.getUserId()!, + room: room.roomId, + content: { + body: "caption for a test image", + format: "org.matrix.custom.html", + formatted_body: "caption for a test image", + msgtype: msgtype, + filename: filename, + info: { + w: 40, + h: 50, + mimetype: mimetype, + }, + url: "mxc://server/image", + }, + }); + } + + function mockMedia() { + fetchMock.getOnce( + "https://server/_matrix/media/v3/download/server/image", + { + body: fs.readFileSync(path.resolve(__dirname, "..", "..", "..", "images", "animated-logo.webp")), + }, + { sendAsJson: false }, + ); + } + + it("should render a TextualBody and an ImageBody", () => { + event = createEvent("image/webp", "image.webp", MsgType.Image); + result = renderMessageEvent(); + mockMedia(); + result.getByTestId("image-body"); + result.getByTestId("textual-body"); + }); + + it("should render a TextualBody and a FileBody for mismatched extension", () => { + event = createEvent("image/webp", "image.exe", MsgType.Image); + result = renderMessageEvent(); + mockMedia(); + result.getByTestId("file-body"); + result.getByTestId("textual-body"); + }); + + it("should render a TextualBody and an VideoBody", () => { + event = createEvent("video/mp4", "video.mp4", MsgType.Video); + result = renderMessageEvent(); + mockMedia(); + result.getByTestId("video-body"); + result.getByTestId("textual-body"); + }); + + it("should render a TextualBody and a FileBody for non-video mimetype", () => { + event = createEvent("application/octet-stream", "video.mp4", MsgType.Video); + result = renderMessageEvent(); + mockMedia(); + result.getByTestId("file-body"); + result.getByTestId("textual-body"); + }); + }); +}); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MessageTimestamp-test.tsx b/test/unit-tests/components/views/messages/MessageTimestamp-test.tsx similarity index 89% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/MessageTimestamp-test.tsx rename to test/unit-tests/components/views/messages/MessageTimestamp-test.tsx index 0a203a3f27..8d1348c0dd 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/MessageTimestamp-test.tsx +++ b/test/unit-tests/components/views/messages/MessageTimestamp-test.tsx @@ -7,12 +7,12 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen } from "@testing-library/react"; +import { render, screen } from "jest-matrix-react"; import userEvent from "@testing-library/user-event"; -import MessageTimestamp from "../../../../src/components/views/messages/MessageTimestamp"; +import MessageTimestamp from "../../../../../src/components/views/messages/MessageTimestamp"; -jest.mock("../../../../src/settings/SettingsStore"); +jest.mock("../../../../../src/settings/SettingsStore"); describe("MessageTimestamp", () => { // Friday Dec 17 2021, 9:09am diff --git a/test/unit-tests/components/views/messages/PinnedMessageBadge-test.tsx b/test/unit-tests/components/views/messages/PinnedMessageBadge-test.tsx new file mode 100644 index 0000000000..824e338563 --- /dev/null +++ b/test/unit-tests/components/views/messages/PinnedMessageBadge-test.tsx @@ -0,0 +1,19 @@ +/* + * Copyright 2024 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only + * Please see LICENSE files in the repository root for full details. + * + */ + +import React from "react"; +import { render } from "jest-matrix-react"; + +import { PinnedMessageBadge } from "../../../../../src/components/views/messages/PinnedMessageBadge.tsx"; + +describe("PinnedMessageBadge", () => { + it("should render", () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); + }); +}); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/ReactionsRowButton-test.tsx b/test/unit-tests/components/views/messages/ReactionsRowButton-test.tsx similarity index 92% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/ReactionsRowButton-test.tsx rename to test/unit-tests/components/views/messages/ReactionsRowButton-test.tsx index bc6c67bcc6..c29dcd60a4 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/ReactionsRowButton-test.tsx +++ b/test/unit-tests/components/views/messages/ReactionsRowButton-test.tsx @@ -8,11 +8,11 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { IContent, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; -import { render } from "@testing-library/react"; +import { render } from "jest-matrix-react"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { getMockClientWithEventEmitter } from "../../../test-utils"; -import ReactionsRowButton, { IProps } from "../../../../src/components/views/messages/ReactionsRowButton"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { getMockClientWithEventEmitter } from "../../../../test-utils"; +import ReactionsRowButton, { IProps } from "../../../../../src/components/views/messages/ReactionsRowButton"; describe("ReactionsRowButton", () => { const userId = "@alice:server"; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/RoomPredecessorTile-test.tsx b/test/unit-tests/components/views/messages/RoomPredecessorTile-test.tsx similarity index 93% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/RoomPredecessorTile-test.tsx rename to test/unit-tests/components/views/messages/RoomPredecessorTile-test.tsx index b4fa114ef1..f666b13b33 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/RoomPredecessorTile-test.tsx +++ b/test/unit-tests/components/views/messages/RoomPredecessorTile-test.tsx @@ -7,24 +7,24 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { act, render, screen, waitFor } from "@testing-library/react"; +import { act, render, screen, waitFor } from "jest-matrix-react"; import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; import { EventType, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; -import dis from "../../../../src/dispatcher/dispatcher"; -import SettingsStore from "../../../../src/settings/SettingsStore"; +import dis from "../../../../../src/dispatcher/dispatcher"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; import { guessServerNameFromRoomId, RoomPredecessorTile, -} from "../../../../src/components/views/messages/RoomPredecessorTile"; -import { stubClient, upsertRoomStateEvents } from "../../../test-utils/test-utils"; -import { Action } from "../../../../src/dispatcher/actions"; -import RoomContext from "../../../../src/contexts/RoomContext"; -import { filterConsole, getRoomContext } from "../../../test-utils"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; - -jest.mock("../../../../src/dispatcher/dispatcher"); +} from "../../../../../src/components/views/messages/RoomPredecessorTile"; +import { stubClient, upsertRoomStateEvents } from "../../../../test-utils/test-utils"; +import { Action } from "../../../../../src/dispatcher/actions"; +import RoomContext from "../../../../../src/contexts/RoomContext"; +import { filterConsole, getRoomContext } from "../../../../test-utils"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; + +jest.mock("../../../../../src/dispatcher/dispatcher"); describe("", () => { const userId = "@alice:server.org"; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/TextualBody-test.tsx b/test/unit-tests/components/views/messages/TextualBody-test.tsx similarity index 85% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/TextualBody-test.tsx rename to test/unit-tests/components/views/messages/TextualBody-test.tsx index ea4019f8d4..c7ffc4ed93 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/TextualBody-test.tsx +++ b/test/unit-tests/components/views/messages/TextualBody-test.tsx @@ -9,16 +9,16 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { mocked, MockedObject } from "jest-mock"; -import { render } from "@testing-library/react"; +import { render, waitFor } from "jest-matrix-react"; -import { getMockClientWithEventEmitter, mkEvent, mkMessage, mkStubRoom } from "../../../test-utils"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import * as languageHandler from "../../../../src/languageHandler"; -import DMRoomMap from "../../../../src/utils/DMRoomMap"; -import TextualBody from "../../../../src/components/views/messages/TextualBody"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper"; +import { getMockClientWithEventEmitter, mkEvent, mkMessage, mkStubRoom } from "../../../../test-utils"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import * as languageHandler from "../../../../../src/languageHandler"; +import DMRoomMap from "../../../../../src/utils/DMRoomMap"; +import TextualBody from "../../../../../src/components/views/messages/TextualBody"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper"; const room1Id = "!room1:example.com"; const room2Id = "!room2:example.com"; @@ -204,7 +204,7 @@ describe("", () => { const { container } = getComponent({ mxEvent: ev }); const content = container.querySelector(".mx_EventTile_body"); expect(content.innerHTML).toMatchInlineSnapshot( - `"Visit
#room:example.com
"`, + `"Visit #room:example.com"`, ); }); @@ -279,6 +279,17 @@ describe("", () => { expect(content).toMatchSnapshot(); }); + it("should syntax highlight code blocks", async () => { + const ev = mkFormattedMessage( + "```py\n# Python Program to calculate the square root\n\n# Note: change this value for a different result\nnum = 8 \n\n# To take the input from the user\n#num = float(input('Enter a number: '))\n\nnum_sqrt = num ** 0.5\nprint('The square root of %0.3f is %0.3f'%(num ,num_sqrt))", + "
# Python Program to calculate the square root\n\n# Note: change this value for a different result\nnum = 8 \n\n# To take the input from the user\n#num = float(input('Enter a number: '))\n\nnum_sqrt = num ** 0.5\nprint('The square root of %0.3f is %0.3f'%(num ,num_sqrt))\n
\n", + ); + const { container } = getComponent({ mxEvent: ev }, matrixClient); + await waitFor(() => expect(container.querySelector(".hljs-built_in")).toBeInTheDocument()); + const content = container.querySelector(".mx_EventTile_body"); + expect(content).toMatchSnapshot(); + }); + // If pills were rendered within a Portal/same shadow DOM then it'd be easier to test it("pills get injected correctly into the DOM", () => { const ev = mkFormattedMessage("Hey User", 'Hey Member'); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap b/test/unit-tests/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap similarity index 72% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap rename to test/unit-tests/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap index 2294a40a99..69de39e31d 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap +++ b/test/unit-tests/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap @@ -1,5 +1,32 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`DateSeparator renders invalid date separator correctly 1`] = ` + + + +`; + exports[`DateSeparator renders the date separator correctly 1`] = `
+
+ The sender has blocked you from receiving this message because your device is unverified +
+
+`; + +exports[`DecryptionFailureBody Should display "Unable to decrypt message" 1`] = ` +
+
+ Unable to decrypt message +
+
+`; + +exports[`DecryptionFailureBody should handle messages from users who change identities after verification 1`] = ` +
+
+ + + + + Sender's verified identity has changed + +
+
+`; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/JumpToDatePicker-test.tsx.snap b/test/unit-tests/components/views/messages/__snapshots__/JumpToDatePicker-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/JumpToDatePicker-test.tsx.snap rename to test/unit-tests/components/views/messages/__snapshots__/JumpToDatePicker-test.tsx.snap diff --git a/test/unit-tests/components/views/messages/__snapshots__/MBeaconBody-test.tsx.snap b/test/unit-tests/components/views/messages/__snapshots__/MBeaconBody-test.tsx.snap new file mode 100644 index 0000000000..de31628ec3 --- /dev/null +++ b/test/unit-tests/components/views/messages/__snapshots__/MBeaconBody-test.tsx.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` when map display is not configured renders maps unavailable error for a live beacon with location 1`] = ` +
+ + + +

+ Unable to load map +

+

+ This homeserver is not configured to display maps. +

+
+`; diff --git a/test/unit-tests/components/views/messages/__snapshots__/MFileBody-test.tsx.snap b/test/unit-tests/components/views/messages/__snapshots__/MFileBody-test.tsx.snap new file mode 100644 index 0000000000..d15b7f454e --- /dev/null +++ b/test/unit-tests/components/views/messages/__snapshots__/MFileBody-test.tsx.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should show a download button in file rendering type 1`] = ` + +`; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/MImageBody-test.tsx.snap b/test/unit-tests/components/views/messages/__snapshots__/MImageBody-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/MImageBody-test.tsx.snap rename to test/unit-tests/components/views/messages/__snapshots__/MImageBody-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/MLocationBody-test.tsx.snap b/test/unit-tests/components/views/messages/__snapshots__/MLocationBody-test.tsx.snap similarity index 97% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/MLocationBody-test.tsx.snap rename to test/unit-tests/components/views/messages/__snapshots__/MLocationBody-test.tsx.snap index f5b7a06a17..5a61ada30f 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/MLocationBody-test.tsx.snap +++ b/test/unit-tests/components/views/messages/__snapshots__/MLocationBody-test.tsx.snap @@ -34,6 +34,7 @@ exports[`MLocationBody without error renders map correctly 1`] = class="mx_MLocationBody" >
without error renders marker correctly fo class="mx_MLocationBody" >
- -
+ />
- -
+ />
- -
+ />
- -
+ />
- -
+ />
- -
+ />
- -
+ />
- -
+ />
- -
+ />
- -
+ />
- -
+ />
- -
+ />
+
+ + + + Pinned message +
+ +`; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/ReactionsRowButton-test.tsx.snap b/test/unit-tests/components/views/messages/__snapshots__/ReactionsRowButton-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/ReactionsRowButton-test.tsx.snap rename to test/unit-tests/components/views/messages/__snapshots__/ReactionsRowButton-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/RoomPredecessorTile-test.tsx.snap b/test/unit-tests/components/views/messages/__snapshots__/RoomPredecessorTile-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/RoomPredecessorTile-test.tsx.snap rename to test/unit-tests/components/views/messages/__snapshots__/RoomPredecessorTile-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap b/test/unit-tests/components/views/messages/__snapshots__/TextualBody-test.tsx.snap similarity index 70% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap rename to test/unit-tests/components/views/messages/__snapshots__/TextualBody-test.tsx.snap index 56de44137f..1ea245acf0 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap +++ b/test/unit-tests/components/views/messages/__snapshots__/TextualBody-test.tsx.snap @@ -50,14 +50,20 @@ exports[` renders formatted m.text correctly linkification is not 1 - - https://matrix.org/ +
+ + https://matrix.org/ - - + +
-
@@ -254,14 +260,20 @@ exports[` renders formatted m.text correctly pills do not appear 1 - - @room +
+ + @room - - + +
-
@@ -321,6 +333,133 @@ exports[` renders formatted m.text correctly renders formatted bo `; +exports[` renders formatted m.text correctly should syntax highlight code blocks 1`] = ` +
+
+
+      
+        
+          1
+        
+        
+          2
+        
+        
+          3
+        
+        
+          4
+        
+        
+          5
+        
+        
+          6
+        
+        
+          7
+        
+        
+          8
+        
+        
+          9
+        
+        
+          10
+        
+      
+      
+ + + # Python Program to calculate the square root + + + + + + # Note: change this value for a different result + + +num = + + 8 + + + + + + # To take the input from the user + + + + + #num = float(input('Enter a number: ')) + + + +num_sqrt = num ** + + 0.5 + + + + + print + + ( + + 'The square root of %0.3f is %0.3f' + + %(num ,num_sqrt)) + + +
+
+ +
+
+ + +
+`; + exports[` renders formatted m.text correctly spoilers get injected properly into the DOM 1`] = `
renders plain-text m.text correctly should pillify a pe class="mx_Pill mx_EventPill" href="https://matrix.to/#/!room1:example.com/!abc123" > -
+ fill="currentColor" + height="1em" + viewBox="0 0 24 24" + width="1em" + xmlns="http://www.w3.org/2000/svg" + > + + diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/shared/MediaProcessingError-test.tsx b/test/unit-tests/components/views/messages/shared/MediaProcessingError-test.tsx similarity index 79% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/shared/MediaProcessingError-test.tsx rename to test/unit-tests/components/views/messages/shared/MediaProcessingError-test.tsx index 7d9bc2e513..3767e7f985 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/messages/shared/MediaProcessingError-test.tsx +++ b/test/unit-tests/components/views/messages/shared/MediaProcessingError-test.tsx @@ -7,9 +7,9 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render } from "@testing-library/react"; +import { render } from "jest-matrix-react"; -import MediaProcessingError from "../../../../../src/components/views/messages/shared/MediaProcessingError"; +import MediaProcessingError from "../../../../../../src/components/views/messages/shared/MediaProcessingError"; describe("", () => { const defaultProps = { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/messages/shared/__snapshots__/MediaProcessingError-test.tsx.snap b/test/unit-tests/components/views/messages/shared/__snapshots__/MediaProcessingError-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/messages/shared/__snapshots__/MediaProcessingError-test.tsx.snap rename to test/unit-tests/components/views/messages/shared/__snapshots__/MediaProcessingError-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/PollHistory-test.tsx b/test/unit-tests/components/views/polls/pollHistory/PollHistory-test.tsx similarity index 97% rename from linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/PollHistory-test.tsx rename to test/unit-tests/components/views/polls/pollHistory/PollHistory-test.tsx index bcf7164198..96aeffb03c 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/PollHistory-test.tsx +++ b/test/unit-tests/components/views/polls/pollHistory/PollHistory-test.tsx @@ -7,10 +7,10 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { act, fireEvent, render } from "@testing-library/react"; +import { act, fireEvent, render } from "jest-matrix-react"; import { Filter, EventTimeline, Room, MatrixEvent, M_POLL_START } from "matrix-js-sdk/src/matrix"; -import { PollHistory } from "../../../../../src/components/views/polls/pollHistory/PollHistory"; +import { PollHistory } from "../../../../../../src/components/views/polls/pollHistory/PollHistory"; import { flushPromises, getMockClientWithEventEmitter, @@ -21,11 +21,11 @@ import { mockIntlDateTimeFormat, setupRoomWithPollEvents, unmockIntlDateTimeFormat, -} from "../../../../test-utils"; -import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; -import defaultDispatcher from "../../../../../src/dispatcher/dispatcher"; -import { Action } from "../../../../../src/dispatcher/actions"; -import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +} from "../../../../../test-utils"; +import { RoomPermalinkCreator } from "../../../../../../src/utils/permalinks/Permalinks"; +import defaultDispatcher from "../../../../../../src/dispatcher/dispatcher"; +import { Action } from "../../../../../../src/dispatcher/actions"; +import MatrixClientContext from "../../../../../../src/contexts/MatrixClientContext"; describe("", () => { // 14.03.2022 16:15 diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/PollListItem-test.tsx b/test/unit-tests/components/views/polls/pollHistory/PollListItem-test.tsx similarity index 86% rename from linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/PollListItem-test.tsx rename to test/unit-tests/components/views/polls/pollHistory/PollListItem-test.tsx index 2ccd78b08c..7c4cc6009f 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/PollListItem-test.tsx +++ b/test/unit-tests/components/views/polls/pollHistory/PollListItem-test.tsx @@ -7,15 +7,14 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { fireEvent, render } from "@testing-library/react"; +import { fireEvent, render } from "jest-matrix-react"; import { MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { PollListItem } from "../../../../../src/components/views/polls/pollHistory/PollListItem"; -import { makePollStartEvent, mockIntlDateTimeFormat, unmockIntlDateTimeFormat } from "../../../../test-utils"; +import { PollListItem } from "../../../../../../src/components/views/polls/pollHistory/PollListItem"; +import { makePollStartEvent, mockIntlDateTimeFormat, unmockIntlDateTimeFormat } from "../../../../../test-utils"; describe("", () => { const event = makePollStartEvent("Question?", "@me:domain.org"); - event.getContent().origin; const defaultProps = { event, onClick: jest.fn() }; const getComponent = (props = {}) => render(); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/PollListItemEnded-test.tsx b/test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx similarity index 82% rename from linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/PollListItemEnded-test.tsx rename to test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx index 6d35b48615..a1d833c2b5 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/PollListItemEnded-test.tsx +++ b/test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx @@ -7,12 +7,11 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render } from "@testing-library/react"; +import { render } from "jest-matrix-react"; import { MatrixEvent, Poll, Room, M_TEXT } from "matrix-js-sdk/src/matrix"; -import { PollListItemEnded } from "../../../../../src/components/views/polls/pollHistory/PollListItemEnded"; +import { PollListItemEnded } from "../../../../../../src/components/views/polls/pollHistory/PollListItemEnded"; import { - flushPromises, getMockClientWithEventEmitter, makePollEndEvent, makePollResponseEvent, @@ -20,8 +19,7 @@ import { mockClientMethodsUser, mockIntlDateTimeFormat, setupRoomWithPollEvents, - unmockIntlDateTimeFormat, -} from "../../../../test-utils"; +} from "../../../../../test-utils"; describe("", () => { const userId = "@alice:domain.org"; @@ -54,14 +52,14 @@ describe("", () => { const getComponent = (props: { event: MatrixEvent; poll: Poll }) => render(); - beforeAll(() => { + beforeEach(() => { // mock default locale to en-GB and set timezone // so these tests run the same everywhere mockIntlDateTimeFormat(); }); - afterAll(() => { - unmockIntlDateTimeFormat(); + afterEach(() => { + jest.resetAllMocks(); }); it("renders a poll with no responses", async () => { @@ -81,10 +79,8 @@ describe("", () => { await setupRoomWithPollEvents([pollStartEvent], responses, [pollEndEvent], mockClient, room); const poll = room.polls.get(pollId)!; - const { getByText } = getComponent({ event: pollStartEvent, poll }); - // fetch relations - await flushPromises(); - expect(getByText("Final result based on 3 votes")).toBeInTheDocument(); + const { getByText, findByText } = getComponent({ event: pollStartEvent, poll }); + await expect(findByText("Final result based on 3 votes")).resolves.toBeInTheDocument(); // winning answer expect(getByText("Nissan Silvia S15")).toBeInTheDocument(); }); @@ -99,10 +95,8 @@ describe("", () => { await setupRoomWithPollEvents([pollStartEvent], responses, [pollEndEvent], mockClient, room); const poll = room.polls.get(pollId)!; - const { getByText } = getComponent({ event: pollStartEvent, poll }); - // fetch relations - await flushPromises(); - expect(getByText("Final result based on 4 votes")).toBeInTheDocument(); + const { getByText, findByText } = getComponent({ event: pollStartEvent, poll }); + await expect(findByText("Final result based on 4 votes")).resolves.toBeInTheDocument(); // both answers answer expect(getByText("Nissan Silvia S15")).toBeInTheDocument(); expect(getByText("Mitsubishi Lancer Evolution IX")).toBeInTheDocument(); @@ -120,12 +114,10 @@ describe("", () => { await setupRoomWithPollEvents([pollStartEvent], responses, [pollEndEvent], mockClient, room); const poll = room.polls.get(pollId)!; - const { getByText } = getComponent({ event: pollStartEvent, poll }); - // fetch relations - await flushPromises(); + const { getByText, findByText } = getComponent({ event: pollStartEvent, poll }); // still only 3 unique votes - expect(getByText("Final result based on 3 votes")).toBeInTheDocument(); + await expect(findByText("Final result based on 3 votes")).resolves.toBeInTheDocument(); // only latest vote counted expect(getByText("Nissan Silvia S15")).toBeInTheDocument(); }); @@ -139,12 +131,10 @@ describe("", () => { await setupRoomWithPollEvents([pollStartEvent], responses, [pollEndEvent], mockClient, room); const poll = room.polls.get(pollId)!; - const { getByText } = getComponent({ event: pollStartEvent, poll }); - // fetch relations - await flushPromises(); + const { findByText } = getComponent({ event: pollStartEvent, poll }); // invalid vote excluded - expect(getByText("Final result based on 2 votes")).toBeInTheDocument(); + await expect(findByText("Final result based on 2 votes")).resolves.toBeInTheDocument(); }); it("updates on new responses", async () => { @@ -156,10 +146,8 @@ describe("", () => { const poll = room.polls.get(pollId)!; const { getByText, queryByText, findByText } = getComponent({ event: pollStartEvent, poll }); - // fetch relations - await flushPromises(); - expect(getByText("Final result based on 2 votes")).toBeInTheDocument(); + await expect(findByText("Final result based on 2 votes")).resolves.toBeInTheDocument(); await room.processPollEvents([ makePollResponseEvent(pollId, [answerOne.id], "@han:domain.org", roomId, timestamp + 1), diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap b/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap similarity index 86% rename from linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap rename to test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap index f78f2e4642..b6bd7b72d8 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap +++ b/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap @@ -22,9 +22,18 @@ exports[` Poll detail navigates back to poll list from detail vie role="button" tabindex="0" > -
+ fill="currentColor" + height="1em" + viewBox="0 0 24 24" + width="1em" + xmlns="http://www.w3.org/2000/svg" + > + + Active polls
`; @@ -82,6 +91,7 @@ exports[` renders a list of active polls when there are polls in tabindex="0" >
@@ -106,6 +116,7 @@ exports[` renders a list of active polls when there are polls in tabindex="0" >
diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/__snapshots__/PollListItem-test.tsx.snap b/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollListItem-test.tsx.snap similarity index 94% rename from linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/__snapshots__/PollListItem-test.tsx.snap rename to test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollListItem-test.tsx.snap index 637f79d334..7b65c6e506 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/__snapshots__/PollListItem-test.tsx.snap +++ b/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollListItem-test.tsx.snap @@ -10,6 +10,7 @@ exports[` renders a poll 1`] = ` tabindex="0" >
diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/__snapshots__/PollListItemEnded-test.tsx.snap b/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollListItemEnded-test.tsx.snap similarity index 96% rename from linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/__snapshots__/PollListItemEnded-test.tsx.snap rename to test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollListItemEnded-test.tsx.snap index b9dfbcce32..1d8ea3c55e 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/polls/pollHistory/__snapshots__/PollListItemEnded-test.tsx.snap +++ b/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollListItemEnded-test.tsx.snap @@ -10,6 +10,7 @@ exports[` renders a poll with no responses 1`] = ` tabindex="0" >
({ + instance: { + popCard: jest.fn(), + roomPhaseHistory: [], + }, +})); + +describe("", () => { + it("should close when clicking X button", async () => { + const { asFragment } = render( + +
Content
+
, + ); + + expect(screen.getByRole("heading")).toHaveTextContent("Heading text"); + expect(asFragment()).toMatchSnapshot(); + + fireEvent.click(screen.getByTestId("base-card-close-button")); + expect(RightPanelStore.instance.popCard).toHaveBeenCalled(); + }); +}); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/ExtensionsCard-test.tsx b/test/unit-tests/components/views/right_panel/ExtensionsCard-test.tsx similarity index 90% rename from linked-dependencies/matrix-react-sdk/test/components/views/right_panel/ExtensionsCard-test.tsx rename to test/unit-tests/components/views/right_panel/ExtensionsCard-test.tsx index 4f781aa17b..932d75dd0d 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/ExtensionsCard-test.tsx +++ b/test/unit-tests/components/views/right_panel/ExtensionsCard-test.tsx @@ -8,19 +8,19 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { mocked, Mocked } from "jest-mock"; -import { render, screen } from "@testing-library/react"; +import { render, screen } from "jest-matrix-react"; import { MatrixClient, Room } from "matrix-js-sdk/src/matrix"; import { MatrixWidgetType } from "matrix-widget-api"; import userEvent from "@testing-library/user-event"; -import ExtensionsCard from "../../../../src/components/views/right_panel/ExtensionsCard"; -import { stubClient } from "../../../test-utils"; -import { IApp } from "../../../../src/stores/WidgetStore"; -import WidgetUtils, { useWidgets } from "../../../../src/utils/WidgetUtils"; -import { WidgetLayoutStore } from "../../../../src/stores/widgets/WidgetLayoutStore"; -import { IntegrationManagers } from "../../../../src/integrations/IntegrationManagers"; +import ExtensionsCard from "../../../../../src/components/views/right_panel/ExtensionsCard"; +import { stubClient } from "../../../../test-utils"; +import { IApp } from "../../../../../src/stores/WidgetStore"; +import WidgetUtils, { useWidgets } from "../../../../../src/utils/WidgetUtils"; +import { WidgetLayoutStore } from "../../../../../src/stores/widgets/WidgetLayoutStore"; +import { IntegrationManagers } from "../../../../../src/integrations/IntegrationManagers"; -jest.mock("../../../../src/utils/WidgetUtils"); +jest.mock("../../../../../src/utils/WidgetUtils"); describe("", () => { let client: Mocked; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/PinnedMessagesCard-test.tsx b/test/unit-tests/components/views/right_panel/PinnedMessagesCard-test.tsx similarity index 91% rename from linked-dependencies/matrix-react-sdk/test/components/views/right_panel/PinnedMessagesCard-test.tsx rename to test/unit-tests/components/views/right_panel/PinnedMessagesCard-test.tsx index 8f8ffa3520..a8f7c653f9 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/PinnedMessagesCard-test.tsx +++ b/test/unit-tests/components/views/right_panel/PinnedMessagesCard-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, act, RenderResult, waitForElementToBeRemoved, screen } from "@testing-library/react"; +import { render, act, RenderResult, waitForElementToBeRemoved, screen, waitFor } from "jest-matrix-react"; import { mocked, MockedObject } from "jest-mock"; import { MatrixEvent, @@ -27,13 +27,13 @@ import { PollEndEvent } from "matrix-js-sdk/src/extensible_events_v1/PollEndEven import { sleep } from "matrix-js-sdk/src/utils"; import userEvent from "@testing-library/user-event"; -import { stubClient, mkEvent, mkMessage, flushPromises } from "../../../test-utils"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import { PinnedMessagesCard } from "../../../../src/components/views/right_panel/PinnedMessagesCard"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import Modal from "../../../../src/Modal"; -import { UnpinAllDialog } from "../../../../src/components/views/dialogs/UnpinAllDialog"; +import { stubClient, mkEvent, mkMessage, flushPromises } from "../../../../test-utils"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import { PinnedMessagesCard } from "../../../../../src/components/views/right_panel/PinnedMessagesCard"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import Modal from "../../../../../src/Modal"; +import { UnpinAllDialog } from "../../../../../src/components/views/dialogs/UnpinAllDialog"; describe("", () => { let cli: MockedObject; @@ -192,7 +192,7 @@ describe("", () => { it("should show two pinned messages", async () => { const { asFragment } = await initPinnedMessagesCard([pin1], [pin2]); - expect(screen.queryAllByRole("listitem")).toHaveLength(2); + await waitFor(() => expect(screen.queryAllByRole("listitem")).toHaveLength(2)); expect(asFragment()).toMatchSnapshot(); }); @@ -208,36 +208,36 @@ describe("", () => { ); await initPinnedMessagesCard(events, []); - expect(screen.queryAllByRole("listitem")).toHaveLength(100); - }); + await waitFor(() => expect(screen.queryAllByRole("listitem")).toHaveLength(100)); + }, 15000); it("should updates when messages are pinned", async () => { // Start with nothing pinned const { addLocalPinEvent, addNonLocalPinEvent } = await initPinnedMessagesCard([], []); - expect(screen.queryAllByRole("listitem")).toHaveLength(0); + await waitFor(() => expect(screen.queryAllByRole("listitem")).toHaveLength(0)); // Pin the first message await addLocalPinEvent(pin1); - expect(screen.getAllByRole("listitem")).toHaveLength(1); + await waitFor(() => expect(screen.queryAllByRole("listitem")).toHaveLength(1)); // Pin the second message await addNonLocalPinEvent(pin2); - expect(screen.getAllByRole("listitem")).toHaveLength(2); + await waitFor(() => expect(screen.queryAllByRole("listitem")).toHaveLength(2)); }); it("should updates when messages are unpinned", async () => { // Start with two pins const { removeLastLocalPinEvent, removeLastNonLocalPinEvent } = await initPinnedMessagesCard([pin1], [pin2]); - expect(screen.getAllByRole("listitem")).toHaveLength(2); + await waitFor(() => expect(screen.queryAllByRole("listitem")).toHaveLength(2)); // Unpin the first message await removeLastLocalPinEvent(); - expect(screen.getAllByRole("listitem")).toHaveLength(1); + await waitFor(() => expect(screen.queryAllByRole("listitem")).toHaveLength(1)); // Unpin the second message await removeLastNonLocalPinEvent(); - expect(screen.queryAllByRole("listitem")).toHaveLength(0); + await waitFor(() => expect(screen.queryAllByRole("listitem")).toHaveLength(0)); }); it("should display an edited pinned event", async () => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/RoomSummaryCard-test.tsx b/test/unit-tests/components/views/right_panel/RoomSummaryCard-test.tsx similarity index 84% rename from linked-dependencies/matrix-react-sdk/test/components/views/right_panel/RoomSummaryCard-test.tsx rename to test/unit-tests/components/views/right_panel/RoomSummaryCard-test.tsx index 2e230c6352..a98552ea07 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/RoomSummaryCard-test.tsx +++ b/test/unit-tests/components/views/right_panel/RoomSummaryCard-test.tsx @@ -7,32 +7,32 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, fireEvent, screen, waitFor } from "@testing-library/react"; +import { render, fireEvent, screen, waitFor } from "jest-matrix-react"; import { EventType, MatrixEvent, Room, MatrixClient, JoinRule } from "matrix-js-sdk/src/matrix"; import { KnownMembership } from "matrix-js-sdk/src/types"; import { mocked, MockedObject } from "jest-mock"; import userEvent from "@testing-library/user-event"; -import DMRoomMap from "../../../../src/utils/DMRoomMap"; -import RoomSummaryCard from "../../../../src/components/views/right_panel/RoomSummaryCard"; -import ShareDialog from "../../../../src/components/views/dialogs/ShareDialog"; -import ExportDialog from "../../../../src/components/views/dialogs/ExportDialog"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import defaultDispatcher from "../../../../src/dispatcher/dispatcher"; -import * as settingsHooks from "../../../../src/hooks/useSettings"; -import Modal from "../../../../src/Modal"; -import RightPanelStore from "../../../../src/stores/right-panel/RightPanelStore"; -import { RightPanelPhases } from "../../../../src/stores/right-panel/RightPanelStorePhases"; -import { flushPromises, getMockClientWithEventEmitter, mockClientMethodsUser } from "../../../test-utils"; -import { PollHistoryDialog } from "../../../../src/components/views/dialogs/PollHistoryDialog"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import { _t } from "../../../../src/languageHandler"; -import { tagRoom } from "../../../../src/utils/room/tagRoom"; -import { DefaultTagID } from "../../../../src/stores/room-list/models"; -import { Action } from "../../../../src/dispatcher/actions"; -import RoomContext, { TimelineRenderingType } from "../../../../src/contexts/RoomContext"; - -jest.mock("../../../../src/utils/room/tagRoom"); +import DMRoomMap from "../../../../../src/utils/DMRoomMap"; +import RoomSummaryCard from "../../../../../src/components/views/right_panel/RoomSummaryCard"; +import ShareDialog from "../../../../../src/components/views/dialogs/ShareDialog"; +import ExportDialog from "../../../../../src/components/views/dialogs/ExportDialog"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import defaultDispatcher from "../../../../../src/dispatcher/dispatcher"; +import * as settingsHooks from "../../../../../src/hooks/useSettings"; +import Modal from "../../../../../src/Modal"; +import RightPanelStore from "../../../../../src/stores/right-panel/RightPanelStore"; +import { RightPanelPhases } from "../../../../../src/stores/right-panel/RightPanelStorePhases"; +import { flushPromises, getMockClientWithEventEmitter, mockClientMethodsUser } from "../../../../test-utils"; +import { PollHistoryDialog } from "../../../../../src/components/views/dialogs/PollHistoryDialog"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { _t } from "../../../../../src/languageHandler"; +import { tagRoom } from "../../../../../src/utils/room/tagRoom"; +import { DefaultTagID } from "../../../../../src/stores/room-list/models"; +import { Action } from "../../../../../src/dispatcher/actions"; +import RoomContext, { TimelineRenderingType } from "../../../../../src/contexts/RoomContext"; + +jest.mock("../../../../../src/utils/room/tagRoom"); describe("", () => { const userId = "@alice:domain.org"; @@ -258,6 +258,36 @@ describe("", () => { expect(defaultDispatcher.dispatch).toHaveBeenCalledWith({ action: "open_room_settings" }); }); + it("opens room member list on button click", () => { + const { getByText } = getComponent(); + + fireEvent.click(getByText("People")); + + expect(RightPanelStore.instance.pushCard).toHaveBeenCalledWith( + { phase: RightPanelPhases.RoomMemberList }, + true, + ); + }); + + it("opens room threads list on button click", () => { + const { getByText } = getComponent(); + + fireEvent.click(getByText("Threads")); + + expect(RightPanelStore.instance.pushCard).toHaveBeenCalledWith({ phase: RightPanelPhases.ThreadPanel }, true); + }); + + it("opens room pinned messages on button click", () => { + const { getByText } = getComponent(); + + fireEvent.click(getByText("Pinned messages")); + + expect(RightPanelStore.instance.pushCard).toHaveBeenCalledWith( + { phase: RightPanelPhases.PinnedMessages }, + true, + ); + }); + describe("pinning", () => { it("renders pins options", () => { const { getByText } = getComponent(); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/UserInfo-test.tsx b/test/unit-tests/components/views/right_panel/UserInfo-test.tsx similarity index 96% rename from linked-dependencies/matrix-react-sdk/test/components/views/right_panel/UserInfo-test.tsx rename to test/unit-tests/components/views/right_panel/UserInfo-test.tsx index 8c21246fa5..c9996d7d67 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/UserInfo-test.tsx +++ b/test/unit-tests/components/views/right_panel/UserInfo-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { fireEvent, render, screen, waitFor, cleanup, act, within } from "@testing-library/react"; +import { fireEvent, render, screen, waitFor, cleanup, act, within } from "jest-matrix-react"; import userEvent from "@testing-library/user-event"; import { Mocked, mocked } from "jest-mock"; import { Room, User, MatrixClient, RoomMember, MatrixEvent, EventType, Device } from "matrix-js-sdk/src/matrix"; @@ -34,38 +34,38 @@ import UserInfo, { RoomKickButton, UserInfoHeader, UserOptionsSection, -} from "../../../../src/components/views/right_panel/UserInfo"; -import dis from "../../../../src/dispatcher/dispatcher"; -import { RightPanelPhases } from "../../../../src/stores/right-panel/RightPanelStorePhases"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import MultiInviter from "../../../../src/utils/MultiInviter"; -import * as mockVerification from "../../../../src/verification"; -import Modal from "../../../../src/Modal"; -import { E2EStatus } from "../../../../src/utils/ShieldUtils"; -import { DirectoryMember, startDmOnFirstMessage } from "../../../../src/utils/direct-messages"; -import { clearAllModals, flushPromises } from "../../../test-utils"; -import ErrorDialog from "../../../../src/components/views/dialogs/ErrorDialog"; -import { shouldShowComponent } from "../../../../src/customisations/helpers/UIComponents"; -import { UIComponent } from "../../../../src/settings/UIFeature"; -import { Action } from "../../../../src/dispatcher/actions"; -import ShareDialog from "../../../../src/components/views/dialogs/ShareDialog"; -import BulkRedactDialog from "../../../../src/components/views/dialogs/BulkRedactDialog"; - -jest.mock("../../../../src/utils/direct-messages", () => ({ - ...jest.requireActual("../../../../src/utils/direct-messages"), +} from "../../../../../src/components/views/right_panel/UserInfo"; +import dis from "../../../../../src/dispatcher/dispatcher"; +import { RightPanelPhases } from "../../../../../src/stores/right-panel/RightPanelStorePhases"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import MultiInviter from "../../../../../src/utils/MultiInviter"; +import * as mockVerification from "../../../../../src/verification"; +import Modal from "../../../../../src/Modal"; +import { E2EStatus } from "../../../../../src/utils/ShieldUtils"; +import { DirectoryMember, startDmOnFirstMessage } from "../../../../../src/utils/direct-messages"; +import { clearAllModals, flushPromises } from "../../../../test-utils"; +import ErrorDialog from "../../../../../src/components/views/dialogs/ErrorDialog"; +import { shouldShowComponent } from "../../../../../src/customisations/helpers/UIComponents"; +import { UIComponent } from "../../../../../src/settings/UIFeature"; +import { Action } from "../../../../../src/dispatcher/actions"; +import ShareDialog from "../../../../../src/components/views/dialogs/ShareDialog"; +import BulkRedactDialog from "../../../../../src/components/views/dialogs/BulkRedactDialog"; + +jest.mock("../../../../../src/utils/direct-messages", () => ({ + ...jest.requireActual("../../../../../src/utils/direct-messages"), startDmOnFirstMessage: jest.fn(), })); -jest.mock("../../../../src/dispatcher/dispatcher"); +jest.mock("../../../../../src/dispatcher/dispatcher"); -jest.mock("../../../../src/customisations/UserIdentifier", () => { +jest.mock("../../../../../src/customisations/UserIdentifier", () => { return { getDisplayUserIdentifier: jest.fn().mockReturnValue("customUserIdentifier"), }; }); -jest.mock("../../../../src/utils/DMRoomMap", () => { +jest.mock("../../../../../src/utils/DMRoomMap", () => { const mock = { getUserIdForRoomId: jest.fn(), getDMRoomsForUserId: jest.fn(), @@ -77,8 +77,8 @@ jest.mock("../../../../src/utils/DMRoomMap", () => { }; }); -jest.mock("../../../../src/customisations/helpers/UIComponents", () => { - const original = jest.requireActual("../../../../src/customisations/helpers/UIComponents"); +jest.mock("../../../../../src/customisations/helpers/UIComponents", () => { + const original = jest.requireActual("../../../../../src/customisations/helpers/UIComponents"); return { shouldShowComponent: jest.fn().mockImplementation(original.shouldShowComponent), }; @@ -142,7 +142,6 @@ beforeEach(() => { isUserIgnored: jest.fn(), getIgnoredUsers: jest.fn(), setIgnoredUsers: jest.fn(), - isCryptoEnabled: jest.fn(), getUserId: jest.fn(), getSafeUserId: jest.fn(), getDomain: jest.fn(), @@ -161,7 +160,6 @@ beforeEach(() => { getRoom: jest.fn(), credentials: {}, setPowerLevel: jest.fn(), - downloadKeys: jest.fn(), getCrypto: jest.fn().mockReturnValue(mockCrypto), } as unknown as MatrixClient); @@ -307,7 +305,7 @@ describe("", () => { it("renders close button correctly when encryption panel with a pending verification request", async () => { renderComponent({ phase: RightPanelPhases.EncryptionPanel, verificationRequest }); screen.getByTestId("base-card-close-button").focus(); - await expect(screen.findByRole("tooltip", { name: "Cancel" })).resolves.toBeInTheDocument(); + expect(screen.getByText("Cancel")).toBeInTheDocument(); }); }); @@ -424,7 +422,6 @@ describe("", () => { describe("with crypto enabled", () => { beforeEach(() => { - mockClient.isCryptoEnabled.mockReturnValue(true); mockClient.doesServerSupportUnstableFeature.mockResolvedValue(true); mockCrypto.getUserVerificationStatus.mockResolvedValue(new UserVerificationStatus(false, false, false)); @@ -663,7 +660,6 @@ describe("", () => { describe("with an encrypted room", () => { beforeEach(() => { - mockClient.isCryptoEnabled.mockReturnValue(true); mockClient.isRoomEncrypted.mockReturnValue(true); }); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/VerificationPanel-test.tsx b/test/unit-tests/components/views/right_panel/VerificationPanel-test.tsx similarity index 97% rename from linked-dependencies/matrix-react-sdk/test/components/views/right_panel/VerificationPanel-test.tsx rename to test/unit-tests/components/views/right_panel/VerificationPanel-test.tsx index eb3da8cddc..adc496e197 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/VerificationPanel-test.tsx +++ b/test/unit-tests/components/views/right_panel/VerificationPanel-test.tsx @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ -import { act, render, waitFor } from "@testing-library/react"; +import { act, render, waitFor } from "jest-matrix-react"; import React, { ComponentProps } from "react"; import { User, TypedEventEmitter, Device, MatrixClient } from "matrix-js-sdk/src/matrix"; import { mocked, Mocked } from "jest-mock"; @@ -21,8 +21,8 @@ import { VerifierEventHandlerMap, } from "matrix-js-sdk/src/crypto-api"; -import VerificationPanel from "../../../../src/components/views/right_panel/VerificationPanel"; -import { flushPromises, stubClient } from "../../../test-utils"; +import VerificationPanel from "../../../../../src/components/views/right_panel/VerificationPanel"; +import { flushPromises, stubClient } from "../../../../test-utils"; describe("", () => { let client: MatrixClient; diff --git a/test/unit-tests/components/views/right_panel/__snapshots__/BaseCard-test.tsx.snap b/test/unit-tests/components/views/right_panel/__snapshots__/BaseCard-test.tsx.snap new file mode 100644 index 0000000000..21ec64e9b3 --- /dev/null +++ b/test/unit-tests/components/views/right_panel/__snapshots__/BaseCard-test.tsx.snap @@ -0,0 +1,57 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should close when clicking X button 1`] = ` + +
+
+
+

+ Heading text +

+
+ +
+
+
+ Content +
+
+
+
+`; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap b/test/unit-tests/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap similarity index 50% rename from linked-dependencies/matrix-react-sdk/test/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap rename to test/unit-tests/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap index 2cff7803ac..9070878525 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap +++ b/test/unit-tests/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap @@ -8,33 +8,82 @@ exports[` should render empty state 1`] = `
+
+

+ Extensions +

+
+
-
+ xmlns="http://www.w3.org/2000/svg" + > + +

@@ -59,25 +108,67 @@ exports[` should render widgets 1`] = `

+
+

+ Extensions +

+
+
should show the empty state when there are no pi
-

- Pinned message -

+ Pinned messages +

@@ -218,6 +233,7 @@ exports[` should show two pinned messages 1`] = ` class="mx_PinnedEventTile_top" > @alice:example.org @@ -229,7 +245,7 @@ exports[` should show two pinned messages 1`] = ` aria-label="Open menu" class="_icon-button_bh2qc_17" data-state="closed" - id="radix-3" + id="radix-:r16:" role="button" style="--cpd-icon-button-size: 24px;" tabindex="0" @@ -239,7 +255,17 @@ exports[` should show two pinned messages 1`] = ` class="_indicator-icon_133tf_26" style="--cpd-icon-button-size: 100%;" > -
+ + +
@@ -260,7 +286,7 @@ exports[` should show two pinned messages 1`] = ` class="mx_PinnedMessagesCard_unpin" >
@@ -413,6 +452,7 @@ exports[` unpin all should not allow to unpinall 1`] = ` class="mx_PinnedEventTile_top" > @alice:example.org @@ -424,7 +464,7 @@ exports[` unpin all should not allow to unpinall 1`] = ` aria-label="Open menu" class="_icon-button_bh2qc_17" data-state="closed" - id="radix-219" + id="radix-:rtk:" role="button" style="--cpd-icon-button-size: 24px;" tabindex="0" @@ -434,7 +474,17 @@ exports[` unpin all should not allow to unpinall 1`] = ` class="_indicator-icon_133tf_26" style="--cpd-icon-button-size: 100%;" > -
+ + +
diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap b/test/unit-tests/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap similarity index 60% rename from linked-dependencies/matrix-react-sdk/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap rename to test/unit-tests/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap index 8300f4920d..5fb1e66115 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap +++ b/test/unit-tests/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap @@ -8,14 +8,42 @@ exports[` has button to edit topic 1`] = ` id="room-summary-panel" role="tabpanel" > +
+
+ +
-
@@ -44,12 +72,20 @@ exports[` has button to edit topic 1`] = ` style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: center; --mx-flex-gap: var(--cpd-space-2x);" > -
+ xmlns="http://www.w3.org/2000/svg" + > + + Not encrypted @@ -80,7 +116,17 @@ exports[` has button to edit topic 1`] = ` class="_indicator-icon_133tf_26" style="--cpd-icon-button-size: 100%;" > -
+ + +
@@ -114,13 +160,13 @@ exports[` has button to edit topic 1`] = ` >
has button to edit topic 1`] = ` d="M13.905 9.378 12 5.52l-1.905 3.86-4.259.618 3.082 3.004-.727 4.242L12 15.24l3.81 2.003-.728-4.242 3.082-3.004-4.26-.619ZM8.767 7.55l2.336-4.733a1 1 0 0 1 1.794 0l2.336 4.733 5.223.76a1 1 0 0 1 .555 1.705L17.23 13.7l.892 5.202a1 1 0 0 1-1.45 1.054L12 17.5l-4.672 2.456a1 1 0 0 1-1.451-1.054l.892-5.202-3.78-3.685a1 1 0 0 1 .555-1.706l5.223-.759Z" /> - +
has button to edit topic 1`] = `
+ + +
-
@@ -518,12 +726,20 @@ exports[` renders the room summary 1`] = ` style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: center; --mx-flex-gap: var(--cpd-space-2x);" > -
+ xmlns="http://www.w3.org/2000/svg" + > + + Not encrypted @@ -561,13 +777,13 @@ exports[` renders the room summary 1`] = ` >
renders the room summary 1`] = ` d="M13.905 9.378 12 5.52l-1.905 3.86-4.259.618 3.082 3.004-.727 4.242L12 15.24l3.81 2.003-.728-4.242 3.082-3.004-4.26-.619ZM8.767 7.55l2.336-4.733a1 1 0 0 1 1.794 0l2.336 4.733 5.223.76a1 1 0 0 1 .555 1.705L17.23 13.7l.892 5.202a1 1 0 0 1-1.45 1.054L12 17.5l-4.672 2.456a1 1 0 0 1-1.451-1.054l.892-5.202-3.78-3.685a1 1 0 0 1 .555-1.706l5.223-.759Z" /> - +
renders the room summary 1`] = `
+ + +
-
@@ -965,12 +1343,20 @@ exports[` renders the room topic in the summary 1`] = ` style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: center; --mx-flex-gap: var(--cpd-space-2x);" > -
+ xmlns="http://www.w3.org/2000/svg" + > + + Not encrypted @@ -1001,7 +1387,17 @@ exports[` renders the room topic in the summary 1`] = ` class="_indicator-icon_133tf_26" style="--cpd-icon-button-size: 100%;" > -
+ + +
@@ -1035,13 +1431,13 @@ exports[` renders the room topic in the summary 1`] = ` >
renders the room topic in the summary 1`] = ` d="M13.905 9.378 12 5.52l-1.905 3.86-4.259.618 3.082 3.004-.727 4.242L12 15.24l3.81 2.003-.728-4.242 3.082-3.004-4.26-.619ZM8.767 7.55l2.336-4.733a1 1 0 0 1 1.794 0l2.336 4.733 5.223.76a1 1 0 0 1 .555 1.705L17.23 13.7l.892 5.202a1 1 0 0 1-1.45 1.054L12 17.5l-4.672 2.456a1 1 0 0 1-1.451-1.054l.892-5.202-3.78-3.685a1 1 0 0 1 .555-1.706l5.223-.759Z" /> - +
renders the room topic in the summary 1`] = `
+ + +`; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomKnocksBar-test.tsx b/test/unit-tests/components/views/rooms/RoomKnocksBar-test.tsx similarity index 89% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomKnocksBar-test.tsx rename to test/unit-tests/components/views/rooms/RoomKnocksBar-test.tsx index b246b3dc25..54a9177fbf 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomKnocksBar-test.tsx +++ b/test/unit-tests/components/views/rooms/RoomKnocksBar-test.tsx @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ -import { act, fireEvent, render, screen } from "@testing-library/react"; +import { act, fireEvent, render, screen } from "jest-matrix-react"; import { EventTimeline, EventType, @@ -20,19 +20,19 @@ import { import { KnownMembership } from "matrix-js-sdk/src/types"; import React from "react"; -import ErrorDialog from "../../../../src/components/views/dialogs/ErrorDialog"; -import { RoomSettingsTab } from "../../../../src/components/views/dialogs/RoomSettingsDialog"; -import { RoomKnocksBar } from "../../../../src/components/views/rooms/RoomKnocksBar"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import dis from "../../../../src/dispatcher/dispatcher"; -import Modal from "../../../../src/Modal"; +import ErrorDialog from "../../../../../src/components/views/dialogs/ErrorDialog"; +import { RoomSettingsTab } from "../../../../../src/components/views/dialogs/RoomSettingsDialog"; +import { RoomKnocksBar } from "../../../../../src/components/views/rooms/RoomKnocksBar"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import dis from "../../../../../src/dispatcher/dispatcher"; +import Modal from "../../../../../src/Modal"; import { clearAllModals, flushPromises, getMockClientWithEventEmitter, mockClientMethodsUser, -} from "../../../test-utils"; -import * as languageHandler from "../../../../src/languageHandler"; +} from "../../../../test-utils"; +import * as languageHandler from "../../../../../src/languageHandler"; describe("RoomKnocksBar", () => { const userId = "@alice:example.org"; @@ -166,9 +166,11 @@ describe("RoomKnocksBar", () => { beforeEach(() => jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob])); it("renders a heading and a paragraph with name and user ID", () => { - getComponent(room); + const { container } = getComponent(room); expect(screen.getByRole("heading")).toHaveTextContent("Asking to join"); - expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name} (${bob.userId})`); + expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent( + `${bob.name} (${bob.userId})`, + ); }); describe("when a knock reason is not provided", () => { @@ -296,24 +298,30 @@ describe("RoomKnocksBar", () => { describe("when knock members count is 2", () => { it("renders a paragraph with two names", () => { jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob, jane]); - getComponent(room); - expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name} and ${jane.name}`); + const { container } = getComponent(room); + expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent( + `${bob.name} and ${jane.name}`, + ); }); }); describe("when knock members count is 3", () => { it("renders a paragraph with three names", () => { jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob, jane, john]); - getComponent(room); - expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name}, ${jane.name} and ${john.name}`); + const { container } = getComponent(room); + expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent( + `${bob.name}, ${jane.name} and ${john.name}`, + ); }); }); describe("when knock count is greater than 3", () => { it("renders a paragraph with two names and a count", () => { jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob, jane, john, other]); - getComponent(room); - expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name}, ${jane.name} and 2 others`); + const { container } = getComponent(room); + expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent( + `${bob.name}, ${jane.name} and 2 others`, + ); }); }); }); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomList-test.tsx b/test/unit-tests/components/views/rooms/RoomList-test.tsx similarity index 90% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomList-test.tsx rename to test/unit-tests/components/views/rooms/RoomList-test.tsx index a9b78f6c1b..cb824bcdf9 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomList-test.tsx +++ b/test/unit-tests/components/views/rooms/RoomList-test.tsx @@ -8,32 +8,32 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { cleanup, queryByRole, render, screen, within } from "@testing-library/react"; +import { cleanup, queryByRole, render, screen, within } from "jest-matrix-react"; import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; import { Room } from "matrix-js-sdk/src/matrix"; -import RoomList from "../../../../src/components/views/rooms/RoomList"; -import ResizeNotifier from "../../../../src/utils/ResizeNotifier"; -import { MetaSpace } from "../../../../src/stores/spaces"; -import { shouldShowComponent } from "../../../../src/customisations/helpers/UIComponents"; -import { UIComponent } from "../../../../src/settings/UIFeature"; -import dis from "../../../../src/dispatcher/dispatcher"; -import { Action } from "../../../../src/dispatcher/actions"; -import * as testUtils from "../../../test-utils"; -import { mkSpace, stubClient } from "../../../test-utils"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import SpaceStore from "../../../../src/stores/spaces/SpaceStore"; -import DMRoomMap from "../../../../src/utils/DMRoomMap"; -import RoomListStore from "../../../../src/stores/room-list/RoomListStore"; -import { ITagMap } from "../../../../src/stores/room-list/algorithms/models"; -import { DefaultTagID } from "../../../../src/stores/room-list/models"; - -jest.mock("../../../../src/customisations/helpers/UIComponents", () => ({ +import RoomList from "../../../../../src/components/views/rooms/RoomList"; +import ResizeNotifier from "../../../../../src/utils/ResizeNotifier"; +import { MetaSpace } from "../../../../../src/stores/spaces"; +import { shouldShowComponent } from "../../../../../src/customisations/helpers/UIComponents"; +import { UIComponent } from "../../../../../src/settings/UIFeature"; +import dis from "../../../../../src/dispatcher/dispatcher"; +import { Action } from "../../../../../src/dispatcher/actions"; +import * as testUtils from "../../../../test-utils"; +import { mkSpace, stubClient } from "../../../../test-utils"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import SpaceStore from "../../../../../src/stores/spaces/SpaceStore"; +import DMRoomMap from "../../../../../src/utils/DMRoomMap"; +import RoomListStore from "../../../../../src/stores/room-list/RoomListStore"; +import { ITagMap } from "../../../../../src/stores/room-list/algorithms/models"; +import { DefaultTagID } from "../../../../../src/stores/room-list/models"; + +jest.mock("../../../../../src/customisations/helpers/UIComponents", () => ({ shouldShowComponent: jest.fn(), })); -jest.mock("../../../../src/dispatcher/dispatcher"); +jest.mock("../../../../../src/dispatcher/dispatcher"); const getUserIdForRoomId = jest.fn(); const getDMRoomsForUserId = jest.fn(); @@ -210,7 +210,6 @@ describe("RoomList", () => { beforeEach(async () => { cleanup(); const rooms: Room[] = []; - RoomListStore.instance; testUtils.mkRoom(client, videoRoomPrivate, rooms); testUtils.mkRoom(client, videoRoomPublic, rooms); testUtils.mkRoom(client, videoRoomKnock, rooms); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomListHeader-test.tsx b/test/unit-tests/components/views/rooms/RoomListHeader-test.tsx similarity index 91% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomListHeader-test.tsx rename to test/unit-tests/components/views/rooms/RoomListHeader-test.tsx index 46a0048083..c44c3a501b 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomListHeader-test.tsx +++ b/test/unit-tests/components/views/rooms/RoomListHeader-test.tsx @@ -9,23 +9,23 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { MatrixClient, Room, EventType } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; -import { act, render, screen, fireEvent, RenderResult } from "@testing-library/react"; - -import SpaceStore from "../../../../src/stores/spaces/SpaceStore"; -import { MetaSpace } from "../../../../src/stores/spaces"; -import _RoomListHeader from "../../../../src/components/views/rooms/RoomListHeader"; -import * as testUtils from "../../../test-utils"; -import { stubClient, mkSpace } from "../../../test-utils"; -import DMRoomMap from "../../../../src/utils/DMRoomMap"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import { SettingLevel } from "../../../../src/settings/SettingLevel"; -import { shouldShowComponent } from "../../../../src/customisations/helpers/UIComponents"; -import { UIComponent } from "../../../../src/settings/UIFeature"; +import { act, render, screen, fireEvent, RenderResult } from "jest-matrix-react"; + +import SpaceStore from "../../../../../src/stores/spaces/SpaceStore"; +import { MetaSpace } from "../../../../../src/stores/spaces"; +import _RoomListHeader from "../../../../../src/components/views/rooms/RoomListHeader"; +import * as testUtils from "../../../../test-utils"; +import { stubClient, mkSpace } from "../../../../test-utils"; +import DMRoomMap from "../../../../../src/utils/DMRoomMap"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import { SettingLevel } from "../../../../../src/settings/SettingLevel"; +import { shouldShowComponent } from "../../../../../src/customisations/helpers/UIComponents"; +import { UIComponent } from "../../../../../src/settings/UIFeature"; const RoomListHeader = testUtils.wrapInMatrixClientContext(_RoomListHeader); -jest.mock("../../../../src/customisations/helpers/UIComponents", () => ({ +jest.mock("../../../../../src/customisations/helpers/UIComponents", () => ({ shouldShowComponent: jest.fn(), })); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomPreviewBar-test.tsx b/test/unit-tests/components/views/rooms/RoomPreviewBar-test.tsx similarity index 97% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomPreviewBar-test.tsx rename to test/unit-tests/components/views/rooms/RoomPreviewBar-test.tsx index 45a144c698..fb531bb3bd 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomPreviewBar-test.tsx +++ b/test/unit-tests/components/views/rooms/RoomPreviewBar-test.tsx @@ -7,17 +7,17 @@ Please see LICENSE files in the repository root for full details. */ import React, { ComponentProps } from "react"; -import { render, fireEvent, RenderResult, waitFor, waitForElementToBeRemoved } from "@testing-library/react"; +import { render, fireEvent, RenderResult, waitFor, waitForElementToBeRemoved } from "jest-matrix-react"; import { Room, RoomMember, MatrixError, IContent } from "matrix-js-sdk/src/matrix"; import { KnownMembership } from "matrix-js-sdk/src/types"; -import { withClientContextRenderOptions, stubClient } from "../../../test-utils"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import DMRoomMap from "../../../../src/utils/DMRoomMap"; -import RoomPreviewBar from "../../../../src/components/views/rooms/RoomPreviewBar"; -import defaultDispatcher from "../../../../src/dispatcher/dispatcher"; +import { withClientContextRenderOptions, stubClient } from "../../../../test-utils"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import DMRoomMap from "../../../../../src/utils/DMRoomMap"; +import RoomPreviewBar from "../../../../../src/components/views/rooms/RoomPreviewBar"; +import defaultDispatcher from "../../../../../src/dispatcher/dispatcher"; -jest.mock("../../../../src/IdentityAuthClient", () => { +jest.mock("../../../../../src/IdentityAuthClient", () => { return jest.fn().mockImplementation(() => { return { getAccessToken: jest.fn().mockResolvedValue("mock-token") }; }); @@ -100,7 +100,7 @@ describe("", () => { afterEach(() => { const container = document.body.firstChild; - container && document.body.removeChild(container); + if (container) document.body.removeChild(container); }); it("renders joining message", () => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomPreviewCard-test.tsx b/test/unit-tests/components/views/rooms/RoomPreviewCard-test.tsx similarity index 89% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomPreviewCard-test.tsx rename to test/unit-tests/components/views/rooms/RoomPreviewCard-test.tsx index 4d7cf1d51e..274c79002c 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomPreviewCard-test.tsx +++ b/test/unit-tests/components/views/rooms/RoomPreviewCard-test.tsx @@ -8,16 +8,16 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { mocked, Mocked } from "jest-mock"; -import { render, screen, act } from "@testing-library/react"; +import { render, screen, act } from "jest-matrix-react"; import { PendingEventOrdering, Room, RoomStateEvent, RoomType } from "matrix-js-sdk/src/matrix"; import { KnownMembership } from "matrix-js-sdk/src/types"; import type { MatrixClient, RoomMember } from "matrix-js-sdk/src/matrix"; -import { stubClient, wrapInMatrixClientContext, mkRoomMember } from "../../../test-utils"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import DMRoomMap from "../../../../src/utils/DMRoomMap"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import _RoomPreviewCard from "../../../../src/components/views/rooms/RoomPreviewCard"; +import { stubClient, wrapInMatrixClientContext, mkRoomMember } from "../../../../test-utils"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import DMRoomMap from "../../../../../src/utils/DMRoomMap"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import _RoomPreviewCard from "../../../../../src/components/views/rooms/RoomPreviewCard"; const RoomPreviewCard = wrapInMatrixClientContext(_RoomPreviewCard); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomSearchAuxPanel-test.tsx b/test/unit-tests/components/views/rooms/RoomSearchAuxPanel-test.tsx similarity index 90% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomSearchAuxPanel-test.tsx rename to test/unit-tests/components/views/rooms/RoomSearchAuxPanel-test.tsx index bdf00e3ac8..0c720bf40e 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomSearchAuxPanel-test.tsx +++ b/test/unit-tests/components/views/rooms/RoomSearchAuxPanel-test.tsx @@ -7,10 +7,10 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen } from "@testing-library/react"; +import { render, screen } from "jest-matrix-react"; -import RoomSearchAuxPanel from "../../../../src/components/views/rooms/RoomSearchAuxPanel"; -import { SearchScope } from "../../../../src/Searching"; +import RoomSearchAuxPanel from "../../../../../src/components/views/rooms/RoomSearchAuxPanel"; +import { SearchScope } from "../../../../../src/Searching"; describe("RoomSearchAuxPanel", () => { it("should render the count of results", () => { @@ -81,7 +81,7 @@ describe("RoomSearchAuxPanel", () => { />, ); - screen.getByLabelText("Cancel").click(); + screen.getByRole("button", { name: "Cancel" }).click(); expect(onCancelClick).toHaveBeenCalled(); }); }); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomTile-test.tsx b/test/unit-tests/components/views/rooms/RoomTile-test.tsx similarity index 92% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomTile-test.tsx rename to test/unit-tests/components/views/rooms/RoomTile-test.tsx index 7bb12266d0..7aa9ad8462 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/RoomTile-test.tsx +++ b/test/unit-tests/components/views/rooms/RoomTile-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen, act, RenderResult } from "@testing-library/react"; +import { render, screen, act, RenderResult } from "jest-matrix-react"; import { mocked, Mocked } from "jest-mock"; import { MatrixClient, @@ -32,26 +32,26 @@ import { flushPromises, mkMessage, useMockMediaDevices, -} from "../../../test-utils"; -import { CallStore } from "../../../../src/stores/CallStore"; -import RoomTile from "../../../../src/components/views/rooms/RoomTile"; -import { DefaultTagID } from "../../../../src/stores/room-list/models"; -import DMRoomMap from "../../../../src/utils/DMRoomMap"; -import PlatformPeg from "../../../../src/PlatformPeg"; -import BasePlatform from "../../../../src/BasePlatform"; -import { WidgetMessagingStore } from "../../../../src/stores/widgets/WidgetMessagingStore"; -import { VoiceBroadcastInfoState } from "../../../../src/voice-broadcast"; +} from "../../../../test-utils"; +import { CallStore } from "../../../../../src/stores/CallStore"; +import RoomTile from "../../../../../src/components/views/rooms/RoomTile"; +import { DefaultTagID } from "../../../../../src/stores/room-list/models"; +import DMRoomMap from "../../../../../src/utils/DMRoomMap"; +import PlatformPeg from "../../../../../src/PlatformPeg"; +import BasePlatform from "../../../../../src/BasePlatform"; +import { WidgetMessagingStore } from "../../../../../src/stores/widgets/WidgetMessagingStore"; +import { VoiceBroadcastInfoState } from "../../../../../src/voice-broadcast"; import { mkVoiceBroadcastInfoStateEvent } from "../../../voice-broadcast/utils/test-utils"; import { TestSdkContext } from "../../../TestSdkContext"; -import { SDKContext } from "../../../../src/contexts/SDKContext"; -import { shouldShowComponent } from "../../../../src/customisations/helpers/UIComponents"; -import { UIComponent } from "../../../../src/settings/UIFeature"; -import { MessagePreviewStore } from "../../../../src/stores/room-list/MessagePreviewStore"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import { ConnectionState } from "../../../../src/models/Call"; - -jest.mock("../../../../src/customisations/helpers/UIComponents", () => ({ +import { SDKContext } from "../../../../../src/contexts/SDKContext"; +import { shouldShowComponent } from "../../../../../src/customisations/helpers/UIComponents"; +import { UIComponent } from "../../../../../src/settings/UIFeature"; +import { MessagePreviewStore } from "../../../../../src/stores/room-list/MessagePreviewStore"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import { ConnectionState } from "../../../../../src/models/Call"; + +jest.mock("../../../../../src/customisations/helpers/UIComponents", () => ({ shouldShowComponent: jest.fn(), })); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/SearchResultTile-test.tsx b/test/unit-tests/components/views/rooms/SearchResultTile-test.tsx similarity index 92% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/SearchResultTile-test.tsx rename to test/unit-tests/components/views/rooms/SearchResultTile-test.tsx index 9fd1483d3d..358c36d2fb 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/SearchResultTile-test.tsx +++ b/test/unit-tests/components/views/rooms/SearchResultTile-test.tsx @@ -8,11 +8,11 @@ Please see LICENSE files in the repository root for full details. import * as React from "react"; import { MatrixEvent, Room, EventType } from "matrix-js-sdk/src/matrix"; -import { render, type RenderResult } from "@testing-library/react"; +import { render, type RenderResult } from "jest-matrix-react"; -import { stubClient } from "../../../test-utils"; -import SearchResultTile from "../../../../src/components/views/rooms/SearchResultTile"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; +import { stubClient } from "../../../../test-utils"; +import SearchResultTile from "../../../../../src/components/views/rooms/SearchResultTile"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; const ROOM_ID = "!qPewotXpIctQySfjSy:localhost"; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/SendMessageComposer-test.tsx b/test/unit-tests/components/views/rooms/SendMessageComposer-test.tsx similarity index 94% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/SendMessageComposer-test.tsx rename to test/unit-tests/components/views/rooms/SendMessageComposer-test.tsx index 11d887bd9d..a41c221616 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/SendMessageComposer-test.tsx +++ b/test/unit-tests/components/views/rooms/SendMessageComposer-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { fireEvent, render, waitFor } from "@testing-library/react"; +import { fireEvent, render, waitFor } from "jest-matrix-react"; import { IContent, MatrixClient, MsgType } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; import userEvent from "@testing-library/user-event"; @@ -16,23 +16,23 @@ import SendMessageComposer, { attachMentions, createMessageContent, isQuickReaction, -} from "../../../../src/components/views/rooms/SendMessageComposer"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import RoomContext, { TimelineRenderingType } from "../../../../src/contexts/RoomContext"; -import EditorModel from "../../../../src/editor/model"; +} from "../../../../../src/components/views/rooms/SendMessageComposer"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import RoomContext, { TimelineRenderingType } from "../../../../../src/contexts/RoomContext"; +import EditorModel from "../../../../../src/editor/model"; import { createPartCreator } from "../../../editor/mock"; -import { createTestClient, mkEvent, mkStubRoom, stubClient } from "../../../test-utils"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import defaultDispatcher from "../../../../src/dispatcher/dispatcher"; -import DocumentOffset from "../../../../src/editor/offset"; -import { Layout } from "../../../../src/settings/enums/Layout"; -import { IRoomState } from "../../../../src/components/structures/RoomView"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import { mockPlatformPeg } from "../../../test-utils/platform"; -import { doMaybeLocalRoomAction } from "../../../../src/utils/local-room"; -import { addTextToComposer } from "../../../test-utils/composer"; - -jest.mock("../../../../src/utils/local-room", () => ({ +import { createTestClient, mkEvent, mkStubRoom, stubClient } from "../../../../test-utils"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import defaultDispatcher from "../../../../../src/dispatcher/dispatcher"; +import DocumentOffset from "../../../../../src/editor/offset"; +import { Layout } from "../../../../../src/settings/enums/Layout"; +import { IRoomState, MainSplitContentType } from "../../../../../src/components/structures/RoomView"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { mockPlatformPeg } from "../../../../test-utils/platform"; +import { doMaybeLocalRoomAction } from "../../../../../src/utils/local-room"; +import { addTextToComposer } from "../../../../test-utils/composer"; + +jest.mock("../../../../../src/utils/local-room", () => ({ doMaybeLocalRoomAction: jest.fn(), })); @@ -47,7 +47,6 @@ describe("", () => { showApps: false, isPeeking: false, showRightPanel: true, - threadRightPanel: false, joining: false, atEndOfLiveTimeline: true, showTopUnreadMessagesBar: false, @@ -69,6 +68,7 @@ describe("", () => { showDisplaynameChanges: true, matrixClientIsReady: false, timelineRenderingType: TimelineRenderingType.Room, + mainSplitContentType: MainSplitContentType.Timeline, liveTimeline: undefined, canSelfRedact: false, resizing: false, @@ -571,12 +571,10 @@ describe("", () => { it("should call prepareToEncrypt when the user is typing", async () => { const cli = stubClient(); - cli.isCryptoEnabled = jest.fn().mockReturnValue(true); cli.isRoomEncrypted = jest.fn().mockReturnValue(true); - cli.prepareToEncrypt = jest.fn(); const room = mkStubRoom("!roomId:server", "Room", cli); - expect(cli.prepareToEncrypt).not.toHaveBeenCalled(); + expect(cli.getCrypto()!.prepareToEncrypt).not.toHaveBeenCalled(); const { container } = render( @@ -588,9 +586,9 @@ describe("", () => { // Does not trigger on keydown as that'll cause false negatives for global shortcuts await userEvent.type(composer, "[ControlLeft>][KeyK][/ControlLeft]"); - expect(cli.prepareToEncrypt).not.toHaveBeenCalled(); + expect(cli.getCrypto()!.prepareToEncrypt).not.toHaveBeenCalled(); await userEvent.type(composer, "Hello"); - expect(cli.prepareToEncrypt).toHaveBeenCalled(); + expect(cli.getCrypto()!.prepareToEncrypt).toHaveBeenCalled(); }); }); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/ThirdPartyMemberInfo-test.tsx b/test/unit-tests/components/views/rooms/ThirdPartyMemberInfo-test.tsx similarity index 92% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/ThirdPartyMemberInfo-test.tsx rename to test/unit-tests/components/views/rooms/ThirdPartyMemberInfo-test.tsx index 171a28f02f..958ebf7d1f 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/ThirdPartyMemberInfo-test.tsx +++ b/test/unit-tests/components/views/rooms/ThirdPartyMemberInfo-test.tsx @@ -7,11 +7,11 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen } from "@testing-library/react"; +import { render, screen } from "jest-matrix-react"; import { EventType, IEvent, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix"; -import ThirdPartyMemberInfo from "../../../../src/components/views/rooms/ThirdPartyMemberInfo"; -import { getMockClientWithEventEmitter, mockClientMethodsUser } from "../../../test-utils"; +import ThirdPartyMemberInfo from "../../../../../src/components/views/rooms/ThirdPartyMemberInfo"; +import { getMockClientWithEventEmitter, mockClientMethodsUser } from "../../../../test-utils"; describe("", () => { const userId = "@alice:server.org"; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/VoiceRecordComposerTile-test.tsx b/test/unit-tests/components/views/rooms/VoiceRecordComposerTile-test.tsx similarity index 87% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/VoiceRecordComposerTile-test.tsx rename to test/unit-tests/components/views/rooms/VoiceRecordComposerTile-test.tsx index 246565c162..31bec79879 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/VoiceRecordComposerTile-test.tsx +++ b/test/unit-tests/components/views/rooms/VoiceRecordComposerTile-test.tsx @@ -7,24 +7,24 @@ Please see LICENSE files in the repository root for full details. */ import React, { createRef, RefObject } from "react"; -import { render } from "@testing-library/react"; +import { render } from "jest-matrix-react"; import { MatrixClient, MsgType, Room } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; -import VoiceRecordComposerTile from "../../../../src/components/views/rooms/VoiceRecordComposerTile"; -import { doMaybeLocalRoomAction } from "../../../../src/utils/local-room"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import { IUpload, VoiceMessageRecording } from "../../../../src/audio/VoiceMessageRecording"; -import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks"; -import { VoiceRecordingStore } from "../../../../src/stores/VoiceRecordingStore"; -import { PlaybackClock } from "../../../../src/audio/PlaybackClock"; -import { mkEvent } from "../../../test-utils"; +import VoiceRecordComposerTile from "../../../../../src/components/views/rooms/VoiceRecordComposerTile"; +import { doMaybeLocalRoomAction } from "../../../../../src/utils/local-room"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import { IUpload, VoiceMessageRecording } from "../../../../../src/audio/VoiceMessageRecording"; +import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks"; +import { VoiceRecordingStore } from "../../../../../src/stores/VoiceRecordingStore"; +import { PlaybackClock } from "../../../../../src/audio/PlaybackClock"; +import { mkEvent } from "../../../../test-utils"; -jest.mock("../../../../src/utils/local-room", () => ({ +jest.mock("../../../../../src/utils/local-room", () => ({ doMaybeLocalRoomAction: jest.fn(), })); -jest.mock("../../../../src/stores/VoiceRecordingStore", () => ({ +jest.mock("../../../../../src/stores/VoiceRecordingStore", () => ({ VoiceRecordingStore: { getVoiceRecordingId: jest.fn().mockReturnValue("voice-recording-id"), instance: { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/ExtraTile-test.tsx.snap b/test/unit-tests/components/views/rooms/__snapshots__/ExtraTile-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/ExtraTile-test.tsx.snap rename to test/unit-tests/components/views/rooms/__snapshots__/ExtraTile-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/MemberTile-test.tsx.snap b/test/unit-tests/components/views/rooms/__snapshots__/MemberTile-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/MemberTile-test.tsx.snap rename to test/unit-tests/components/views/rooms/__snapshots__/MemberTile-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/PinnedEventTile-test.tsx.snap b/test/unit-tests/components/views/rooms/__snapshots__/PinnedEventTile-test.tsx.snap similarity index 53% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/PinnedEventTile-test.tsx.snap rename to test/unit-tests/components/views/rooms/__snapshots__/PinnedEventTile-test.tsx.snap index 5c44de4c4d..5e965318f4 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/PinnedEventTile-test.tsx.snap +++ b/test/unit-tests/components/views/rooms/__snapshots__/PinnedEventTile-test.tsx.snap @@ -25,6 +25,7 @@ exports[` should render pinned event 1`] = ` class="mx_PinnedEventTile_top" > @alice:server.org @@ -36,7 +37,7 @@ exports[` should render pinned event 1`] = ` aria-label="Open menu" class="_icon-button_bh2qc_17" data-state="closed" - id="radix-0" + id="radix-:r5:" role="button" style="--cpd-icon-button-size: 24px;" tabindex="0" @@ -46,7 +47,17 @@ exports[` should render pinned event 1`] = ` class="_indicator-icon_133tf_26" style="--cpd-icon-button-size: 100%;" > -
+ + +
@@ -90,6 +101,7 @@ exports[` should render pinned event with thread info 1`] = ` class="mx_PinnedEventTile_top" > @alice:server.org @@ -101,7 +113,7 @@ exports[` should render pinned event with thread info 1`] = ` aria-label="Open menu" class="_icon-button_bh2qc_17" data-state="closed" - id="radix-2" + id="radix-:rd:" role="button" style="--cpd-icon-button-size: 24px;" tabindex="0" @@ -111,7 +123,17 @@ exports[` should render pinned event with thread info 1`] = ` class="_indicator-icon_133tf_26" style="--cpd-icon-button-size: 100%;" > -
+ + +
@@ -128,7 +150,20 @@ exports[` should render pinned event with thread info 1`] = `
-
+ + + + Reply to a
-
+ fill="currentColor" + height="20px" + viewBox="0 0 24 24" + width="20px" + xmlns="http://www.w3.org/2000/svg" + > + + Audio: @@ -188,17 +213,25 @@ exports[` should display the m.file event type 1`] = ` data-testid="banner-indicator" />
-
+ fill="currentColor" + height="20px" + viewBox="0 0 24 24" + width="20px" + xmlns="http://www.w3.org/2000/svg" + > + + File: @@ -235,17 +268,25 @@ exports[` should display the m.image event type 1`] = ` data-testid="banner-indicator" />
-
+ fill="currentColor" + height="20px" + viewBox="0 0 24 24" + width="20px" + xmlns="http://www.w3.org/2000/svg" + > + + Image: @@ -282,17 +323,25 @@ exports[` should display the m.video event type 1`] = ` data-testid="banner-indicator" />
-
+ fill="currentColor" + height="20px" + viewBox="0 0 24 24" + width="20px" + xmlns="http://www.w3.org/2000/svg" + > + + Video: @@ -333,10 +382,18 @@ exports[` should render 2 pinned event 1`] = ` data-testid="banner-indicator" />
-
+ fill="currentColor" + height="20px" + viewBox="0 0 24 24" + width="20px" + xmlns="http://www.w3.org/2000/svg" + > + +
should render 2 pinned event 1`] = `
Second pinned message
-
+ fill="currentColor" + height="20px" + viewBox="0 0 24 24" + width="20px" + xmlns="http://www.w3.org/2000/svg" + > + +
should render 4 pinned event 1`] = `
Fourth pinned message
-
+ fill="currentColor" + height="20px" + viewBox="0 0 24 24" + width="20px" + xmlns="http://www.w3.org/2000/svg" + > + + First pinned message diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/ReadReceiptGroup-test.tsx.snap b/test/unit-tests/components/views/rooms/__snapshots__/ReadReceiptGroup-test.tsx.snap similarity index 86% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/ReadReceiptGroup-test.tsx.snap rename to test/unit-tests/components/views/rooms/__snapshots__/ReadReceiptGroup-test.tsx.snap index 2b5fa463ca..b0ba944a66 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/ReadReceiptGroup-test.tsx.snap +++ b/test/unit-tests/components/views/rooms/__snapshots__/ReadReceiptGroup-test.tsx.snap @@ -2,17 +2,16 @@ exports[`ReadReceiptGroup should display a tooltip 1`] = ` diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/RoomPreviewBar-test.tsx.snap b/test/unit-tests/components/views/rooms/__snapshots__/RoomPreviewBar-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/RoomPreviewBar-test.tsx.snap rename to test/unit-tests/components/views/rooms/__snapshots__/RoomPreviewBar-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/RoomTile-test.tsx.snap b/test/unit-tests/components/views/rooms/__snapshots__/RoomTile-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/RoomTile-test.tsx.snap rename to test/unit-tests/components/views/rooms/__snapshots__/RoomTile-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/ThirdPartyMemberInfo-test.tsx.snap b/test/unit-tests/components/views/rooms/__snapshots__/ThirdPartyMemberInfo-test.tsx.snap similarity index 50% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/ThirdPartyMemberInfo-test.tsx.snap rename to test/unit-tests/components/views/rooms/__snapshots__/ThirdPartyMemberInfo-test.tsx.snap index 75d59fa60d..3e981a8c8d 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/__snapshots__/ThirdPartyMemberInfo-test.tsx.snap +++ b/test/unit-tests/components/views/rooms/__snapshots__/ThirdPartyMemberInfo-test.tsx.snap @@ -9,8 +9,40 @@ exports[` should render invite 1`] = ` class="mx_BaseCard_header" >
+ class="mx_BaseCard_header_title" + > +

+ Profile +

+
+
should render invite when room in not availabl class="mx_BaseCard_header" >
+ class="mx_BaseCard_header_title" + > +

+ Profile +

+
+
{ diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/SendWysiwygComposer-test.tsx b/test/unit-tests/components/views/rooms/wysiwyg_composer/SendWysiwygComposer-test.tsx similarity index 93% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/SendWysiwygComposer-test.tsx rename to test/unit-tests/components/views/rooms/wysiwyg_composer/SendWysiwygComposer-test.tsx index 6627e4bea5..27110149f5 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/SendWysiwygComposer-test.tsx +++ b/test/unit-tests/components/views/rooms/wysiwyg_composer/SendWysiwygComposer-test.tsx @@ -8,20 +8,20 @@ Please see LICENSE files in the repository root for full details. import "@testing-library/jest-dom"; import React from "react"; -import { act, fireEvent, render, screen, waitFor } from "@testing-library/react"; - -import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; -import RoomContext from "../../../../../src/contexts/RoomContext"; -import defaultDispatcher from "../../../../../src/dispatcher/dispatcher"; -import { Action } from "../../../../../src/dispatcher/actions"; -import { flushPromises } from "../../../../test-utils"; -import { SendWysiwygComposer } from "../../../../../src/components/views/rooms/wysiwyg_composer/"; -import { aboveLeftOf } from "../../../../../src/components/structures/ContextMenu"; -import { ComposerInsertPayload, ComposerType } from "../../../../../src/dispatcher/payloads/ComposerInsertPayload"; -import { setSelection } from "../../../../../src/components/views/rooms/wysiwyg_composer/utils/selection"; +import { act, fireEvent, render, screen, waitFor } from "jest-matrix-react"; + +import MatrixClientContext from "../../../../../../src/contexts/MatrixClientContext"; +import RoomContext from "../../../../../../src/contexts/RoomContext"; +import defaultDispatcher from "../../../../../../src/dispatcher/dispatcher"; +import { Action } from "../../../../../../src/dispatcher/actions"; +import { flushPromises } from "../../../../../test-utils"; +import { SendWysiwygComposer } from "../../../../../../src/components/views/rooms/wysiwyg_composer/"; +import { aboveLeftOf } from "../../../../../../src/components/structures/ContextMenu"; +import { ComposerInsertPayload, ComposerType } from "../../../../../../src/dispatcher/payloads/ComposerInsertPayload"; +import { setSelection } from "../../../../../../src/components/views/rooms/wysiwyg_composer/utils/selection"; import { createMocks } from "./utils"; -jest.mock("../../../../../src/components/views/rooms/EmojiButton", () => ({ +jest.mock("../../../../../../src/components/views/rooms/EmojiButton", () => ({ EmojiButton: ({ addEmoji }: { addEmoji: (emoji: string) => void }) => { return ( + + + + + + + + + +
+ +`; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners-test.tsx b/test/unit-tests/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners-test.tsx similarity index 88% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners-test.tsx rename to test/unit-tests/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners-test.tsx index c3f19c7ef6..20dc961cf4 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners-test.tsx +++ b/test/unit-tests/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners-test.tsx @@ -6,10 +6,9 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ -import { renderHook } from "@testing-library/react-hooks"; -import { act } from "@testing-library/react"; +import { renderHook, act } from "jest-matrix-react"; -import { usePlainTextListeners } from "../../../../../../src/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners"; +import { usePlainTextListeners } from "../../../../../../../src/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners"; describe("setContent", () => { it("calling with a string calls the onChange argument", () => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/hooks/useSuggestion-test.tsx b/test/unit-tests/components/views/rooms/wysiwyg_composer/hooks/useSuggestion-test.tsx similarity index 99% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/hooks/useSuggestion-test.tsx rename to test/unit-tests/components/views/rooms/wysiwyg_composer/hooks/useSuggestion-test.tsx index 97bf032c4a..9224375104 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/hooks/useSuggestion-test.tsx +++ b/test/unit-tests/components/views/rooms/wysiwyg_composer/hooks/useSuggestion-test.tsx @@ -15,7 +15,7 @@ import { processEmojiReplacement, processMention, processSelectionChange, -} from "../../../../../../src/components/views/rooms/wysiwyg_composer/hooks/useSuggestion"; +} from "../../../../../../../src/components/views/rooms/wysiwyg_composer/hooks/useSuggestion"; function createMockPlainTextSuggestionPattern(props: Partial = {}): Suggestion { return { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/hooks/utils-test.tsx b/test/unit-tests/components/views/rooms/wysiwyg_composer/hooks/utils-test.tsx similarity index 96% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/hooks/utils-test.tsx rename to test/unit-tests/components/views/rooms/wysiwyg_composer/hooks/utils-test.tsx index c1fe3bc4aa..eac4d6d35e 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/hooks/utils-test.tsx +++ b/test/unit-tests/components/views/rooms/wysiwyg_composer/hooks/utils-test.tsx @@ -6,16 +6,16 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ import { IEventRelation, MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { waitFor } from "@testing-library/react"; +import { waitFor } from "jest-matrix-react"; -import { TimelineRenderingType } from "../../../../../../src/contexts/RoomContext"; -import { mkStubRoom, stubClient } from "../../../../../test-utils"; -import ContentMessages from "../../../../../../src/ContentMessages"; -import { IRoomState } from "../../../../../../src/components/structures/RoomView"; +import { TimelineRenderingType } from "../../../../../../../src/contexts/RoomContext"; +import { mkStubRoom, stubClient } from "../../../../../../test-utils"; +import ContentMessages from "../../../../../../../src/ContentMessages"; +import { IRoomState } from "../../../../../../../src/components/structures/RoomView"; import { handleClipboardEvent, isEventToHandleAsClipboardEvent, -} from "../../../../../../src/components/views/rooms/wysiwyg_composer/hooks/utils"; +} from "../../../../../../../src/components/views/rooms/wysiwyg_composer/hooks/utils"; const mockClient = stubClient(); const mockRoom = mkStubRoom("mock room", "mock room", mockClient); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils.ts b/test/unit-tests/components/views/rooms/wysiwyg_composer/utils.ts similarity index 87% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils.ts rename to test/unit-tests/components/views/rooms/wysiwyg_composer/utils.ts index 108f1bc579..d367e3488a 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils.ts +++ b/test/unit-tests/components/views/rooms/wysiwyg_composer/utils.ts @@ -8,9 +8,9 @@ Please see LICENSE files in the repository root for full details. import { EventTimeline, MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { getRoomContext, mkEvent, mkStubRoom, stubClient } from "../../../../test-utils"; -import { IRoomState } from "../../../../../src/components/structures/RoomView"; -import EditorStateTransfer from "../../../../../src/utils/EditorStateTransfer"; +import { getRoomContext, mkEvent, mkStubRoom, stubClient } from "../../../../../test-utils"; +import { IRoomState } from "../../../../../../src/components/structures/RoomView"; +import EditorStateTransfer from "../../../../../../src/utils/EditorStateTransfer"; export function createMocks(eventContent = "Replying to this new content") { const mockClient = stubClient(); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils/autocomplete-test.ts b/test/unit-tests/components/views/rooms/wysiwyg_composer/utils/autocomplete-test.ts similarity index 95% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils/autocomplete-test.ts rename to test/unit-tests/components/views/rooms/wysiwyg_composer/utils/autocomplete-test.ts index e809838b1c..8efc4df203 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils/autocomplete-test.ts +++ b/test/unit-tests/components/views/rooms/wysiwyg_composer/utils/autocomplete-test.ts @@ -9,15 +9,15 @@ Please see LICENSE files in the repository root for full details. import { mocked } from "jest-mock"; import React from "react"; -import { ICompletion } from "../../../../../../src/autocomplete/Autocompleter"; +import { ICompletion } from "../../../../../../../src/autocomplete/Autocompleter"; import { buildQuery, getRoomFromCompletion, getMentionDisplayText, getMentionAttributes, -} from "../../../../../../src/components/views/rooms/wysiwyg_composer/utils/autocomplete"; -import { createTestClient, mkRoom } from "../../../../../test-utils"; -import * as _mockAvatar from "../../../../../../src/Avatar"; +} from "../../../../../../../src/components/views/rooms/wysiwyg_composer/utils/autocomplete"; +import { createTestClient, mkRoom } from "../../../../../../test-utils"; +import * as _mockAvatar from "../../../../../../../src/Avatar"; const mockClient = createTestClient(); const mockRoomId = "mockRoomId"; @@ -32,9 +32,9 @@ const createMockCompletion = (props: Partial): ICompletion => { }; }; -jest.mock("../../../../../../src/Avatar"); -jest.mock("../../../../../../src/stores/WidgetStore"); -jest.mock("../../../../../../src/stores/widgets/WidgetLayoutStore"); +jest.mock("../../../../../../../src/Avatar"); +jest.mock("../../../../../../../src/stores/WidgetStore"); +jest.mock("../../../../../../../src/stores/widgets/WidgetLayoutStore"); beforeEach(() => jest.clearAllMocks()); afterAll(() => jest.restoreAllMocks()); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils/createMessageContent-test.ts b/test/unit-tests/components/views/rooms/wysiwyg_composer/utils/createMessageContent-test.ts similarity index 96% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils/createMessageContent-test.ts rename to test/unit-tests/components/views/rooms/wysiwyg_composer/utils/createMessageContent-test.ts index c1168139df..eae10f2e3d 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils/createMessageContent-test.ts +++ b/test/unit-tests/components/views/rooms/wysiwyg_composer/utils/createMessageContent-test.ts @@ -7,12 +7,12 @@ Please see LICENSE files in the repository root for full details. */ import { MsgType } from "matrix-js-sdk/src/matrix"; -import { filterConsole, mkEvent } from "../../../../../test-utils"; -import { RoomPermalinkCreator } from "../../../../../../src/utils/permalinks/Permalinks"; +import { filterConsole, mkEvent } from "../../../../../../test-utils"; +import { RoomPermalinkCreator } from "../../../../../../../src/utils/permalinks/Permalinks"; import { createMessageContent, EMOTE_PREFIX, -} from "../../../../../../src/components/views/rooms/wysiwyg_composer/utils/createMessageContent"; +} from "../../../../../../../src/components/views/rooms/wysiwyg_composer/utils/createMessageContent"; describe("createMessageContent", () => { const permalinkCreator = { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils/message-test.ts b/test/unit-tests/components/views/rooms/wysiwyg_composer/utils/message-test.ts similarity index 93% rename from linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils/message-test.ts rename to test/unit-tests/components/views/rooms/wysiwyg_composer/utils/message-test.ts index effc715b29..7c77912206 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/rooms/wysiwyg_composer/utils/message-test.ts +++ b/test/unit-tests/components/views/rooms/wysiwyg_composer/utils/message-test.ts @@ -8,20 +8,23 @@ Please see LICENSE files in the repository root for full details. import { EventStatus, IEventRelation, MsgType } from "matrix-js-sdk/src/matrix"; -import { IRoomState } from "../../../../../../src/components/structures/RoomView"; -import { editMessage, sendMessage } from "../../../../../../src/components/views/rooms/wysiwyg_composer/utils/message"; -import { createTestClient, getRoomContext, mkEvent, mkStubRoom } from "../../../../../test-utils"; -import defaultDispatcher from "../../../../../../src/dispatcher/dispatcher"; -import SettingsStore from "../../../../../../src/settings/SettingsStore"; -import { SettingLevel } from "../../../../../../src/settings/SettingLevel"; -import { RoomPermalinkCreator } from "../../../../../../src/utils/permalinks/Permalinks"; -import EditorStateTransfer from "../../../../../../src/utils/EditorStateTransfer"; -import * as ConfirmRedactDialog from "../../../../../../src/components/views/dialogs/ConfirmRedactDialog"; -import * as SlashCommands from "../../../../../../src/SlashCommands"; -import * as Commands from "../../../../../../src/editor/commands"; -import * as Reply from "../../../../../../src/utils/Reply"; -import { MatrixClientPeg } from "../../../../../../src/MatrixClientPeg"; -import { Action } from "../../../../../../src/dispatcher/actions"; +import { IRoomState } from "../../../../../../../src/components/structures/RoomView"; +import { + editMessage, + sendMessage, +} from "../../../../../../../src/components/views/rooms/wysiwyg_composer/utils/message"; +import { createTestClient, getRoomContext, mkEvent, mkStubRoom } from "../../../../../../test-utils"; +import defaultDispatcher from "../../../../../../../src/dispatcher/dispatcher"; +import SettingsStore from "../../../../../../../src/settings/SettingsStore"; +import { SettingLevel } from "../../../../../../../src/settings/SettingLevel"; +import { RoomPermalinkCreator } from "../../../../../../../src/utils/permalinks/Permalinks"; +import EditorStateTransfer from "../../../../../../../src/utils/EditorStateTransfer"; +import * as ConfirmRedactDialog from "../../../../../../../src/components/views/dialogs/ConfirmRedactDialog"; +import * as SlashCommands from "../../../../../../../src/SlashCommands"; +import * as Commands from "../../../../../../../src/editor/commands"; +import * as Reply from "../../../../../../../src/utils/Reply"; +import { MatrixClientPeg } from "../../../../../../../src/MatrixClientPeg"; +import { Action } from "../../../../../../../src/dispatcher/actions"; describe("message", () => { const permalinkCreator = { @@ -414,7 +417,7 @@ describe("message", () => { expect(mockClient.sendMessage).toHaveBeenCalledTimes(0); expect(mockClient.cancelPendingEvent).toHaveBeenCalledTimes(1); expect(mockCreateRedactEventDialog).toHaveBeenCalledTimes(1); - expect(spyDispatcher).toHaveBeenCalledTimes(0); + expect(spyDispatcher).toHaveBeenCalledTimes(1); }); it("Should do nothing if the content is unmodified", async () => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/AddPrivilegedUsers-test.tsx b/test/unit-tests/components/views/settings/AddPrivilegedUsers-test.tsx similarity index 90% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/AddPrivilegedUsers-test.tsx rename to test/unit-tests/components/views/settings/AddPrivilegedUsers-test.tsx index e26ccd71c4..6863859787 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/AddPrivilegedUsers-test.tsx +++ b/test/unit-tests/components/views/settings/AddPrivilegedUsers-test.tsx @@ -6,24 +6,24 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { act, fireEvent, render, waitFor } from "@testing-library/react"; +import { act, fireEvent, render, waitFor } from "jest-matrix-react"; import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; import { RoomMember, EventType } from "matrix-js-sdk/src/matrix"; -import { getMockClientWithEventEmitter, makeRoomWithStateEvents, mkEvent } from "../../../test-utils"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; +import { getMockClientWithEventEmitter, makeRoomWithStateEvents, mkEvent } from "../../../../test-utils"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; import { AddPrivilegedUsers, getUserIdsFromCompletions, hasLowerOrEqualLevelThanDefaultLevel, -} from "../../../../src/components/views/settings/AddPrivilegedUsers"; -import UserProvider from "../../../../src/autocomplete/UserProvider"; -import { ICompletion } from "../../../../src/autocomplete/Autocompleter"; +} from "../../../../../src/components/views/settings/AddPrivilegedUsers"; +import UserProvider from "../../../../../src/autocomplete/UserProvider"; +import { ICompletion } from "../../../../../src/autocomplete/Autocompleter"; -jest.mock("../../../../src/autocomplete/UserProvider"); -jest.mock("../../../../src/stores/WidgetStore"); -jest.mock("../../../../src/stores/widgets/WidgetLayoutStore"); +jest.mock("../../../../../src/autocomplete/UserProvider"); +jest.mock("../../../../../src/stores/WidgetStore"); +jest.mock("../../../../../src/stores/widgets/WidgetLayoutStore"); const completions: ICompletion[] = [ { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/AddRemoveThreepids-test.tsx b/test/unit-tests/components/views/settings/AddRemoveThreepids-test.tsx similarity index 84% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/AddRemoveThreepids-test.tsx rename to test/unit-tests/components/views/settings/AddRemoveThreepids-test.tsx index 9cdfe4ec18..3b46d74435 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/AddRemoveThreepids-test.tsx +++ b/test/unit-tests/components/views/settings/AddRemoveThreepids-test.tsx @@ -6,20 +6,20 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ -import { render, screen, waitFor } from "@testing-library/react"; +import { render, screen, waitFor } from "jest-matrix-react"; import { MatrixClient, ThreepidMedium } from "matrix-js-sdk/src/matrix"; import React from "react"; import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; -import { AddRemoveThreepids } from "../../../../src/components/views/settings/AddRemoveThreepids"; -import { clearAllModals, stubClient } from "../../../test-utils"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import Modal from "../../../../src/Modal"; +import { AddRemoveThreepids } from "../../../../../src/components/views/settings/AddRemoveThreepids"; +import { clearAllModals, stubClient } from "../../../../test-utils"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import Modal from "../../../../../src/Modal"; const MOCK_IDENTITY_ACCESS_TOKEN = "mock_identity_access_token"; const mockGetAccessToken = jest.fn().mockResolvedValue(MOCK_IDENTITY_ACCESS_TOKEN); -jest.mock("../../../../src/IdentityAuthClient", () => +jest.mock("../../../../../src/IdentityAuthClient", () => jest.fn().mockImplementation(() => ({ getAccessToken: mockGetAccessToken, })), @@ -49,7 +49,7 @@ describe("AddRemoveThreepids", () => { clearAllModals(); }); - const clientProviderWrapper: React.FC = ({ children }) => ( + const clientProviderWrapper: React.FC = ({ children }: React.PropsWithChildren) => ( {children} ); @@ -209,7 +209,7 @@ describe("AddRemoveThreepids", () => { }, ); - const countryDropdown = screen.getByRole("button", { name: "Country Dropdown" }); + const countryDropdown = screen.getByRole("button", { name: /Country Dropdown/ }); await userEvent.click(countryDropdown); const gbOption = screen.getByRole("option", { name: "🇬🇧 United Kingdom (+44)" }); await userEvent.click(gbOption); @@ -217,10 +217,10 @@ describe("AddRemoveThreepids", () => { const input = screen.getByRole("textbox", { name: "Phone Number" }); await userEvent.type(input, PHONE1_LOCALNUM); - const addButton = screen.getByRole("button", { name: "Add" }); + const addButton = screen.getByRole("button", { name: /Add/ }); userEvent.click(addButton); - const continueButton = await screen.findByRole("button", { name: "Continue" }); + const continueButton = await screen.findByRole("button", { name: /Continue/ }); await expect(continueButton).toHaveAttribute("aria-disabled", "true"); @@ -252,58 +252,7 @@ describe("AddRemoveThreepids", () => { }); expect(onChangeFn).toHaveBeenCalled(); - }); - - it("should display an error if the code is incorrect", async () => { - const onChangeFn = jest.fn(); - const createDialogFn = jest.spyOn(Modal, "createDialog"); - mocked(client.requestAdd3pidMsisdnToken).mockResolvedValue({ - sid: "1", - msisdn: PHONE1.address, - intl_fmt: "+" + PHONE1.address, - success: true, - submit_url: "https://example.dummy", - }); - - render( - , - { - wrapper: clientProviderWrapper, - }, - ); - - const input = screen.getByRole("textbox", { name: "Phone Number" }); - await userEvent.type(input, PHONE1_LOCALNUM); - - const countryDropdown = screen.getByRole("button", { name: "Country Dropdown" }); - await userEvent.click(countryDropdown); - const gbOption = screen.getByRole("option", { name: "🇬🇧 United Kingdom (+44)" }); - await userEvent.click(gbOption); - - const addButton = screen.getByRole("button", { name: "Add" }); - await userEvent.click(addButton); - - mocked(client).addThreePidOnly.mockRejectedValueOnce(new Error("Unauthorized")); - - const verificationInput = screen.getByRole("textbox", { name: "Verification code" }); - await userEvent.type(verificationInput, "123457"); - - const continueButton = screen.getByRole("button", { name: "Continue" }); - await userEvent.click(continueButton); - - expect(createDialogFn).toHaveBeenCalledWith(expect.anything(), { - description: "Unauthorized", - title: "Unable to verify phone number.", - }); - - expect(onChangeFn).not.toHaveBeenCalled(); - }); + }, 10000); it("should remove an email address", async () => { const onChangeFn = jest.fn(); @@ -320,12 +269,12 @@ describe("AddRemoveThreepids", () => { }, ); - const removeButton = screen.getByRole("button", { name: "Remove" }); + const removeButton = screen.getByRole("button", { name: /Remove/ }); await userEvent.click(removeButton); expect(screen.getByText(`Remove ${EMAIL1.address}?`)).toBeVisible(); - const confirmRemoveButton = screen.getByRole("button", { name: "Remove" }); + const confirmRemoveButton = screen.getByRole("button", { name: /Remove/ }); await userEvent.click(confirmRemoveButton); expect(client.deleteThreePid).toHaveBeenCalledWith(ThreepidMedium.Email, EMAIL1.address); @@ -347,12 +296,12 @@ describe("AddRemoveThreepids", () => { }, ); - const removeButton = screen.getByRole("button", { name: "Remove" }); + const removeButton = screen.getByRole("button", { name: /Remove/ }); await userEvent.click(removeButton); expect(screen.getByText(`Remove ${EMAIL1.address}?`)).toBeVisible(); - const confirmRemoveButton = screen.getByRole("button", { name: "Cancel" }); + const confirmRemoveButton = screen.getByRole("button", { name: /Cancel/ }); await userEvent.click(confirmRemoveButton); expect(screen.queryByText(`Remove ${EMAIL1.address}?`)).not.toBeInTheDocument(); @@ -376,12 +325,12 @@ describe("AddRemoveThreepids", () => { }, ); - const removeButton = screen.getByRole("button", { name: "Remove" }); + const removeButton = screen.getByRole("button", { name: /Remove/ }); await userEvent.click(removeButton); expect(screen.getByText(`Remove ${PHONE1.address}?`)).toBeVisible(); - const confirmRemoveButton = screen.getByRole("button", { name: "Remove" }); + const confirmRemoveButton = screen.getByRole("button", { name: /Remove/ }); await userEvent.click(confirmRemoveButton); expect(client.deleteThreePid).toHaveBeenCalledWith(ThreepidMedium.Phone, PHONE1.address); @@ -408,7 +357,7 @@ describe("AddRemoveThreepids", () => { ); expect(screen.getByText(EMAIL1.address)).toBeVisible(); - const shareButton = screen.getByRole("button", { name: "Share" }); + const shareButton = screen.getByRole("button", { name: /Share/ }); await userEvent.click(shareButton); expect(screen.getByText("Verify the link in your inbox")).toBeVisible(); @@ -421,7 +370,7 @@ describe("AddRemoveThreepids", () => { MOCK_IDENTITY_ACCESS_TOKEN, ); - const completeButton = screen.getByRole("button", { name: "Complete" }); + const completeButton = screen.getByRole("button", { name: /Complete/ }); await userEvent.click(completeButton); expect(client.bindThreePid).toHaveBeenCalledWith({ @@ -459,7 +408,7 @@ describe("AddRemoveThreepids", () => { ); expect(screen.getByText(PHONE1.address)).toBeVisible(); - const shareButton = screen.getByRole("button", { name: "Share" }); + const shareButton = screen.getByRole("button", { name: /Share/ }); await userEvent.click(shareButton); expect(screen.getByText("Please enter verification code sent via text.")).toBeVisible(); @@ -503,7 +452,7 @@ describe("AddRemoveThreepids", () => { ); expect(screen.getByText(EMAIL1.address)).toBeVisible(); - const revokeButton = screen.getByRole("button", { name: "Revoke" }); + const revokeButton = screen.getByRole("button", { name: /Revoke/ }); await userEvent.click(revokeButton); expect(client.unbindThreePid).toHaveBeenCalledWith(ThreepidMedium.Email, EMAIL1.address); @@ -526,7 +475,7 @@ describe("AddRemoveThreepids", () => { ); expect(screen.getByText(PHONE1.address)).toBeVisible(); - const revokeButton = screen.getByRole("button", { name: "Revoke" }); + const revokeButton = screen.getByRole("button", { name: /Revoke/ }); await userEvent.click(revokeButton); expect(client.unbindThreePid).toHaveBeenCalledWith(ThreepidMedium.Phone, PHONE1.address); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/AvatarSetting-test.tsx b/test/unit-tests/components/views/settings/AvatarSetting-test.tsx similarity index 91% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/AvatarSetting-test.tsx rename to test/unit-tests/components/views/settings/AvatarSetting-test.tsx index d7d7b0c477..e3e2b1cf96 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/AvatarSetting-test.tsx +++ b/test/unit-tests/components/views/settings/AvatarSetting-test.tsx @@ -6,11 +6,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen } from "@testing-library/react"; +import { render, screen } from "jest-matrix-react"; import userEvent from "@testing-library/user-event"; -import AvatarSetting from "../../../../src/components/views/settings/AvatarSetting"; -import { stubClient } from "../../../test-utils"; +import AvatarSetting from "../../../../../src/components/views/settings/AvatarSetting"; +import { stubClient } from "../../../../test-utils"; const BASE64_GIF = "R0lGODlhAQABAAAAACw="; const AVATAR_FILE = new File([Uint8Array.from(atob(BASE64_GIF), (c) => c.charCodeAt(0))], "avatar.gif", { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/ChangePassword-test.tsx b/test/unit-tests/components/views/settings/ChangePassword-test.tsx similarity index 93% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/ChangePassword-test.tsx rename to test/unit-tests/components/views/settings/ChangePassword-test.tsx index 06efe1ca0d..75211647e0 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/ChangePassword-test.tsx +++ b/test/unit-tests/components/views/settings/ChangePassword-test.tsx @@ -7,12 +7,12 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen, waitFor } from "@testing-library/react"; +import { render, screen, waitFor } from "jest-matrix-react"; import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; -import ChangePassword from "../../../../src/components/views/settings/ChangePassword"; -import { stubClient } from "../../../test-utils"; +import ChangePassword from "../../../../../src/components/views/settings/ChangePassword"; +import { stubClient } from "../../../../test-utils"; describe("", () => { it("renders expected fields", () => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/CrossSigningPanel-test.tsx b/test/unit-tests/components/views/settings/CrossSigningPanel-test.tsx similarity index 91% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/CrossSigningPanel-test.tsx rename to test/unit-tests/components/views/settings/CrossSigningPanel-test.tsx index 23f690df7b..daa3570ed2 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/CrossSigningPanel-test.tsx +++ b/test/unit-tests/components/views/settings/CrossSigningPanel-test.tsx @@ -7,19 +7,19 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render, screen } from "@testing-library/react"; +import { render, screen } from "jest-matrix-react"; import { Mocked, mocked } from "jest-mock"; import { MatrixClient } from "matrix-js-sdk/src/matrix"; -import CrossSigningPanel from "../../../../src/components/views/settings/CrossSigningPanel"; +import CrossSigningPanel from "../../../../../src/components/views/settings/CrossSigningPanel"; import { flushPromises, getMockClientWithEventEmitter, mockClientMethodsCrypto, mockClientMethodsUser, -} from "../../../test-utils"; -import Modal from "../../../../src/Modal"; -import ConfirmDestroyCrossSigningDialog from "../../../../src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog"; +} from "../../../../test-utils"; +import Modal from "../../../../../src/Modal"; +import ConfirmDestroyCrossSigningDialog from "../../../../../src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog"; describe("", () => { const userId = "@alice:server.org"; @@ -34,7 +34,6 @@ describe("", () => { }); mockClient.doesServerSupportUnstableFeature.mockResolvedValue(true); - mockClient.isCrossSigningReady.mockResolvedValue(false); }); afterEach(() => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/CryptographyPanel-test.tsx b/test/unit-tests/components/views/settings/CryptographyPanel-test.tsx similarity index 72% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/CryptographyPanel-test.tsx rename to test/unit-tests/components/views/settings/CryptographyPanel-test.tsx index aa0442e65a..0b699c1383 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/CryptographyPanel-test.tsx +++ b/test/unit-tests/components/views/settings/CryptographyPanel-test.tsx @@ -7,14 +7,14 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render } from "@testing-library/react"; +import { render, waitFor } from "jest-matrix-react"; import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; -import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; -import * as TestUtils from "../../../test-utils"; -import CryptographyPanel from "../../../../src/components/views/settings/CryptographyPanel"; -import { flushPromises } from "../../../test-utils"; +import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; +import * as TestUtils from "../../../../test-utils"; +import CryptographyPanel from "../../../../../src/components/views/settings/CryptographyPanel"; +import { withClientContextRenderOptions } from "../../../../test-utils"; describe("CryptographyPanel", () => { it("shows the session ID and key", async () => { @@ -29,7 +29,7 @@ describe("CryptographyPanel", () => { mocked(client.getCrypto()!.getOwnDeviceKeys).mockResolvedValue({ ed25519: sessionKey, curve25519: "1234" }); // When we render the CryptographyPanel - const rendered = render(); + const rendered = render(, withClientContextRenderOptions(client)); // Then it displays info about the user's session const codes = rendered.container.querySelectorAll("code"); @@ -40,8 +40,7 @@ describe("CryptographyPanel", () => { expect(codes[1].innerHTML).toEqual("..."); // Then the actual key - await flushPromises(); - expect(codes[1].innerHTML).toEqual(sessionKeyFormatted); + await waitFor(() => expect(codes[1].innerHTML).toEqual(sessionKeyFormatted)); }); it("handles errors fetching session key", async () => { @@ -54,7 +53,7 @@ describe("CryptographyPanel", () => { mocked(client.getCrypto()!.getOwnDeviceKeys).mockRejectedValue(new Error("bleh")); // When we render the CryptographyPanel - const rendered = render(); + const rendered = render(, withClientContextRenderOptions(client)); // Then it displays info about the user's session const codes = rendered.container.querySelectorAll("code"); @@ -63,7 +62,6 @@ describe("CryptographyPanel", () => { expect(codes[1].innerHTML).toEqual("..."); // Then "not supported key - await flushPromises(); - expect(codes[1].innerHTML).toEqual("<not supported>"); + await waitFor(() => expect(codes[1].innerHTML).toEqual("<not supported>")); }); }); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/EventIndexPanel-test.tsx b/test/unit-tests/components/views/settings/EventIndexPanel-test.tsx similarity index 93% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/EventIndexPanel-test.tsx rename to test/unit-tests/components/views/settings/EventIndexPanel-test.tsx index f227153809..9859cc27fa 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/EventIndexPanel-test.tsx +++ b/test/unit-tests/components/views/settings/EventIndexPanel-test.tsx @@ -7,15 +7,15 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { fireEvent, render, screen, within } from "@testing-library/react"; +import { fireEvent, render, screen, within } from "jest-matrix-react"; import { defer, IDeferred } from "matrix-js-sdk/src/utils"; -import EventIndexPanel from "../../../../src/components/views/settings/EventIndexPanel"; -import EventIndexPeg from "../../../../src/indexing/EventIndexPeg"; -import EventIndex from "../../../../src/indexing/EventIndex"; -import { clearAllModals, flushPromises, getMockClientWithEventEmitter } from "../../../test-utils"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import { SettingLevel } from "../../../../src/settings/SettingLevel"; +import EventIndexPanel from "../../../../../src/components/views/settings/EventIndexPanel"; +import EventIndexPeg from "../../../../../src/indexing/EventIndexPeg"; +import EventIndex from "../../../../../src/indexing/EventIndex"; +import { clearAllModals, flushPromises, getMockClientWithEventEmitter } from "../../../../test-utils"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import { SettingLevel } from "../../../../../src/settings/SettingLevel"; describe("", () => { getMockClientWithEventEmitter({ diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/FontScalingPanel-test.tsx b/test/unit-tests/components/views/settings/FontScalingPanel-test.tsx similarity index 71% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/FontScalingPanel-test.tsx rename to test/unit-tests/components/views/settings/FontScalingPanel-test.tsx index 5e83328a5d..4e2ed5451a 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/FontScalingPanel-test.tsx +++ b/test/unit-tests/components/views/settings/FontScalingPanel-test.tsx @@ -7,10 +7,10 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render } from "@testing-library/react"; +import { render } from "jest-matrix-react"; -import * as TestUtils from "../../../test-utils"; -import FontScalingPanel from "../../../../src/components/views/settings/FontScalingPanel"; +import * as TestUtils from "../../../../test-utils"; +import FontScalingPanel from "../../../../../src/components/views/settings/FontScalingPanel"; describe("FontScalingPanel", () => { it("renders the font scaling UI", () => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/JoinRuleSettings-test.tsx b/test/unit-tests/components/views/settings/JoinRuleSettings-test.tsx similarity index 95% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/JoinRuleSettings-test.tsx rename to test/unit-tests/components/views/settings/JoinRuleSettings-test.tsx index 1864edc847..c14f018df0 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/JoinRuleSettings-test.tsx +++ b/test/unit-tests/components/views/settings/JoinRuleSettings-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { act, fireEvent, render, screen, waitFor, within } from "@testing-library/react"; +import { act, fireEvent, render, screen, waitFor, within } from "jest-matrix-react"; import { EventType, GuestAccess, @@ -28,12 +28,12 @@ import { flushPromises, getMockClientWithEventEmitter, mockClientMethodsUser, -} from "../../../test-utils"; -import { filterBoolean } from "../../../../src/utils/arrays"; -import JoinRuleSettings, { JoinRuleSettingsProps } from "../../../../src/components/views/settings/JoinRuleSettings"; -import { PreferredRoomVersions } from "../../../../src/utils/PreferredRoomVersions"; -import SpaceStore from "../../../../src/stores/spaces/SpaceStore"; -import SettingsStore from "../../../../src/settings/SettingsStore"; +} from "../../../../test-utils"; +import { filterBoolean } from "../../../../../src/utils/arrays"; +import JoinRuleSettings, { JoinRuleSettingsProps } from "../../../../../src/components/views/settings/JoinRuleSettings"; +import { PreferredRoomVersions } from "../../../../../src/utils/PreferredRoomVersions"; +import SpaceStore from "../../../../../src/stores/spaces/SpaceStore"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; describe("", () => { const userId = "@alice:server.org"; @@ -59,7 +59,7 @@ describe("", () => { onError: jest.fn(), }; const getComponent = (props: Partial = {}) => - render(); + render(, { legacyRoot: false }); const setRoomStateEvents = ( room: Room, @@ -202,7 +202,7 @@ describe("", () => { await flushPromises(); - expect(within(dialog).getByText("Loading new room")).toBeInTheDocument(); + await expect(within(dialog).findByText("Loading new room")).resolves.toBeInTheDocument(); // "create" our new room, have it come thru sync client.getRoom.mockImplementation((id) => { @@ -250,7 +250,7 @@ describe("", () => { await flushPromises(); - expect(within(dialog).getByText("Loading new room")).toBeInTheDocument(); + await expect(within(dialog).findByText("Loading new room")).resolves.toBeInTheDocument(); // "create" our new room, have it come thru sync client.getRoom.mockImplementation((id) => { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/KeyboardShortcut-test.tsx b/test/unit-tests/components/views/settings/KeyboardShortcut-test.tsx similarity index 85% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/KeyboardShortcut-test.tsx rename to test/unit-tests/components/views/settings/KeyboardShortcut-test.tsx index 53fc9618c7..2bebd04cc8 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/KeyboardShortcut-test.tsx +++ b/test/unit-tests/components/views/settings/KeyboardShortcut-test.tsx @@ -7,11 +7,11 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { render } from "@testing-library/react"; +import { render } from "jest-matrix-react"; -import { Key } from "../../../../src/Keyboard"; -import { mockPlatformPeg, unmockPlatformPeg } from "../../../test-utils/platform"; -import { KeyboardKey, KeyboardShortcut } from "../../../../src/components/views/settings/KeyboardShortcut"; +import { Key } from "../../../../../src/Keyboard"; +import { mockPlatformPeg, unmockPlatformPeg } from "../../../../test-utils/platform"; +import { KeyboardKey, KeyboardShortcut } from "../../../../../src/components/views/settings/KeyboardShortcut"; const renderKeyboardShortcut = (Component: React.FunctionComponent, props: Record) => { return render().container; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/LayoutSwitcher-test.tsx b/test/unit-tests/components/views/settings/LayoutSwitcher-test.tsx similarity index 85% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/LayoutSwitcher-test.tsx rename to test/unit-tests/components/views/settings/LayoutSwitcher-test.tsx index 1232abb430..9148f7ceb1 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/LayoutSwitcher-test.tsx +++ b/test/unit-tests/components/views/settings/LayoutSwitcher-test.tsx @@ -7,15 +7,15 @@ */ import React from "react"; -import { act, render, screen, waitFor } from "@testing-library/react"; +import { act, render, screen, waitFor } from "jest-matrix-react"; import { mocked } from "jest-mock"; -import { LayoutSwitcher } from "../../../../src/components/views/settings/LayoutSwitcher"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { stubClient } from "../../../test-utils"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import { SettingLevel } from "../../../../src/settings/SettingLevel"; -import { Layout } from "../../../../src/settings/enums/Layout"; +import { LayoutSwitcher } from "../../../../../src/components/views/settings/LayoutSwitcher"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { stubClient } from "../../../../test-utils"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import { SettingLevel } from "../../../../../src/settings/SettingLevel"; +import { Layout } from "../../../../../src/settings/enums/Layout"; describe("", () => { const matrixClient = stubClient(); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/Notifications-test.tsx b/test/unit-tests/components/views/settings/Notifications-test.tsx similarity index 98% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/Notifications-test.tsx rename to test/unit-tests/components/views/settings/Notifications-test.tsx index 5930c347c2..69b45135cb 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/Notifications-test.tsx +++ b/test/unit-tests/components/views/settings/Notifications-test.tsx @@ -33,20 +33,25 @@ import { waitFor, waitForElementToBeRemoved, within, -} from "@testing-library/react"; +} from "jest-matrix-react"; import { mocked } from "jest-mock"; import userEvent from "@testing-library/user-event"; -import Notifications from "../../../../src/components/views/settings/Notifications"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import { StandardActions } from "../../../../src/notifications/StandardActions"; -import { clearAllModals, getMockClientWithEventEmitter, mkMessage, mockClientMethodsUser } from "../../../test-utils"; +import Notifications from "../../../../../src/components/views/settings/Notifications"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import { StandardActions } from "../../../../../src/notifications/StandardActions"; +import { + clearAllModals, + getMockClientWithEventEmitter, + mkMessage, + mockClientMethodsUser, +} from "../../../../test-utils"; // don't pollute test output with error logs from mock rejections jest.mock("matrix-js-sdk/src/logger"); // Avoid indirectly importing any eagerly created stores that would require extra setup -jest.mock("../../../../src/Notifier"); +jest.mock("../../../../../src/Notifier"); const masterRule: IPushRule = { actions: [PushRuleActionName.DontNotify], diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/PowerLevelSelector-test.tsx b/test/unit-tests/components/views/settings/PowerLevelSelector-test.tsx similarity index 93% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/PowerLevelSelector-test.tsx rename to test/unit-tests/components/views/settings/PowerLevelSelector-test.tsx index ba472ecdd2..052898debb 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/PowerLevelSelector-test.tsx +++ b/test/unit-tests/components/views/settings/PowerLevelSelector-test.tsx @@ -6,13 +6,13 @@ * Please see LICENSE files in the repository root for full details. */ -import { render, screen } from "@testing-library/react"; +import { render, screen } from "jest-matrix-react"; import React, { ComponentProps } from "react"; import userEvent from "@testing-library/user-event"; -import { PowerLevelSelector } from "../../../../src/components/views/settings/PowerLevelSelector"; -import { stubClient } from "../../../test-utils"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; +import { PowerLevelSelector } from "../../../../../src/components/views/settings/PowerLevelSelector"; +import { stubClient } from "../../../../test-utils"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; describe("PowerLevelSelector", () => { const matrixClient = stubClient(); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/SecureBackupPanel-test.tsx b/test/unit-tests/components/views/settings/SecureBackupPanel-test.tsx similarity index 92% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/SecureBackupPanel-test.tsx rename to test/unit-tests/components/views/settings/SecureBackupPanel-test.tsx index 3dd7f1e197..f2aa15f355 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/SecureBackupPanel-test.tsx +++ b/test/unit-tests/components/views/settings/SecureBackupPanel-test.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { fireEvent, render, screen, within } from "@testing-library/react"; +import { fireEvent, render, screen, within } from "jest-matrix-react"; import { mocked } from "jest-mock"; import { @@ -15,11 +15,11 @@ import { getMockClientWithEventEmitter, mockClientMethodsCrypto, mockClientMethodsUser, -} from "../../../test-utils"; -import SecureBackupPanel from "../../../../src/components/views/settings/SecureBackupPanel"; -import { accessSecretStorage } from "../../../../src/SecurityManager"; +} from "../../../../test-utils"; +import SecureBackupPanel from "../../../../../src/components/views/settings/SecureBackupPanel"; +import { accessSecretStorage } from "../../../../../src/SecurityManager"; -jest.mock("../../../../src/SecurityManager", () => ({ +jest.mock("../../../../../src/SecurityManager", () => ({ accessSecretStorage: jest.fn(), })); @@ -130,10 +130,8 @@ describe("", () => { }) .mockResolvedValue(null); getComponent(); - // flush checkKeyBackup promise - await flushPromises(); - fireEvent.click(screen.getByText("Delete Backup")); + fireEvent.click(await screen.findByText("Delete Backup")); const dialog = await screen.findByRole("dialog"); diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/SetIntegrationManager-test.tsx b/test/unit-tests/components/views/settings/SetIntegrationManager-test.tsx similarity index 84% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/SetIntegrationManager-test.tsx rename to test/unit-tests/components/views/settings/SetIntegrationManager-test.tsx index 35a86170bf..888499d524 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/SetIntegrationManager-test.tsx +++ b/test/unit-tests/components/views/settings/SetIntegrationManager-test.tsx @@ -7,21 +7,21 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { fireEvent, render, screen, waitFor, within } from "@testing-library/react"; +import { fireEvent, render, screen, waitFor, within } from "jest-matrix-react"; import { logger } from "matrix-js-sdk/src/logger"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import { SDKContext, SdkContextClass } from "../../../../src/contexts/SDKContext"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import { UIFeature } from "../../../../src/settings/UIFeature"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import { SDKContext, SdkContextClass } from "../../../../../src/contexts/SDKContext"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import { UIFeature } from "../../../../../src/settings/UIFeature"; import { getMockClientWithEventEmitter, mockClientMethodsServer, mockClientMethodsUser, flushPromises, -} from "../../../test-utils"; -import SetIntegrationManager from "../../../../src/components/views/settings/SetIntegrationManager"; -import { SettingLevel } from "../../../../src/settings/SettingLevel"; +} from "../../../../test-utils"; +import SetIntegrationManager from "../../../../../src/components/views/settings/SetIntegrationManager"; +import { SettingLevel } from "../../../../../src/settings/SettingLevel"; describe("SetIntegrationManager", () => { const userId = "@alice:server.org"; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/SettingsFieldset-test.tsx b/test/unit-tests/components/views/settings/SettingsFieldset-test.tsx similarity index 89% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/SettingsFieldset-test.tsx rename to test/unit-tests/components/views/settings/SettingsFieldset-test.tsx index 035e5a8b08..3049a1fb32 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/SettingsFieldset-test.tsx +++ b/test/unit-tests/components/views/settings/SettingsFieldset-test.tsx @@ -6,10 +6,10 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ -import { render } from "@testing-library/react"; +import { render } from "jest-matrix-react"; import React from "react"; -import SettingsFieldset from "../../../../src/components/views/settings/SettingsFieldset"; +import SettingsFieldset from "../../../../../src/components/views/settings/SettingsFieldset"; describe("", () => { const defaultProps = { diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/ThemeChoicePanel-test.tsx b/test/unit-tests/components/views/settings/ThemeChoicePanel-test.tsx similarity index 93% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/ThemeChoicePanel-test.tsx rename to test/unit-tests/components/views/settings/ThemeChoicePanel-test.tsx index 51662a8524..2eafcc7ada 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/ThemeChoicePanel-test.tsx +++ b/test/unit-tests/components/views/settings/ThemeChoicePanel-test.tsx @@ -7,17 +7,17 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { act, render, screen, waitFor } from "@testing-library/react"; +import { act, render, screen, waitFor } from "jest-matrix-react"; import { mocked, MockedObject } from "jest-mock"; import userEvent from "@testing-library/user-event"; import fetchMock from "fetch-mock-jest"; -import { ThemeChoicePanel } from "../../../../src/components/views/settings/ThemeChoicePanel"; -import SettingsStore from "../../../../src/settings/SettingsStore"; -import ThemeWatcher from "../../../../src/settings/watchers/ThemeWatcher"; -import { SettingLevel } from "../../../../src/settings/SettingLevel"; +import { ThemeChoicePanel } from "../../../../../src/components/views/settings/ThemeChoicePanel"; +import SettingsStore from "../../../../../src/settings/SettingsStore"; +import ThemeWatcher from "../../../../../src/settings/watchers/ThemeWatcher"; +import { SettingLevel } from "../../../../../src/settings/SettingLevel"; -jest.mock("../../../../src/settings/watchers/ThemeWatcher"); +jest.mock("../../../../../src/settings/watchers/ThemeWatcher"); describe("", () => { /** diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/UserProfileSettings-test.tsx b/test/unit-tests/components/views/settings/UserProfileSettings-test.tsx similarity index 81% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/UserProfileSettings-test.tsx rename to test/unit-tests/components/views/settings/UserProfileSettings-test.tsx index 768d77ba9e..98b321a26d 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/UserProfileSettings-test.tsx +++ b/test/unit-tests/components/views/settings/UserProfileSettings-test.tsx @@ -7,18 +7,19 @@ Please see LICENSE files in the repository root for full details. */ import React, { ChangeEvent } from "react"; -import { act, render, screen } from "@testing-library/react"; +import { act, render, screen } from "jest-matrix-react"; import { MatrixClient, UploadResponse } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; import userEvent from "@testing-library/user-event"; +import { TooltipProvider } from "@vector-im/compound-web"; -import UserProfileSettings from "../../../../src/components/views/settings/UserProfileSettings"; -import { mkStubRoom, stubClient } from "../../../test-utils"; -import { ToastContext, ToastRack } from "../../../../src/contexts/ToastContext"; -import { OwnProfileStore } from "../../../../src/stores/OwnProfileStore"; -import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; -import dis from "../../../../src/dispatcher/dispatcher"; -import Modal from "../../../../src/Modal"; +import UserProfileSettings from "../../../../../src/components/views/settings/UserProfileSettings"; +import { mkStubRoom, stubClient } from "../../../../test-utils"; +import { ToastContext, ToastRack } from "../../../../../src/contexts/ToastContext"; +import { OwnProfileStore } from "../../../../../src/stores/OwnProfileStore"; +import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; +import dis from "../../../../../src/dispatcher/dispatcher"; +import Modal from "../../../../../src/Modal"; interface MockedAvatarSettingProps { removeAvatar: () => void; @@ -29,7 +30,7 @@ let removeAvatarFn: () => void; let changeAvatarFn: (file: File) => void; jest.mock( - "../../../../src/components/views/settings/AvatarSetting", + "../../../../../src/components/views/settings/AvatarSetting", () => (({ removeAvatar, onChange }) => { removeAvatarFn = removeAvatar; @@ -38,7 +39,7 @@ jest.mock( }) as React.FC, ); -jest.mock("../../../../src/dispatcher/dispatcher", () => ({ +jest.mock("../../../../../src/dispatcher/dispatcher", () => ({ dispatch: jest.fn(), register: jest.fn(), })); @@ -54,22 +55,29 @@ interface MockedEditInPlaceProps { value: string; } -jest.mock("@vector-im/compound-web", () => ({ - EditInPlace: (({ onChange, onSave, onCancel, value }) => { - editInPlaceOnChange = onChange; - editInPlaceOnSave = onSave; - editInPlaceOnCancel = onCancel; - return
Mocked EditInPlace: {value}
; - }) as React.FC, -})); +jest.mock("@vector-im/compound-web", () => { + const compound = jest.requireActual("@vector-im/compound-web"); + return { + __esModule: true, + ...compound, + EditInPlace: (({ onChange, onSave, onCancel, value }) => { + editInPlaceOnChange = onChange; + editInPlaceOnSave = onSave; + editInPlaceOnCancel = onCancel; + return
Mocked EditInPlace: {value}
; + }) as React.FC, + }; +}); const renderProfileSettings = (toastRack: Partial, client: MatrixClient) => { return render( - - - - - , + + + + + + + , ); }; diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/AddRemoveThreepids-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/AddRemoveThreepids-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/AddRemoveThreepids-test.tsx.snap rename to test/unit-tests/components/views/settings/__snapshots__/AddRemoveThreepids-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/ChangePassword-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/ChangePassword-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/ChangePassword-test.tsx.snap rename to test/unit-tests/components/views/settings/__snapshots__/ChangePassword-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/CrossSigningPanel-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/CrossSigningPanel-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/CrossSigningPanel-test.tsx.snap rename to test/unit-tests/components/views/settings/__snapshots__/CrossSigningPanel-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/EventIndexPanel-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/EventIndexPanel-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/EventIndexPanel-test.tsx.snap rename to test/unit-tests/components/views/settings/__snapshots__/EventIndexPanel-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/FontScalingPanel-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/FontScalingPanel-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/FontScalingPanel-test.tsx.snap rename to test/unit-tests/components/views/settings/__snapshots__/FontScalingPanel-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/KeyboardShortcut-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/KeyboardShortcut-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/KeyboardShortcut-test.tsx.snap rename to test/unit-tests/components/views/settings/__snapshots__/KeyboardShortcut-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/LayoutSwitcher-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/LayoutSwitcher-test.tsx.snap similarity index 79% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/LayoutSwitcher-test.tsx.snap rename to test/unit-tests/components/views/settings/__snapshots__/LayoutSwitcher-test.tsx.snap index 6c7bec7cf1..63c786873c 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/LayoutSwitcher-test.tsx.snap +++ b/test/unit-tests/components/views/settings/__snapshots__/LayoutSwitcher-test.tsx.snap @@ -27,7 +27,7 @@ exports[` should render 1`] = `
@@ -144,7 +154,7 @@ exports[` should render 1`] = `
@@ -260,7 +280,7 @@ exports[` should render 1`] = `
@@ -384,9 +414,9 @@ exports[` should render 1`] = ` class="_container_qnvru_18" > should render 1`] = ` > Modern layout must be selected to use this feature. diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/Notifications-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/Notifications-test.tsx.snap similarity index 100% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/Notifications-test.tsx.snap rename to test/unit-tests/components/views/settings/__snapshots__/Notifications-test.tsx.snap diff --git a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/PowerLevelSelector-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/PowerLevelSelector-test.tsx.snap similarity index 97% rename from linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/PowerLevelSelector-test.tsx.snap rename to test/unit-tests/components/views/settings/__snapshots__/PowerLevelSelector-test.tsx.snap index 9d6037cb5d..7ba419a4e2 100644 --- a/linked-dependencies/matrix-react-sdk/test/components/views/settings/__snapshots__/PowerLevelSelector-test.tsx.snap +++ b/test/unit-tests/components/views/settings/__snapshots__/PowerLevelSelector-test.tsx.snap @@ -60,7 +60,7 @@ exports[`PowerLevelSelector should display only the current user 1`] = `
custom theme should display custom theme 1`] = ` > custom theme should display custom theme 1`] = ` > @@ -69,7 +69,7 @@ exports[` custom theme should display custom theme 1`] = ` custom theme should display custom theme 1`] = ` > @@ -102,7 +102,7 @@ exports[` custom theme should display custom theme 1`] = ` > custom theme should display custom theme 1`] = ` > @@ -135,7 +135,7 @@ exports[` custom theme should display custom theme 1`] = ` > custom theme should display custom theme 1`] = ` > @@ -168,7 +168,7 @@ exports[` custom theme should display custom theme 1`] = ` > custom theme should display custom theme 1`] = ` > @@ -202,7 +202,7 @@ exports[` custom theme should display custom theme 1`] = ` > @@ -210,9 +210,9 @@ exports[` custom theme should display custom theme 1`] = ` class="_controls_1h4nb_17" > custom theme should display custom theme 1`] = `
Enter the URL of a custom theme you want to apply. @@ -240,6 +240,7 @@ exports[` custom theme should display custom theme 1`] = ` +