From 481ab9d8faa01ce3efd1433776f9ff2c43ce2620 Mon Sep 17 00:00:00 2001 From: Ankur Date: Wed, 23 Feb 2022 14:33:15 +0530 Subject: [PATCH 01/33] Updated the login logo. (#20789) --- res/themes/element/img/logos/element-logo.svg | 11 ++++++----- res/welcome/images/logo.svg | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/res/themes/element/img/logos/element-logo.svg b/res/themes/element/img/logos/element-logo.svg index b30aafe1f66..54a91b72f80 100644 --- a/res/themes/element/img/logos/element-logo.svg +++ b/res/themes/element/img/logos/element-logo.svg @@ -1,6 +1,7 @@ - - - - - + + + + + + diff --git a/res/welcome/images/logo.svg b/res/welcome/images/logo.svg index b30aafe1f66..54a91b72f80 100644 --- a/res/welcome/images/logo.svg +++ b/res/welcome/images/logo.svg @@ -1,6 +1,7 @@ - - - - - + + + + + + From 3810b7e3297d0691f4ac365013fceb93a14c0a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 23 Feb 2022 10:12:06 +0100 Subject: [PATCH 02/33] Keybinding code unification #3 (#21132) --- src/i18n/strings/en_EN.json | 4 - src/vector/platform/ElectronPlatform.tsx | 104 +---------------------- 2 files changed, 4 insertions(+), 104 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index e15cc96eac8..24cdd0fc3dd 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -10,10 +10,6 @@ "Download Completed": "Download Completed", "Open": "Open", "Dismiss": "Dismiss", - "Switch to space by number": "Switch to space by number", - "Open user settings": "Open user settings", - "Previous recently visited room or community": "Previous recently visited room or community", - "Next recently visited room or community": "Next recently visited room or community", "%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)", "Go to your browser to complete Sign In": "Go to your browser to complete Sign In", "Unknown device": "Unknown device", diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 81f13929dcb..1626426ca83 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -26,7 +26,7 @@ import BaseEventIndexManager, { ISearchArgs, } from 'matrix-react-sdk/src/indexing/BaseEventIndexManager'; import dis from 'matrix-react-sdk/src/dispatcher/dispatcher'; -import { _t, _td } from 'matrix-react-sdk/src/languageHandler'; +import { _t } from 'matrix-react-sdk/src/languageHandler'; import SdkConfig from 'matrix-react-sdk/src/SdkConfig'; import * as rageshake from 'matrix-react-sdk/src/rageshake/rageshake'; import { MatrixClient } from "matrix-js-sdk/src/client"; @@ -34,22 +34,14 @@ import { Room } from "matrix-js-sdk/src/models/room"; import Modal from "matrix-react-sdk/src/Modal"; import InfoDialog from "matrix-react-sdk/src/components/views/dialogs/InfoDialog"; import Spinner from "matrix-react-sdk/src/components/views/elements/Spinner"; -import { - CategoryName, - DIGITS, - registerShortcut, -} from "matrix-react-sdk/src/accessibility/KeyboardShortcuts"; -import { isOnlyCtrlOrCmdKeyEvent, Key } from "matrix-react-sdk/src/Keyboard"; import React from "react"; import { randomString } from "matrix-js-sdk/src/randomstring"; import { Action } from "matrix-react-sdk/src/dispatcher/actions"; import { ActionPayload } from "matrix-react-sdk/src/dispatcher/payloads"; -import { SwitchSpacePayload } from "matrix-react-sdk/src/dispatcher/payloads/SwitchSpacePayload"; import { showToast as showUpdateToast } from "matrix-react-sdk/src/toasts/UpdateToast"; import { CheckUpdatesPayload } from "matrix-react-sdk/src/dispatcher/payloads/CheckUpdatesPayload"; import ToastStore from "matrix-react-sdk/src/stores/ToastStore"; import GenericExpiringToast from "matrix-react-sdk/src/components/views/toasts/GenericExpiringToast"; -import SettingsStore from 'matrix-react-sdk/src/settings/SettingsStore'; import { IMatrixProfile, IEventWithRoomId as IMatrixEvent, IResultRoomEvents } from "matrix-js-sdk/src/@types/search"; import { logger } from "matrix-js-sdk/src/logger"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; @@ -285,54 +277,6 @@ export default class ElectronPlatform extends VectorBasePlatform { }); }); - // register OS-specific shortcuts - registerShortcut("KeyBinding.switchToSpaceByNumber", CategoryName.NAVIGATION, { - default: { - ctrlOrCmdKey: true, - key: DIGITS, - }, - displayName: _td("Switch to space by number"), - }); - - if (isMac) { - registerShortcut("KeyBinding.openUserSettings", CategoryName.NAVIGATION, { - default: { - metaKey: true, - key: Key.COMMA, - }, - displayName: _td("Open user settings"), - }); - registerShortcut("KeyBinding.previousVisitedRoomOrCommunity", CategoryName.NAVIGATION, { - default: { - metaKey: true, - key: Key.SQUARE_BRACKET_LEFT, - }, - displayName: _td("Previous recently visited room or community"), - }); - registerShortcut("KeyBinding.nextVisitedRoomOrCommunity", CategoryName.NAVIGATION, { - default: { - metaKey: true, - key: Key.SQUARE_BRACKET_RIGHT, - }, - displayName: _td("Next recently visited room or community"), - }); - } else { - registerShortcut("KeyBinding.previousVisitedRoomOrCommunity", CategoryName.NAVIGATION, { - default: { - altKey: true, - key: Key.ARROW_LEFT, - }, - displayName: _td("Previous recently visited room or community"), - }); - registerShortcut("KeyBinding.nextVisitedRoomOrCommunity", CategoryName.NAVIGATION, { - default: { - altKey: true, - key: Key.ARROW_RIGHT, - }, - displayName: _td("Next recently visited room or community"), - }); - } - this.ipcCall("startSSOFlow", this.ssoID); } @@ -578,52 +522,12 @@ export default class ElectronPlatform extends VectorBasePlatform { }); } - private navigateForwardBack(back: boolean) { + public navigateForwardBack(back: boolean): void { this.ipcCall(back ? "navigateBack" : "navigateForward"); } - private navigateToSpace(num: number) { - dis.dispatch({ - action: Action.SwitchSpace, - num, - }); - } - - onKeyDown(ev: KeyboardEvent): boolean { - let handled = false; - - switch (ev.key) { - case Key.SQUARE_BRACKET_LEFT: - case Key.SQUARE_BRACKET_RIGHT: - if (isMac && ev.metaKey && !ev.altKey && !ev.ctrlKey && !ev.shiftKey) { - this.navigateForwardBack(ev.key === Key.SQUARE_BRACKET_LEFT); - handled = true; - } - break; - - case Key.ARROW_LEFT: - case Key.ARROW_RIGHT: - if (!isMac && ev.altKey && !ev.metaKey && !ev.ctrlKey && !ev.shiftKey) { - this.navigateForwardBack(ev.key === Key.ARROW_LEFT); - handled = true; - } - break; - } - - if (!handled && - // ideally we would use SpaceStore.spacesEnabled here but importing SpaceStore in this platform - // breaks skinning as the platform is instantiated prior to the skin being loaded - !SettingsStore.getValue("showCommunitiesInsteadOfSpaces") && - ev.code.startsWith("Digit") && - ev.code !== "Digit0" && // this is the shortcut for reset zoom, don't override it - isOnlyCtrlOrCmdKeyEvent(ev) - ) { - const spaceNumber = ev.code.slice(5); // Cut off the first 5 characters - "Digit" - this.navigateToSpace(parseInt(spaceNumber, 10)); - handled = true; - } - - return handled; + public overrideBrowserShortcuts(): boolean { + return true; } async getPickleKey(userId: string, deviceId: string): Promise { From a2b0cf92485c43991f48ff9e38097d2984e87b9a Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Thu, 24 Feb 2022 10:27:25 +0100 Subject: [PATCH 03/33] eslint to 8.9.0 Signed-off-by: Kerry Archibald --- package.json | 6 +- yarn.lock | 175 ++++++++++++++++++++++++++++----------------------- 2 files changed, 99 insertions(+), 82 deletions(-) diff --git a/package.json b/package.json index 7b0349398e5..b023b2558c8 100644 --- a/package.json +++ b/package.json @@ -108,12 +108,12 @@ "cpx": "^1.5.0", "css-loader": "^3.6.0", "dotenv": "^10.0.0", - "eslint": "7.18.0", + "eslint": "8.9.0", "eslint-config-google": "^0.14.0", "eslint-plugin-import": "^2.25.4", "eslint-plugin-matrix-org": "^0.4.0", - "eslint-plugin-react": "^7.22.0", - "eslint-plugin-react-hooks": "^4.2.0", + "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-hooks": "^4.3.0", "extract-text-webpack-plugin": "^4.0.0-beta.0", "fake-indexeddb": "^3.1.2", "file-loader": "^5.1.0", diff --git a/yarn.lock b/yarn.lock index 843b988310f..11568fd4ff6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1100,22 +1100,35 @@ resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw== -"@eslint/eslintrc@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" - integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== +"@eslint/eslintrc@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.1.0.tgz#583d12dbec5d4f22f333f9669f7d0b7c7815b4d3" + integrity sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg== dependencies: ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^12.1.0" + debug "^4.3.2" + espree "^9.3.1" + globals "^13.9.0" ignore "^4.0.6" import-fresh "^3.2.1" - js-yaml "^3.13.1" - lodash "^4.17.20" + js-yaml "^4.1.0" minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@humanwhocodes/config-array@^0.9.2": + version "0.9.5" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" + integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -2229,12 +2242,12 @@ acorn@^6.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== -acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.1.1: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.2.4: +acorn@^8.2.4, acorn@^8.7.0: version "8.7.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== @@ -2313,11 +2326,6 @@ ansi-colors@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== -ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -4130,7 +4138,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: +debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: version "4.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== @@ -4596,13 +4604,6 @@ enhanced-resolve@^4.1.1, enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" -enquirer@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - entities@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" @@ -4811,12 +4812,12 @@ eslint-plugin-matrix-org@^0.4.0: resolved "https://registry.yarnpkg.com/eslint-plugin-matrix-org/-/eslint-plugin-matrix-org-0.4.0.tgz#de2d2db1cd471d637728133ce9a2b921690e5cd1" integrity sha512-yVkNwtc33qtrQB4PPzpU+PUdFzdkENPan3JF4zhtAQJRUYXyvKEXnYSrXLUWYRXoYFxs9LbyI2CnhJL/RnHJaQ== -eslint-plugin-react-hooks@^4.2.0: +eslint-plugin-react-hooks@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172" integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA== -eslint-plugin-react@^7.22.0: +eslint-plugin-react@^7.28.0: version "7.28.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.28.0.tgz#8f3ff450677571a659ce76efc6d80b6a525adbdf" integrity sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw== @@ -4857,12 +4858,13 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== dependencies: - eslint-visitor-keys "^1.1.0" + esrecurse "^4.3.0" + estraverse "^5.2.0" eslint-utils@^3.0.0: version "3.0.0" @@ -4871,11 +4873,6 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" @@ -4886,64 +4883,67 @@ eslint-visitor-keys@^3.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz#6fbb166a6798ee5991358bc2daa1ba76cc1254a1" integrity sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ== -eslint@7.18.0: - version "7.18.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.18.0.tgz#7fdcd2f3715a41fe6295a16234bd69aed2c75e67" - integrity sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ== +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@8.9.0: + version "8.9.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.9.0.tgz#a2a8227a99599adc4342fd9b854cb8d8d6412fdb" + integrity sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q== dependencies: - "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.3.0" + "@eslint/eslintrc" "^1.1.0" + "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" - debug "^4.0.1" + debug "^4.3.2" doctrine "^3.0.0" - enquirer "^2.3.5" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.2.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.3.1" + esquery "^1.4.0" esutils "^2.0.2" - file-entry-cache "^6.0.0" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^5.0.0" - globals "^12.1.0" - ignore "^4.0.6" + glob-parent "^6.0.1" + globals "^13.6.0" + ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - js-yaml "^3.13.1" + js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.20" + lodash.merge "^4.6.2" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" + regexpp "^3.2.0" + strip-ansi "^6.0.1" strip-json-comments "^3.1.0" - table "^6.0.4" text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== +espree@^9.3.1: + version "9.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.1.tgz#8793b4bc27ea4c778c19908e0719e7b8f4115bcd" + integrity sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ== dependencies: - acorn "^7.4.0" + acorn "^8.7.0" acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" + eslint-visitor-keys "^3.3.0" esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.2.0: +esquery@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== @@ -5232,7 +5232,7 @@ fake-indexeddb@^3.1.2: dependencies: realistic-structured-clone "^2.0.1" -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -5340,7 +5340,7 @@ figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== -file-entry-cache@^6.0.0, file-entry-cache@^6.0.1: +file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== @@ -5789,13 +5789,20 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.2, glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" @@ -5866,12 +5873,12 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^12.1.0: - version "12.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" - integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== +globals@^13.6.0, globals@^13.9.0: + version "13.12.1" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.12.1.tgz#ec206be932e6c77236677127577aa8e50bf1c5cb" + integrity sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw== dependencies: - type-fest "^0.8.1" + type-fest "^0.20.2" globby@^11.0.3, globby@^11.0.4: version "11.1.0" @@ -7915,6 +7922,11 @@ lodash.memoize@^4.1.2: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" @@ -10260,7 +10272,7 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@^2.0.0, progress@^2.0.3: +progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -10763,7 +10775,7 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1: call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^3.1.0, regexpp@^3.2.0: +regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -11187,7 +11199,7 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: +semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -12024,7 +12036,7 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -table@^6.0.4, table@^6.6.0: +table@^6.6.0: version "6.8.0" resolved "https://registry.yarnpkg.com/table/-/table-6.8.0.tgz#87e28f14fa4321c3377ba286f07b79b281a3b3ca" integrity sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA== @@ -12328,6 +12340,11 @@ type-fest@^0.18.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" From 95de708f4ee7c30177c40300c602971b876f24a5 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 24 Feb 2022 12:52:08 -0700 Subject: [PATCH 04/33] Make customisations (and general file overrides) easier to specify (#21189) Intended for customisation endpoints - see included docs. --- docs/customisations.md | 47 ++++++++++++++++++++++++------------------ webpack.config.js | 22 ++++++++++++++++++++ 2 files changed, 49 insertions(+), 20 deletions(-) diff --git a/docs/customisations.md b/docs/customisations.md index 979c81889d6..5af98a01f94 100644 --- a/docs/customisations.md +++ b/docs/customisations.md @@ -16,24 +16,30 @@ the React SDK, you can still override it from the Element Web layer: `element-web/src/customisations/YourNameSecurity.ts` 2. Edit customisations points and make sure export the ones you actually want to activate -3. Tweak the Element build process to use the customised module instead of the - default by adding this to the `additionalPlugins` array in `webpack.config.js`: - -```js -new webpack.NormalModuleReplacementPlugin( - /src[\/\\]customisations[\/\\]Security\.ts/, - path.resolve(__dirname, 'src/customisations/YourNameSecurity.ts'), -), -``` +3. Create/add an entry to `customisations.json` next to the webpack config: -If we add more customisation modules in the future, we'll likely improve these -steps to remove the need for build changes like the above. +```json +{ + "src/customisations/Security.ts": "src/customisations/YourNameSecurity.ts" +} +``` By isolating customisations to their own module, this approach should remove the chance of merge conflicts when updating your fork, and thus simplify ongoing maintenance. +**Note**: The project deliberately does not exclude `customisations.json` from Git. +This is to ensure that in shared projects it's possible to have a common config. By +default, Element Web does *not* ship with this file to prevent conflicts. + +### Custom components + +Instead of implementing skinning from the react-sdk, maintainers can use the above system to override components +if they wish. Maintenance and API surface compatibility are left as a responsibility for the project - the layering +in Element Web (including the react-sdk) do not make guarantees that properties/state machines won't change. + ### Component visibility customisation + UI for some actions can be hidden via the ComponentVisibility customisation: - inviting users to rooms and spaces, - creating rooms, @@ -41,21 +47,22 @@ UI for some actions can be hidden via the ComponentVisibility customisation: 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. -`shouldShowComponent` determines whether or not the active MatrixClient user should be able to use +`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. If shown, the user might still not be able to use the component depending on their contextual permissions. For example, invite options -might be shown to the user but they won't have permission to invite users to +might be shown to the user, but they won't have permission to invite users to the current room: the button will appear disabled. For example, to only allow users who meet a certain condition to create spaces: -``` +```typescript function shouldShowComponent(component: UIComponent): boolean { - if (component === UIComponent.CreateSpaces) { - const userMeetsCondition = <> - return userMeetsCondition; - } - return true; + if (component === UIComponent.CreateSpaces) { + // customConditionCheck() is a function of your own creation + const userMeetsCondition = customConditionCheck(MatrixClientPeg.get().getUserId()); + return userMeetsCondition; + } + return true; } ``` -In this example, all UI related to creating a space will be hidden unless the users meets a custom condition. \ No newline at end of file +In this example, all UI related to creating a space will be hidden unless the users meets the custom condition. diff --git a/webpack.config.js b/webpack.config.js index 9b6e17bed1c..566e7ddfbb1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -39,6 +39,26 @@ function getActiveThemes() { return themes; } +// See docs/customisations.md +let fileOverrides = {/* {[file: string]: string} */}; +try { + fileOverrides = require('./customisations.json'); + + // stringify the output so it appears in logs correctly, as large files can sometimes get + // represented as `` which is less than helpful. + console.log("Using customisations.json : " + JSON.stringify(fileOverrides, null, 4)); +} catch (e) { + // ignore - not important +} +const moduleReplacementPlugins = Object.entries(fileOverrides).map(([oldPath, newPath]) => { + return new webpack.NormalModuleReplacementPlugin( + // because the input is effectively defined by the person running the build, we don't + // need to do anything special to protect against regex overrunning, etc. + new RegExp(oldPath.replace(/\//g, '[\\/\\\\]').replace(/\./g, '\\.')), + path.resolve(__dirname, newPath), + ); +}); + module.exports = (env, argv) => { // Establish settings based on the environment and args. // @@ -475,6 +495,8 @@ module.exports = (env, argv) => { }, plugins: [ + ...moduleReplacementPlugins, + // This exports our CSS using the splitChunks and loaders above. new MiniCssExtractPlugin({ filename: useHMR ? "bundles/[name].css" : "bundles/[hash]/[name].css", From db55c75ada5ea190ead408bd17d1411e3cace55a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 07:48:38 +0000 Subject: [PATCH 05/33] Bump url-parse from 1.5.7 to 1.5.10 (#21231) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 11568fd4ff6..7f6895e412e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12568,9 +12568,9 @@ urix@^0.1.0: integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= url-parse@^1.4.3, url-parse@^1.5.3: - version "1.5.7" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.7.tgz#00780f60dbdae90181f51ed85fb24109422c932a" - integrity sha512-HxWkieX+STA38EDk7CE9MEryFeHCKzgagxlGvsdS7WBImq9Mk+PGwiT56w82WI3aicwJA8REp42Cxo98c8FZMA== + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" From a1546969626a3f218b6db11f8357382ed9c6937c Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 28 Feb 2022 17:28:58 +0000 Subject: [PATCH 06/33] Reset matrix-js-sdk back to develop branch --- package.json | 2 +- yarn.lock | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 80e2a260a76..73d4dff8e6a 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "gfm.css": "^1.1.2", "jsrsasign": "^10.2.0", "katex": "^0.12.0", - "matrix-js-sdk": "15.6.0", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", "matrix-react-sdk": "3.41.0", "matrix-widget-api": "^0.1.0-beta.18", "prop-types": "^15.7.2", diff --git a/yarn.lock b/yarn.lock index 5a1f343c381..be9f8d2642f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8096,7 +8096,7 @@ mathml-tag-names@^2.1.3: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -"matrix-analytics-events@github:matrix-org/matrix-analytics-events#8e75aaf0b3e045587daeaf97a7691dbfda2f20c0": +"matrix-analytics-events@github:matrix-org/matrix-analytics-events.git#8e75aaf0b3e045587daeaf97a7691dbfda2f20c0": version "0.0.1" resolved "https://codeload.github.com/matrix-org/matrix-analytics-events/tar.gz/8e75aaf0b3e045587daeaf97a7691dbfda2f20c0" @@ -8122,6 +8122,22 @@ matrix-js-sdk@15.6.0: request "^2.88.2" unhomoglyph "^1.0.6" +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": + version "15.6.0" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/0739da4ef485f8e7835306f68b0087e78ae07773" + dependencies: + "@babel/runtime" "^7.12.5" + another-json "^0.2.0" + browser-request "^0.3.3" + bs58 "^4.0.1" + content-type "^1.0.4" + loglevel "^1.7.1" + matrix-events-sdk "^0.0.1-beta.7" + p-retry "^4.5.0" + qs "^6.9.6" + request "^2.88.2" + unhomoglyph "^1.0.6" + matrix-mock-request@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/matrix-mock-request/-/matrix-mock-request-1.2.3.tgz#56b15d86e2601a9b48a854844396d18caab649c8" From c8127dc4b6923b06a788e1ab496d3f86a5de5a1d Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 28 Feb 2022 17:29:12 +0000 Subject: [PATCH 07/33] Reset matrix-react-sdk back to develop branch --- package.json | 2 +- yarn.lock | 30 ++++++------------------------ 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 73d4dff8e6a..6f162ce10a6 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "jsrsasign": "^10.2.0", "katex": "^0.12.0", "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", - "matrix-react-sdk": "3.41.0", + "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", "matrix-widget-api": "^0.1.0-beta.18", "prop-types": "^15.7.2", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index be9f8d2642f..5c2296f5336 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8096,32 +8096,15 @@ mathml-tag-names@^2.1.3: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -"matrix-analytics-events@github:matrix-org/matrix-analytics-events.git#8e75aaf0b3e045587daeaf97a7691dbfda2f20c0": +"matrix-analytics-events@github:matrix-org/matrix-analytics-events.git#daad3faed54f0b1f1e026a7498b4653e4d01cd90": version "0.0.1" - resolved "https://codeload.github.com/matrix-org/matrix-analytics-events/tar.gz/8e75aaf0b3e045587daeaf97a7691dbfda2f20c0" + resolved "https://codeload.github.com/matrix-org/matrix-analytics-events/tar.gz/daad3faed54f0b1f1e026a7498b4653e4d01cd90" matrix-events-sdk@^0.0.1-beta.7: version "0.0.1-beta.7" resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1-beta.7.tgz#5ffe45eba1f67cc8d7c2377736c728b322524934" integrity sha512-9jl4wtWanUFSy2sr2lCjErN/oC8KTAtaeaozJtrgot1JiQcEI4Rda9OLgQ7nLKaqb4Z/QUx/fR3XpDzm5Jy1JA== -matrix-js-sdk@15.6.0: - version "15.6.0" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-15.6.0.tgz#de29a75c5407801c95940d68ef4a22e9756c623d" - integrity sha512-jxx2jiuFVs6Vn76/Nm4+9+mLRW8NJMnA8XhFPtG9gzLpAOq5NQeRvr8mvGQqOQp2F85wthGVd0EkiP6cC1JXuw== - dependencies: - "@babel/runtime" "^7.12.5" - another-json "^0.2.0" - browser-request "^0.3.3" - bs58 "^4.0.1" - content-type "^1.0.4" - loglevel "^1.7.1" - matrix-events-sdk "^0.0.1-beta.7" - p-retry "^4.5.0" - qs "^6.9.6" - request "^2.88.2" - unhomoglyph "^1.0.6" - "matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "15.6.0" resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/0739da4ef485f8e7835306f68b0087e78ae07773" @@ -8146,10 +8129,9 @@ matrix-mock-request@^1.2.3: bluebird "^3.5.0" expect "^1.20.2" -matrix-react-sdk@3.41.0: +"matrix-react-sdk@github:matrix-org/matrix-react-sdk#develop": version "3.41.0" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.41.0.tgz#02ff28735f674be3fd1b886b34f8825b8ec4d1ab" - integrity sha512-Z0BkUkA1BfAlThutfHG/BfuKn7P87QtHbuXvWyqL7NshYE69f4UFv1vS2i0jTUJhQQdsOsZv9hSg2ZbaeWz2tw== + resolved "https://codeload.github.com/matrix-org/matrix-react-sdk/tar.gz/b02d5ecb97e475342f79383b18269ea93bd62620" dependencies: "@babel/runtime" "^7.12.5" "@sentry/browser" "^6.11.0" @@ -8184,9 +8166,9 @@ matrix-react-sdk@3.41.0: linkifyjs "^4.0.0-beta.4" lodash "^4.17.20" maplibre-gl "^1.15.2" - matrix-analytics-events "github:matrix-org/matrix-analytics-events.git#8e75aaf0b3e045587daeaf97a7691dbfda2f20c0" + matrix-analytics-events "github:matrix-org/matrix-analytics-events.git#daad3faed54f0b1f1e026a7498b4653e4d01cd90" matrix-events-sdk "^0.0.1-beta.7" - matrix-js-sdk "15.6.0" + matrix-js-sdk "github:matrix-org/matrix-js-sdk#develop" matrix-widget-api "^0.1.0-beta.18" minimist "^1.2.5" opus-recorder "^8.0.3" From 65adc3ba9335ea9b99d99d26eaf3d0fa528543ea Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 28 Feb 2022 11:02:03 -0700 Subject: [PATCH 08/33] Add a config.json option to skip the built-in Jitsi welcome screen (#21190) * Add a config.json option to skip the built-in Jitsi welcome screen Stop-gap for https://github.com/vector-im/element-web/issues/20503 * Spelling --- docs/config.md | 7 ++++++- src/vector/jitsi/index.ts | 40 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/config.md b/docs/config.md index 6cb5efc06a6..a637f0fb633 100644 --- a/docs/config.md +++ b/docs/config.md @@ -123,7 +123,12 @@ For a good example, see https://develop.element.io/config.json. `/.well-known/matrix/client` in its well-known location, and the JSON file at that location has a key `m.vector.riot.jitsi`. In this case, the configuration found in the well-known location is used instead. - +1. `jitsiWidget`: Options to change the built-in Jitsi widget behaviour. `jitsi` controls + how the widget gets created, but not how it behaves. + 1. `skipBuiltInWelcomeScreen`: If you'd like to skip the default "Join Conference" + behaviour, set this to `true`. This will cause the widget to assume that there's + a Jitsi welcome screen set up and point the user towards that. Note that this can + cause the camera/microphone to flicker as "in use" while Jitsi tests the devices. 1. `enable_presence_by_hs_url`: The property key should be the URL of the homeserver and its value defines whether to enable/disable the presence status display from that homeserver. If no options are configured, presence is shown for all diff --git a/src/vector/jitsi/index.ts b/src/vector/jitsi/index.ts index 4f0dab067fa..155501ca31f 100644 --- a/src/vector/jitsi/index.ts +++ b/src/vector/jitsi/index.ts @@ -24,6 +24,8 @@ import { import { ElementWidgetActions } from "matrix-react-sdk/src/stores/widgets/ElementWidgetActions"; import { logger } from "matrix-js-sdk/src/logger"; +import { getVectorConfig } from "../getconfig"; + // We have to trick webpack into loading our CSS for us. require("./index.scss"); @@ -50,9 +52,14 @@ let startAudioOnly: boolean; let widgetApi: WidgetApi; let meetApi: any; // JitsiMeetExternalAPI +let skipOurWelcomeScreen = false; (async function() { try { + // Queue a config.json lookup asap, so we can use it later on. We want this to be concurrent with + // other setup work and therefore do not block. + const configPromise = getVectorConfig('..'); + // The widget's options are encoded into the fragment to avoid leaking info to the server. const widgetQuery = new URLSearchParams(window.location.hash.substring(1)); // The widget spec on the other hand requires the widgetId and parentUrl to show up in the regular query string. @@ -110,6 +117,16 @@ let meetApi: any; // JitsiMeetExternalAPI roomName = qsParam('roomName', true); startAudioOnly = qsParam('isAudioOnly', true) === "true"; + // We've reached the point where we have to wait for the config, so do that then parse it. + const instanceConfig = await configPromise; + skipOurWelcomeScreen = instanceConfig?.['jitsiWidget']?.['skipBuiltInWelcomeScreen'] || false; + + // If we're meant to skip our screen, skip to the part where we show Jitsi instead of us. + // We don't set up the call yet though as this might lead to failure without the widget API. + if (skipOurWelcomeScreen) { + toggleConferenceVisibility(true); + } + if (widgetApi) { await readyPromise; await widgetApi.setAlwaysOnScreen(false); // start off as detachable from the screen @@ -147,6 +164,11 @@ let meetApi: any; // JitsiMeetExternalAPI ); } + // Now that everything should be set up, skip to the Jitsi splash screen if needed + if (skipOurWelcomeScreen) { + skipToJitsiSplashScreen(); + } + enableJoinButton(); // always enable the button } catch (e) { logger.error("Error setting up Jitsi widget", e); @@ -160,10 +182,24 @@ function enableJoinButton() { function switchVisibleContainers() { inConference = !inConference; + + // Our welcome screen is managed by other code, so just don't switch to it ever + // if we're not supposed to. + if (!skipOurWelcomeScreen) { + toggleConferenceVisibility(inConference); + } +} + +function toggleConferenceVisibility(inConference: boolean) { document.getElementById("jitsiContainer").style.visibility = inConference ? 'unset' : 'hidden'; document.getElementById("joinButtonContainer").style.visibility = inConference ? 'hidden' : 'unset'; } +function skipToJitsiSplashScreen() { + // really just a function alias for self-documenting code + joinConference(); +} + /** * Create a JWT token fot jitsi openidtoken-jwt auth * @@ -267,5 +303,9 @@ function joinConference() { // event handler bound in HTML document.getElementById("jitsiContainer").innerHTML = ""; meetApi = null; + + if (skipOurWelcomeScreen) { + skipToJitsiSplashScreen(); + } }); } From de9e65de2b185ad40818f9caaecb96e57655dd10 Mon Sep 17 00:00:00 2001 From: Kerry Date: Tue, 1 Mar 2022 10:50:20 +0100 Subject: [PATCH 09/33] labs doc for feature_location_share_pin_drop (#21242) Signed-off-by: Kerry Archibald --- docs/labs.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/labs.md b/docs/labs.md index 1580a808b4b..3cf38f29322 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -180,3 +180,7 @@ name and avatar (profile) were shown on historical messages instead of the profi at the time when the message was sent. When enabled, historical messages will use the current profile for the sender. + +## Pin drop location sharing (`feature_location_share_pin_drop`) [In Development] + +Enables sharing a pin drop location to the timeline. \ No newline at end of file From c13a1908df6a0d2b27aaa39bf1a6321d90d97ec7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 1 Mar 2022 11:06:15 -0700 Subject: [PATCH 10/33] Add docs for `logout_redirect_url` (#21222) --- docs/config.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/config.md b/docs/config.md index a637f0fb633..5d6da407a14 100644 --- a/docs/config.md +++ b/docs/config.md @@ -35,6 +35,9 @@ For a good example, see https://develop.element.io/config.json. users to the SSO to log in if the user lands on the welcome page or no specific page. For example, https://app.element.io/#/welcome and https://app.element.io would redirect if set up to use this option. This can be useful to maintain guest experience until an account is needed. +1. `logout_redirect_url`: After Element has cleared the user's storage, the user will be redirected to this URL. + Typically most useful in environments where the account users will be logging into is managed for them, such + as in cases of some SSO deployments. For example: this page might log the user out of the SSO system too. 1. `features`: Lookup of optional features that may be force-enabled (`true`) or force-disabled (`false`). When features are not listed here, their defaults will be used, and users can turn them on/off if `showLabsSettings` allows them to. The available optional experimental features vary from release to release and are From 087aed80dd667b0d8596363b12891d0a13d1bbb5 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 1 Mar 2022 11:53:12 -0700 Subject: [PATCH 11/33] Add docs for custom_translations_url (#21188) --- docs/config.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/config.md b/docs/config.md index 5d6da407a14..7ef751a5bc0 100644 --- a/docs/config.md +++ b/docs/config.md @@ -190,6 +190,9 @@ For a good example, see https://develop.element.io/config.json. when explaining to the user where data is being sent. If not set, defaults to `brand`. 1. `defaultDeviceDisplayName`: The default device display name to use for new logins and registrations. If not set then a calculated version will be used. +1. `custom_translations_url`: An optional URL to allow overriding of translatable strings. + The JSON file must be in a format of `{"affected string": {"languageCode": "new string"}}`. + See https://github.com/matrix-org/matrix-react-sdk/pull/7886 for details. Note that `index.html` also has an og:image meta tag that is set to an image hosted on riot.im. This is the image used if links to your copy of Element From 240c3be014be47e5292a73680082a20c510bec7d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 1 Mar 2022 19:26:22 +0000 Subject: [PATCH 12/33] Mandate use of js-sdk/src/matrix import over js-sdk/src (#21257) --- .eslintrc.js | 33 +++++++++++++++++++++++++++++++++ docs/translating-dev.md | 2 +- src/vector/app.tsx | 2 +- test/app-tests/joining-test.tsx | 4 ++-- test/app-tests/loading-test.tsx | 4 ++-- 5 files changed, 39 insertions(+), 6 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b59ea416ad7..bb3a06d3552 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,6 +25,39 @@ module.exports = { // We disable this while we're transitioning "@typescript-eslint/no-explicit-any": "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/docs/translating-dev.md b/docs/translating-dev.md index cac5174d770..505558bc3d1 100644 --- a/docs/translating-dev.md +++ b/docs/translating-dev.md @@ -30,7 +30,7 @@ function getColorName(hex) { ## Adding new strings - 1. Check if the import ``import { _t } from 'matrix-react-sdk/lib/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 'matrix-react-sdk/src/languageHandler';`` is present. If not add it to the other import statements. Also import `_td` if needed. 1. Add ``_t()`` to your string. (Don't forget curly braces when you assign an expression to JSX attributes in the render method). 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 update ``src/i18n/strings/en_EN.json`` 1. If you added a string with a plural, you can add other English plural variants to ``src/i18n/strings/en_EN.json`` (remeber to edit the one in the same project as the source file containing your new translation). diff --git a/src/vector/app.tsx b/src/vector/app.tsx index 61069fa2368..e92ad90136a 100644 --- a/src/vector/app.tsx +++ b/src/vector/app.tsx @@ -19,7 +19,7 @@ limitations under the License. */ import React from 'react'; -import * as sdk from 'matrix-react-sdk'; +import * as sdk from 'matrix-react-sdk/src/index'; import PlatformPeg from 'matrix-react-sdk/src/PlatformPeg'; import { _td, newTranslatableError } from 'matrix-react-sdk/src/languageHandler'; import AutoDiscoveryUtils from 'matrix-react-sdk/src/utils/AutoDiscoveryUtils'; diff --git a/test/app-tests/joining-test.tsx b/test/app-tests/joining-test.tsx index 2dfaa293b01..23f956f2d46 100644 --- a/test/app-tests/joining-test.tsx +++ b/test/app-tests/joining-test.tsx @@ -18,8 +18,8 @@ limitations under the License. import PlatformPeg from 'matrix-react-sdk/src/PlatformPeg'; import WebPlatform from '../../src/vector/platform/WebPlatform'; -import * as sdk from "matrix-react-sdk"; -import * as jssdk from "matrix-js-sdk"; +import * as sdk from "matrix-react-sdk/src/index"; +import * as jssdk from "matrix-js-sdk/src/matrix"; import "../skin-sdk"; import "../jest-mocks"; import React from "react"; diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.tsx index 9eb64156963..e86c83759f1 100644 --- a/test/app-tests/loading-test.tsx +++ b/test/app-tests/loading-test.tsx @@ -25,8 +25,8 @@ import React from 'react'; import ReactDOM from 'react-dom'; import ReactTestUtils from 'react-dom/test-utils'; import MatrixReactTestUtils from 'matrix-react-test-utils'; -import * as jssdk from 'matrix-js-sdk'; -import * as sdk from 'matrix-react-sdk'; +import * as jssdk from 'matrix-js-sdk/src/matrix'; +import * as sdk from 'matrix-react-sdk/src/index'; import {MatrixClientPeg} from 'matrix-react-sdk/src/MatrixClientPeg'; import {Views} from 'matrix-react-sdk/src/components/structures/MatrixChat'; import dis from 'matrix-react-sdk/src/dispatcher/dispatcher'; From 9a17a61809a97e3e20011eb30aaccdfb170d21d9 Mon Sep 17 00:00:00 2001 From: Kerry Date: Wed, 2 Mar 2022 10:14:30 +0100 Subject: [PATCH 13/33] add svgr loader for icons (#21248) * add svgr loader for icons Signed-off-by: Kerry Archibald * fix config, move dep to dev Signed-off-by: Kerry Archibald * add svg types Signed-off-by: Kerry Archibald * add aria-hidden and role=img to svg Signed-off-by: Kerry Archibald * make svgProps explicitly overridable Signed-off-by: Kerry Archibald * role presentatino Signed-off-by: Kerry Archibald * update copyright Signed-off-by: Kerry Archibald --- package.json | 1 + src/@types/svg.d.ts | 21 ++++++++ webpack.config.js | 47 ++++++++++++++++- yarn.lock | 125 ++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 188 insertions(+), 6 deletions(-) create mode 100644 src/@types/svg.d.ts diff --git a/package.json b/package.json index 74d08364f8b..3e234364634 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3", "@principalstudio/html-webpack-inject-preload": "^1.2.7", "@sentry/webpack-plugin": "^1.18.1", + "@svgr/webpack": "^5.5.0", "@types/flux": "^3.1.9", "@types/jest": "^27.0.2", "@types/modernizr": "^3.5.3", diff --git a/src/@types/svg.d.ts b/src/@types/svg.d.ts new file mode 100644 index 00000000000..29c2f555e31 --- /dev/null +++ b/src/@types/svg.d.ts @@ -0,0 +1,21 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + +declare module "*.svg" { + const path: string; + export const Icon: React.FC>; + export default path; +} diff --git a/webpack.config.js b/webpack.config.js index 566e7ddfbb1..e9d68480b0e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -455,7 +455,52 @@ module.exports = (env, argv) => { }, }, { - test: /\.(gif|png|svg|ttf|woff|woff2|xml|ico)$/, + test: /\.svg$/, + use: [ + { + loader: '@svgr/webpack', + options: { + namedExport: 'Icon', + svgProps: { + role: 'presentation', + 'aria-hidden': true, + }, + // props set on the svg will override defaults + expandProps: 'end', + svgoConfig: { + plugins: { + // generates a viewbox if missing + removeDimensions: true, + }, + }, + esModule: false, + name: '[name].[hash:7].[ext]', + outputPath: getAssetOutputPath, + publicPath: function (url, resourcePath) { + const outputPath = getAssetOutputPath(url, resourcePath); + return toPublicPath(path.join("../..", outputPath)); + }, + }, + }, + { + loader: 'file-loader', + options: { + esModule: false, + name: '[name].[hash:7].[ext]', + outputPath: getAssetOutputPath, + publicPath: function (url, resourcePath) { + // CSS image usages end up in the `bundles/[hash]` output + // directory, so we adjust the final path to navigate up + // twice. + const outputPath = getAssetOutputPath(url, resourcePath); + return toPublicPath(path.join("../..", outputPath)); + }, + }, + }, + ] + }, + { + test: /\.(gif|png|ttf|woff|woff2|xml|ico)$/, // Use a content-based hash in the name so that we can set a long cache // lifetime for assets while still delivering changes quickly. oneOf: [ diff --git a/yarn.lock b/yarn.lock index e6c523f36a3..14fd216553a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -800,6 +800,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-react-constant-elements@^7.12.1": + version "7.17.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.17.6.tgz#6cc273c2f612a6a50cb657e63ee1303e5e68d10a" + integrity sha512-OBv9VkyyKtsHZiHLoSfCn+h6yU7YKX8nrs32xUmOa1SRSk+t03FosB6fBZ0Yz4BpD1WV7l73Nsad+2Tz7APpqw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-transform-react-display-name@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz#7b6d40d232f4c0f550ea348593db3b21e2404340" @@ -919,7 +926,7 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/preset-env@^7.12.11": +"@babel/preset-env@^7.12.1", "@babel/preset-env@^7.12.11": version "7.16.11" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.16.11.tgz#5dd88fd885fae36f88fd7c8342475c9f0abe2982" integrity sha512-qcmWG8R7ZW6WBRPZK//y+E3Cli151B20W1Rv7ln27vuPaXU/8TKms6jFdiJtF7UDTxcrb7mZd88tAeK9LjdT8g== @@ -1010,7 +1017,7 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-react@^7.12.10": +"@babel/preset-react@^7.12.10", "@babel/preset-react@^7.12.5": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.16.7.tgz#4c18150491edc69c183ff818f9f2aecbe5d93852" integrity sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA== @@ -1074,7 +1081,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.12.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw== @@ -1672,6 +1679,109 @@ remark "^13.0.0" unist-util-find-all-after "^3.0.2" +"@svgr/babel-plugin-add-jsx-attribute@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz#81ef61947bb268eb9d50523446f9c638fb355906" + integrity sha512-ZFf2gs/8/6B8PnSofI0inYXr2SDNTDScPXhN7k5EqD4aZ3gi6u+rbmZHVB8IM3wDyx8ntKACZbtXSm7oZGRqVg== + +"@svgr/babel-plugin-remove-jsx-attribute@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-5.4.0.tgz#6b2c770c95c874654fd5e1d5ef475b78a0a962ef" + integrity sha512-yaS4o2PgUtwLFGTKbsiAy6D0o3ugcUhWK0Z45umJ66EPWunAz9fuFw2gJuje6wqQvQWOTJvIahUwndOXb7QCPg== + +"@svgr/babel-plugin-remove-jsx-empty-expression@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-5.0.1.tgz#25621a8915ed7ad70da6cea3d0a6dbc2ea933efd" + integrity sha512-LA72+88A11ND/yFIMzyuLRSMJ+tRKeYKeQ+mR3DcAZ5I4h5CPWN9AHyUzJbWSYp/u2u0xhmgOe0+E41+GjEueA== + +"@svgr/babel-plugin-replace-jsx-attribute-value@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-5.0.1.tgz#0b221fc57f9fcd10e91fe219e2cd0dd03145a897" + integrity sha512-PoiE6ZD2Eiy5mK+fjHqwGOS+IXX0wq/YDtNyIgOrc6ejFnxN4b13pRpiIPbtPwHEc+NT2KCjteAcq33/F1Y9KQ== + +"@svgr/babel-plugin-svg-dynamic-title@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-5.4.0.tgz#139b546dd0c3186b6e5db4fefc26cb0baea729d7" + integrity sha512-zSOZH8PdZOpuG1ZVx/cLVePB2ibo3WPpqo7gFIjLV9a0QsuQAzJiwwqmuEdTaW2pegyBE17Uu15mOgOcgabQZg== + +"@svgr/babel-plugin-svg-em-dimensions@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-5.4.0.tgz#6543f69526632a133ce5cabab965deeaea2234a0" + integrity sha512-cPzDbDA5oT/sPXDCUYoVXEmm3VIoAWAPT6mSPTJNbQaBNUuEKVKyGH93oDY4e42PYHRW67N5alJx/eEol20abw== + +"@svgr/babel-plugin-transform-react-native-svg@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-5.4.0.tgz#00bf9a7a73f1cad3948cdab1f8dfb774750f8c80" + integrity sha512-3eYP/SaopZ41GHwXma7Rmxcv9uRslRDTY1estspeB1w1ueZWd/tPlMfEOoccYpEMZU3jD4OU7YitnXcF5hLW2Q== + +"@svgr/babel-plugin-transform-svg-component@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-5.5.0.tgz#583a5e2a193e214da2f3afeb0b9e8d3250126b4a" + integrity sha512-q4jSH1UUvbrsOtlo/tKcgSeiCHRSBdXoIoqX1pgcKK/aU3JD27wmMKwGtpB8qRYUYoyXvfGxUVKchLuR5pB3rQ== + +"@svgr/babel-preset@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@svgr/babel-preset/-/babel-preset-5.5.0.tgz#8af54f3e0a8add7b1e2b0fcd5a882c55393df327" + integrity sha512-4FiXBjvQ+z2j7yASeGPEi8VD/5rrGQk4Xrq3EdJmoZgz/tpqChpo5hgXDvmEauwtvOc52q8ghhZK4Oy7qph4ig== + dependencies: + "@svgr/babel-plugin-add-jsx-attribute" "^5.4.0" + "@svgr/babel-plugin-remove-jsx-attribute" "^5.4.0" + "@svgr/babel-plugin-remove-jsx-empty-expression" "^5.0.1" + "@svgr/babel-plugin-replace-jsx-attribute-value" "^5.0.1" + "@svgr/babel-plugin-svg-dynamic-title" "^5.4.0" + "@svgr/babel-plugin-svg-em-dimensions" "^5.4.0" + "@svgr/babel-plugin-transform-react-native-svg" "^5.4.0" + "@svgr/babel-plugin-transform-svg-component" "^5.5.0" + +"@svgr/core@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@svgr/core/-/core-5.5.0.tgz#82e826b8715d71083120fe8f2492ec7d7874a579" + integrity sha512-q52VOcsJPvV3jO1wkPtzTuKlvX7Y3xIcWRpCMtBF3MrteZJtBfQw/+u0B1BHy5ColpQc1/YVTrPEtSYIMNZlrQ== + dependencies: + "@svgr/plugin-jsx" "^5.5.0" + camelcase "^6.2.0" + cosmiconfig "^7.0.0" + +"@svgr/hast-util-to-babel-ast@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-5.5.0.tgz#5ee52a9c2533f73e63f8f22b779f93cd432a5461" + integrity sha512-cAaR/CAiZRB8GP32N+1jocovUtvlj0+e65TB50/6Lcime+EA49m/8l+P2ko+XPJ4dw3xaPS3jOL4F2X4KWxoeQ== + dependencies: + "@babel/types" "^7.12.6" + +"@svgr/plugin-jsx@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@svgr/plugin-jsx/-/plugin-jsx-5.5.0.tgz#1aa8cd798a1db7173ac043466d7b52236b369000" + integrity sha512-V/wVh33j12hGh05IDg8GpIUXbjAPnTdPTKuP4VNLggnwaHMPNQNae2pRnyTAILWCQdz5GyMqtO488g7CKM8CBA== + dependencies: + "@babel/core" "^7.12.3" + "@svgr/babel-preset" "^5.5.0" + "@svgr/hast-util-to-babel-ast" "^5.5.0" + svg-parser "^2.0.2" + +"@svgr/plugin-svgo@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@svgr/plugin-svgo/-/plugin-svgo-5.5.0.tgz#02da55d85320549324e201c7b2e53bf431fcc246" + integrity sha512-r5swKk46GuQl4RrVejVwpeeJaydoxkdwkM1mBKOgJLBUJPGaLci6ylg/IjhrRsREKDkr4kbMWdgOtbXEh0fyLQ== + dependencies: + cosmiconfig "^7.0.0" + deepmerge "^4.2.2" + svgo "^1.2.2" + +"@svgr/webpack@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@svgr/webpack/-/webpack-5.5.0.tgz#aae858ee579f5fa8ce6c3166ef56c6a1b381b640" + integrity sha512-DOBOK255wfQxguUta2INKkzPj6AIS6iafZYiYmHn6W3pHlycSRRlvWKCfLDG10fXfLWqE3DJHgRUOyJYmARa7g== + dependencies: + "@babel/core" "^7.12.3" + "@babel/plugin-transform-react-constant-elements" "^7.12.1" + "@babel/preset-env" "^7.12.1" + "@babel/preset-react" "^7.12.5" + "@svgr/core" "^5.5.0" + "@svgr/plugin-jsx" "^5.5.0" + "@svgr/plugin-svgo" "^5.5.0" + loader-utils "^2.0.0" + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -3211,7 +3321,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0: +camelcase@^6.0.0, camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -12001,12 +12111,17 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +svg-parser@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/svg-parser/-/svg-parser-2.0.4.tgz#fdc2e29e13951736140b76cb122c8ee6630eb6b5" + integrity sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ== + svg-tags@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= -svgo@^1.0.0: +svgo@^1.0.0, svgo@^1.2.2: version "1.3.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== From 6721a7162f81c6fd5a15c823a4918d3c32b5d670 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 2 Mar 2022 17:52:09 +0000 Subject: [PATCH 14/33] Install types for ua-parser-js (#21277) --- package.json | 1 + yarn.lock | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/package.json b/package.json index 3e234364634..71e5b99c97b 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,7 @@ "@types/react": "17.0.14", "@types/react-dom": "17.0.9", "@types/sanitize-html": "^2.3.1", + "@types/ua-parser-js": "^0.7.36", "@typescript-eslint/eslint-plugin": "^5.6.0", "@typescript-eslint/parser": "^5.6.0", "allchange": "^1.0.6", diff --git a/yarn.lock b/yarn.lock index 14fd216553a..b0381a3b4c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2036,6 +2036,11 @@ resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.8.tgz#b94a4391c85666c7b73299fd3ad79d4faa435310" integrity sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ== +"@types/ua-parser-js@^0.7.36": + version "0.7.36" + resolved "https://registry.yarnpkg.com/@types/ua-parser-js/-/ua-parser-js-0.7.36.tgz#9bd0b47f26b5a3151be21ba4ce9f5fa457c5f190" + integrity sha512-N1rW+njavs70y2cApeIw1vLMYXRwfBy+7trgavGuuTfOd7j1Yh7QTRc/yqsPl6ncokt72ZXuxEU0PiCp9bSwNQ== + "@types/uglify-js@*": version "3.13.1" resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.13.1.tgz#5e889e9e81e94245c75b6450600e1c5ea2878aea" From 491999281f6d37fa89a175dc0a6e502cc8e5b817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 3 Mar 2022 11:39:42 +0100 Subject: [PATCH 15/33] Add `allowOverridingNativeContextMenus()` (#17777) --- src/vector/platform/ElectronPlatform.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 1626426ca83..b5f5df79122 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -308,7 +308,11 @@ export default class ElectronPlatform extends VectorBasePlatform { return true; } - setNotificationCount(count: number) { + public allowOverridingNativeContextMenus(): boolean { + return true; + } + + public setNotificationCount(count: number): void { if (this.notificationCount === count) return; super.setNotificationCount(count); From 9223d9345093caa4a073567964a57096dcdd6ee7 Mon Sep 17 00:00:00 2001 From: James Salter Date: Thu, 3 Mar 2022 14:36:12 +0000 Subject: [PATCH 16/33] Check for update on load and refresh if available (#21272) * Reload the page if we're stale on load * Set updated=1 --- src/vector/platform/WebPlatform.ts | 44 ++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/src/vector/platform/WebPlatform.ts b/src/vector/platform/WebPlatform.ts index fab4bfa9d9a..52401b5a551 100644 --- a/src/vector/platform/WebPlatform.ts +++ b/src/vector/platform/WebPlatform.ts @@ -27,6 +27,7 @@ import UAParser from 'ua-parser-js'; import { logger } from "matrix-js-sdk/src/logger"; import VectorBasePlatform from './VectorBasePlatform'; +import { parseQs } from "../url_utils"; const POKE_RATE_MS = 10 * 60 * 1000; // 10 min @@ -119,25 +120,56 @@ export default class WebPlatform extends VectorBasePlatform { } startUpdater() { - this.pollForUpdate(); - setInterval(this.pollForUpdate, POKE_RATE_MS); + // Poll for an update immediately, and reload the page now if we're out of date + // already as we've just initialised an old version of the app somehow. + // + // Forcibly reloading the page aims to avoid users interacting at all with the old + // and potentially broken version of the app. + // + // Ideally, loading an old copy would be impossible with the + // cache-control: nocache HTTP header set, but Firefox doesn't always obey it :/ + this.pollForUpdate((version: string, newVersion: string) => { + const query = parseQs(location); + if (query.updated === "1") { + // We just reloaded already and are still on the old version! + // Show the toast rather than reload in a loop. + showUpdateToast(version, newVersion); + return; + } + + // Set updated=1 as a query param so we can detect that we've already done this once + // and reload the page. + let suffix = "updated=1"; + if (window.location.search.length === 0) { + suffix = "?" + suffix; + } else { + suffix = "&" + suffix; + } + + // This line has the effect of loading the page at the new location + window.location.href = window.location.href + suffix; + }); + setInterval(() => this.pollForUpdate(showUpdateToast, hideUpdateToast), POKE_RATE_MS); } async canSelfUpdate(): Promise { return true; } - pollForUpdate = () => { + pollForUpdate = ( + showUpdate: (currentVersion: string, mostRecentVersion: string) => void, + showNoUpdate?: () => void, + ) => { return this.getMostRecentVersion().then((mostRecentVersion) => { const currentVersion = this.getNormalizedAppVersion(process.env.VERSION); if (currentVersion !== mostRecentVersion) { if (this.shouldShowUpdate(mostRecentVersion)) { - showUpdateToast(currentVersion, mostRecentVersion); + showUpdate(currentVersion, mostRecentVersion); } return { status: UpdateCheckStatus.Ready }; } else { - hideUpdateToast(); + showNoUpdate?.(); } return { status: UpdateCheckStatus.NotAvailable }; @@ -152,7 +184,7 @@ export default class WebPlatform extends VectorBasePlatform { startUpdateCheck() { super.startUpdateCheck(); - this.pollForUpdate().then((updateState) => { + this.pollForUpdate(showUpdateToast, hideUpdateToast).then((updateState) => { dis.dispatch({ action: Action.CheckUpdates, ...updateState, From b80a2cbd18d7614222137f097b1ded82c4b7698b Mon Sep 17 00:00:00 2001 From: Kerry Date: Thu, 3 Mar 2022 17:43:21 +0100 Subject: [PATCH 17/33] add svg mock to jest config (#21296) * add svg mock to jest config Signed-off-by: Kerry Archibald * fix svg mock better Signed-off-by: Kerry Archibald --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 71e5b99c97b..d6662433aa2 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,8 @@ ], "moduleNameMapper": { "\\.(css|scss)$": "/__mocks__/cssMock.js", - "\\.(gif|png|svg|ttf|woff2)$": "/node_modules/matrix-react-sdk/__mocks__/imageMock.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", "^browser-request$": "/node_modules/matrix-react-sdk/__mocks__/browser-request.js", "^react$": "/node_modules/react", From 43a55698e383103df864fb671470781256d379db Mon Sep 17 00:00:00 2001 From: eleensmathew <92302620+eleensmathew@users.noreply.github.com> Date: Fri, 4 Mar 2022 11:26:58 +0300 Subject: [PATCH 18/33] Added Threaded Messaging (#21303) --- docs/labs.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/labs.md b/docs/labs.md index 3cf38f29322..576c1e988bf 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -183,4 +183,12 @@ When enabled, historical messages will use the current profile for the sender. ## Pin drop location sharing (`feature_location_share_pin_drop`) [In Development] -Enables sharing a pin drop location to the timeline. \ No newline at end of file +Enables sharing a pin drop location to the timeline. + +## Threaded Messaging (`feature_thread`) + +Threading allows users to branch out a new conversation from the main timeline of a room. This is particularly useful in high traffic rooms where multiple conversations can happen in parallel or when a single discussion might stretch over a very long period of time. + +Threads can be access by clicking their summary below the root event on the room timeline. Users can find a comprehensive list of threads by click the icon on the room header button. + +This feature might work in degraded mode if the homeserver a user is connected to does not advertise support for the unstable feature `org.matrix.msc3440` when calling the `/versions` API endpoint. From 3f2ad33b2b22c0d74e85bf855a88a59b933e79d7 Mon Sep 17 00:00:00 2001 From: daniellekirkwood <89144281+daniellekirkwood@users.noreply.github.com> Date: Fri, 4 Mar 2022 09:22:30 +0000 Subject: [PATCH 19/33] Add FTUE and WTF label automations (#21179) --- .github/workflows/triage-labelled.yml | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.github/workflows/triage-labelled.yml b/.github/workflows/triage-labelled.yml index 28f5307b8db..a2de4f29fa4 100644 --- a/.github/workflows/triage-labelled.yml +++ b/.github/workflows/triage-labelled.yml @@ -188,3 +188,49 @@ jobs: env: PROJECT_ID: "PN_kwDOAM0swc3m-g" GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + + move_ftue_issues: + name: Z-FTUE issues to the FTUE project board + runs-on: ubuntu-latest + if: > + contains(github.event.issue.labels.*.name, 'Z-FTUE') + steps: + - uses: octokit/graphql-action@v2.x + with: + headers: '{"GraphQL-Features": "projects_next_graphql"}' + query: | + mutation add_to_project($projectid:ID!,$contentid:ID!) { + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { + projectNextItem { + id + } + } + } + projectid: ${{ env.PROJECT_ID }} + contentid: ${{ github.event.issue.node_id }} + env: + PROJECT_ID: "PN_kwDOAM0swc4AAqVx" + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + + move_WTF_issues: + name: Z-WTF issues to the WTF project board + runs-on: ubuntu-latest + if: > + contains(github.event.issue.labels.*.name, 'Z-WTF') + steps: + - uses: octokit/graphql-action@v2.x + with: + headers: '{"GraphQL-Features": "projects_next_graphql"}' + query: | + mutation add_to_project($projectid:ID!,$contentid:ID!) { + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { + projectNextItem { + id + } + } + } + projectid: ${{ env.PROJECT_ID }} + contentid: ${{ github.event.issue.node_id }} + env: + PROJECT_ID: "PN_kwDOAM0swc4AArk0" + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} From 30339bd9a306e07a6b5f3fbde53dc4649c12fc6e Mon Sep 17 00:00:00 2001 From: Kerry Date: Fri, 4 Mar 2022 13:57:26 +0100 Subject: [PATCH 20/33] fix webpack handling for svg imports (#21311) --- webpack.config.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index e9d68480b0e..fe72386a31d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -456,6 +456,7 @@ module.exports = (env, argv) => { }, { test: /\.svg$/, + issuer: /\.(js|ts|jsx|tsx|html)$/, use: [ { loader: '@svgr/webpack', @@ -478,10 +479,28 @@ module.exports = (env, argv) => { outputPath: getAssetOutputPath, publicPath: function (url, resourcePath) { const outputPath = getAssetOutputPath(url, resourcePath); - return toPublicPath(path.join("../..", outputPath)); + return toPublicPath(outputPath); }, }, }, + { + loader: 'file-loader', + options: { + esModule: false, + name: '[name].[hash:7].[ext]', + outputPath: getAssetOutputPath, + publicPath: function (url, resourcePath) { + const outputPath = getAssetOutputPath(url, resourcePath); + return toPublicPath(outputPath); + }, + }, + }, + ] + }, + { + test: /\.svg$/, + issuer: /\.(scss|css)$/, + use: [ { loader: 'file-loader', options: { From 8ec86eb7d566810a8bf6979c37698d6321970787 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 4 Mar 2022 09:17:19 -0500 Subject: [PATCH 21/33] Remove Lojban translation (#21302) Signed-off-by: Robin Townsend --- scripts/copy-res.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/copy-res.js b/scripts/copy-res.js index 2cd35e4241c..8d91092fdb7 100755 --- a/scripts/copy-res.js +++ b/scripts/copy-res.js @@ -33,7 +33,6 @@ const INCLUDE_LANGS = [ {'value': 'is', 'label': 'íslenska'}, {'value': 'it', 'label': 'Italiano'}, {'value': 'ja', 'label': '日本語'}, - {'value': 'jbo', 'label': 'banjubu\'o'}, {'value': 'kab', 'label': 'Taqbaylit'}, {'value': 'ko', 'label': '한국어'}, {'value': 'lt', 'label': 'Lietuvių'}, From f975d85806263c9f7b1750e53de8da0274dfb02c Mon Sep 17 00:00:00 2001 From: Kerry Date: Fri, 4 Mar 2022 16:48:54 +0100 Subject: [PATCH 22/33] fix prefetch (#21320) Signed-off-by: Kerry Archibald --- src/vector/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vector/index.html b/src/vector/index.html index 848241ef73a..57271b3f711 100644 --- a/src/vector/index.html +++ b/src/vector/index.html @@ -64,14 +64,14 @@ - - - - - - - - + + + + + + + +