From 2d487972940e7fba1b791ff5b83b0aefd13a3e24 Mon Sep 17 00:00:00 2001 From: James Salter Date: Fri, 10 Sep 2021 11:18:06 +0100 Subject: [PATCH 01/22] Suggest setting Cache-Control: no-cache on / for self-hosters --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4fd89c018a..1f1d31f7b9 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,10 @@ Element requires the following URLs not to be cached, when/if you are serving El /index.html ``` +We also recommend that you force browsers to re-validate any cached copy of Element on page load by configuring your +webserver to return `Cache-Control: no-cache` for `/`. This ensures the browser will fetch a new version of Element on +the next page load after it's been deployed. + Development =========== From 0a87baf99d2afd517f1a594d14372223d82459db Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Thu, 2 Sep 2021 20:30:12 +0200 Subject: [PATCH 02/22] Remove accidentally persisted log-level data This commit gets rid of log-level data in localStorage which in some extreme cases could fill up the entire localStorage making the app unusable Followup to https://github.com/matrix-org/matrix-js-sdk/pull/1880 --- src/vector/index.ts | 1 + src/vector/localstorage-fix.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/vector/localstorage-fix.ts diff --git a/src/vector/index.ts b/src/vector/index.ts index de68bf0a43..e23fc4b35a 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -33,6 +33,7 @@ require('katex/dist/katex.css'); * On production build it's going to be an empty module, so don't worry about that. */ require('./devcss'); +require('./localstorage-fix'); // These are things that can run before the skin loads - be careful not to reference the react-sdk though. import { parseQsFromFragment } from "./url_utils"; import './modernizr'; diff --git a/src/vector/localstorage-fix.ts b/src/vector/localstorage-fix.ts new file mode 100644 index 0000000000..d0ca05174f --- /dev/null +++ b/src/vector/localstorage-fix.ts @@ -0,0 +1,12 @@ +/** + * Because we've been saving a lot of additional logger data in the localStorage for no particular reason + * we need to, hopefully, unbrick user's devices by geting rid of unnecessary data. + * */ + +if (window.localStorage) { + Object.keys(window.localStorage).forEach(key => { + if (key.indexOf('loglevel:') === 0) { + window.localStorage.removeItem(key); + } + }); +} From 22f6ac1e3840fe28158373ce0508935467c94e5e Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 21 Sep 2021 09:51:46 +0100 Subject: [PATCH 03/22] Upgrade matrix-js-sdk to 13.0.0-rc.1 --- package.json | 2 +- yarn.lock | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5d8ff5008e..7ffbc0a15c 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "highlight.js": "^10.5.0", "jsrsasign": "^10.2.0", "katex": "^0.12.0", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", + "matrix-js-sdk": "13.0.0-rc.1", "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", diff --git a/yarn.lock b/yarn.lock index 05789cbfcf..04567c6d12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7687,6 +7687,22 @@ 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-js-sdk@13.0.0-rc.1: + version "13.0.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-13.0.0-rc.1.tgz#12deab353862852acae8342108d30ce080d364da" + integrity sha512-dfqJwXmG1+Ky2geaNADWYb7mwB2IfLFTE+T4q16gCoh2HM0W5yTMvi+kiJs0QspWFXICTps7eBSSq0827QNU8A== + 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" + 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 "12.5.0" resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/348ea72b70d9abd23f5e06a82d36f3b35d0635c8" From 1c393d0044e7c01ba5bdf94159ebd63f9abd8d4e Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 21 Sep 2021 09:53:59 +0100 Subject: [PATCH 04/22] Upgrade matrix-react-sdk to 3.31.0-rc.1 --- package.json | 2 +- yarn.lock | 24 +++++------------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 7ffbc0a15c..9f12b9afe7 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jsrsasign": "^10.2.0", "katex": "^0.12.0", "matrix-js-sdk": "13.0.0-rc.1", - "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", + "matrix-react-sdk": "3.31.0-rc.1", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 04567c6d12..b4940e4dec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7703,21 +7703,6 @@ matrix-js-sdk@13.0.0-rc.1: request "^2.88.2" unhomoglyph "^1.0.6" -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": - version "12.5.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/348ea72b70d9abd23f5e06a82d36f3b35d0635c8" - 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" - 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" @@ -7726,9 +7711,10 @@ matrix-mock-request@^1.2.3: bluebird "^3.5.0" expect "^1.20.2" -"matrix-react-sdk@github:matrix-org/matrix-react-sdk#develop": - version "3.30.0" - resolved "https://codeload.github.com/matrix-org/matrix-react-sdk/tar.gz/2ffbf3aa72a166135923fd7fbbaf0c423ff4a156" +matrix-react-sdk@3.31.0-rc.1: + version "3.31.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.31.0-rc.1.tgz#a6cfee70b09813c61352f4074737a37f7daa0d64" + integrity sha512-u8W49rKj0hEZh2TS0adpArIo4EGh5yftDvXZFKGdJcd93R76uUXj0l/H7BICb4S7rvrwV4NfQVEImTXDaLzSng== dependencies: "@babel/runtime" "^7.12.5" "@sentry/browser" "^6.11.0" @@ -7758,7 +7744,7 @@ matrix-mock-request@^1.2.3: katex "^0.12.0" linkifyjs "^2.1.9" lodash "^4.17.20" - matrix-js-sdk "github:matrix-org/matrix-js-sdk#develop" + matrix-js-sdk "13.0.0-rc.1" matrix-widget-api "^0.1.0-beta.16" minimist "^1.2.5" opus-recorder "^8.0.3" From 0b628cf1024426404c0e7c885021d38520a41cef Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 21 Sep 2021 09:57:09 +0100 Subject: [PATCH 05/22] Prepare changelog for v1.8.6-rc.1 --- CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca5339d6fe..a778e7400f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,53 @@ +Changes in [1.8.6-rc.1](https://github.com/vector-im/element-desktop/releases/tag/v1.8.6-rc.1) (2021-09-21) +=========================================================================================================== + +## ✨ Features + * Fix space keyboard shortcuts conflicting with native zoom shortcuts ([\#19037](https://github.com/vector-im/element-web/pull/19037)). Fixes #18481 and undefined/element-web#18481. + * Say Joining space instead of Joining room where we know its a space ([\#6818](https://github.com/matrix-org/matrix-react-sdk/pull/6818)). Fixes #19064 and #19064. + * Add warning that some spaces may not be relinked to the newly upgraded room ([\#6805](https://github.com/matrix-org/matrix-react-sdk/pull/6805)). Fixes #18858 and #18858. + * Delabs Spaces, iterate some copy and move communities/space toggle to preferences ([\#6594](https://github.com/matrix-org/matrix-react-sdk/pull/6594)). Fixes #18088, #18524 #18088 and #18088. + * Show "Message" in the user info panel instead of "Start chat" ([\#6319](https://github.com/matrix-org/matrix-react-sdk/pull/6319)). Fixes #17877 and #17877. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * Fix space keyboard shortcuts conflicting with native zoom shortcuts ([\#6804](https://github.com/matrix-org/matrix-react-sdk/pull/6804)). + * Replace plain text emoji at the end of a line ([\#6784](https://github.com/matrix-org/matrix-react-sdk/pull/6784)). Fixes #18833 and #18833. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * Simplify Space Panel layout and fix some edge cases ([\#6800](https://github.com/matrix-org/matrix-react-sdk/pull/6800)). Fixes #18694 and #18694. + * Show unsent message warning on Space Panel buttons ([\#6778](https://github.com/matrix-org/matrix-react-sdk/pull/6778)). Fixes #18891 and #18891. + * Hide mute/unmute button in UserInfo for Spaces as it makes no sense ([\#6790](https://github.com/matrix-org/matrix-react-sdk/pull/6790)). Fixes #19007 and #19007. + * Fix automatic field population in space create menu not validating ([\#6792](https://github.com/matrix-org/matrix-react-sdk/pull/6792)). Fixes #19005 and #19005. + * Optimize input label transition on focus ([\#6783](https://github.com/matrix-org/matrix-react-sdk/pull/6783)). Fixes #12876 and #12876. Contributed by [MadLittleMods](https://github.com/MadLittleMods). + * Adapt and re-use the RolesRoomSettingsTab for Spaces ([\#6779](https://github.com/matrix-org/matrix-react-sdk/pull/6779)). Fixes #18908 #18909 and #18908. + * Deduplicate join rule management between rooms and spaces ([\#6724](https://github.com/matrix-org/matrix-react-sdk/pull/6724)). Fixes #18798 and #18798. + * Add config option to turn on in-room event sending timing metrics ([\#6766](https://github.com/matrix-org/matrix-react-sdk/pull/6766)). + * Improve the upgrade for restricted user experience ([\#6764](https://github.com/matrix-org/matrix-react-sdk/pull/6764)). Fixes #18677 and #18677. + * Improve tooltips on space quick actions and explore button ([\#6760](https://github.com/matrix-org/matrix-react-sdk/pull/6760)). Fixes #18528 and #18528. + * Make space members and user info behave more expectedly ([\#6765](https://github.com/matrix-org/matrix-react-sdk/pull/6765)). Fixes #17018 and #17018. + * hide no-op m.room.encryption events and better word param changes ([\#6747](https://github.com/matrix-org/matrix-react-sdk/pull/6747)). Fixes #18597 and #18597. + * Respect m.space.parent relations if they hold valid permissions ([\#6746](https://github.com/matrix-org/matrix-react-sdk/pull/6746)). Fixes #10935 and #10935. + * Space panel accessibility improvements ([\#6744](https://github.com/matrix-org/matrix-react-sdk/pull/6744)). Fixes #18892 and #18892. + +## πŸ› Bug Fixes + * Revert Firefox composer deletion hacks ([\#6844](https://github.com/matrix-org/matrix-react-sdk/pull/6844)). Fixes #19103 and #19103. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * Fix accessing field on oobData which may be undefined ([\#6830](https://github.com/matrix-org/matrix-react-sdk/pull/6830)). Fixes #19085 and #19085. + * Fix pill deletion on Firefox 78 ([\#6832](https://github.com/matrix-org/matrix-react-sdk/pull/6832)). Fixes #19077 and #19077. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * Fix reactions aria-label not being a string and thus being read as [Object object] ([\#6828](https://github.com/matrix-org/matrix-react-sdk/pull/6828)). + * Fix missing null guard in space hierarchy pagination ([\#6821](https://github.com/matrix-org/matrix-react-sdk/pull/6821)). Fixes matrix-org/element-web-rageshakes#6299 and matrix-org/element-web-rageshakes#6299. + * Fix checks to show prompt to start new chats ([\#6812](https://github.com/matrix-org/matrix-react-sdk/pull/6812)). + * Fix room list scroll jumps ([\#6777](https://github.com/matrix-org/matrix-react-sdk/pull/6777)). Fixes #17460 #18440 and #17460. Contributed by [robintown](https://github.com/robintown). + * Fix various message bubble alignment issues ([\#6785](https://github.com/matrix-org/matrix-react-sdk/pull/6785)). Fixes #18293, #18294 #18305 and #18293. Contributed by [robintown](https://github.com/robintown). + * Make message bubble font size consistent ([\#6795](https://github.com/matrix-org/matrix-react-sdk/pull/6795)). Contributed by [robintown](https://github.com/robintown). + * Fix edge cases around joining new room which does not belong to active space ([\#6797](https://github.com/matrix-org/matrix-react-sdk/pull/6797)). Fixes #19025 and #19025. + * Fix edge case space issues around creation and initial view ([\#6798](https://github.com/matrix-org/matrix-react-sdk/pull/6798)). Fixes #19023 and #19023. + * Stop spinner on space preview if the join fails ([\#6803](https://github.com/matrix-org/matrix-react-sdk/pull/6803)). Fixes #19034 and #19034. + * Fix emoji picker and stickerpicker not appearing correctly when opened ([\#6793](https://github.com/matrix-org/matrix-react-sdk/pull/6793)). Fixes #19012 and #19012. Contributed by [Palid](https://github.com/Palid). + * Fix autocomplete not having y-scroll ([\#6794](https://github.com/matrix-org/matrix-react-sdk/pull/6794)). Fixes #18997 and #18997. Contributed by [Palid](https://github.com/Palid). + * Fix broken edge case with public space creation with no alias ([\#6791](https://github.com/matrix-org/matrix-react-sdk/pull/6791)). Fixes #19003 and #19003. + * Redirect from /#/welcome to /#/home if already logged in ([\#6786](https://github.com/matrix-org/matrix-react-sdk/pull/6786)). Fixes #18990 and #18990. Contributed by [aaronraimist](https://github.com/aaronraimist). + * Fix build issues from two conflicting PRs landing without merge conflict ([\#6780](https://github.com/matrix-org/matrix-react-sdk/pull/6780)). + * Render guest settings only in public rooms/spaces ([\#6693](https://github.com/matrix-org/matrix-react-sdk/pull/6693)). Fixes #18776 and #18776. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * Fix message bubble corners being wrong in the presence of hidden events ([\#6776](https://github.com/matrix-org/matrix-react-sdk/pull/6776)). Fixes #18124 and #18124. Contributed by [robintown](https://github.com/robintown). + * Debounce read marker update on scroll ([\#6771](https://github.com/matrix-org/matrix-react-sdk/pull/6771)). Fixes #18961 and #18961. + * Use cursor:pointer on space panel buttons ([\#6770](https://github.com/matrix-org/matrix-react-sdk/pull/6770)). Fixes #18951 and #18951. + * Fix regressed tab view buttons in space update toast ([\#6761](https://github.com/matrix-org/matrix-react-sdk/pull/6761)). Fixes #18781 and #18781. + Changes in [1.8.5](https://github.com/vector-im/element-desktop/releases/tag/v1.8.5) (2021-09-14) ================================================================================================= From 66277f7defa2ce57dc0618c8c6ceda2a0127f2ea Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 21 Sep 2021 09:57:10 +0100 Subject: [PATCH 06/22] v1.8.6-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9f12b9afe7..77070548e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.8.5", + "version": "1.8.6-rc.1", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": { From 3755aec974586a4680e736bc824d8b7f0c65d046 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 22 Sep 2021 14:39:39 +0100 Subject: [PATCH 07/22] Upgrade matrix-react-sdk to 3.31.0-rc.2 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 77070548e7..0871ac459b 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jsrsasign": "^10.2.0", "katex": "^0.12.0", "matrix-js-sdk": "13.0.0-rc.1", - "matrix-react-sdk": "3.31.0-rc.1", + "matrix-react-sdk": "3.31.0-rc.2", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index b4940e4dec..e37e098460 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7711,10 +7711,10 @@ matrix-mock-request@^1.2.3: bluebird "^3.5.0" expect "^1.20.2" -matrix-react-sdk@3.31.0-rc.1: - version "3.31.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.31.0-rc.1.tgz#a6cfee70b09813c61352f4074737a37f7daa0d64" - integrity sha512-u8W49rKj0hEZh2TS0adpArIo4EGh5yftDvXZFKGdJcd93R76uUXj0l/H7BICb4S7rvrwV4NfQVEImTXDaLzSng== +matrix-react-sdk@3.31.0-rc.2: + version "3.31.0-rc.2" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.31.0-rc.2.tgz#256d7b7954b124d0e91803a4208171a5716c5dd4" + integrity sha512-Vnn8KJu6k9UUvF9kmHKttJtk0X4N3hvC0ai+z8s1pgWdCwwEVROsbmGc21uk++Odheo5oyZAeDwhJAV5qA2WfQ== dependencies: "@babel/runtime" "^7.12.5" "@sentry/browser" "^6.11.0" From 730c4e8e3ab2181fda1f0725d30e3fd98047b3e4 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 22 Sep 2021 14:40:47 +0100 Subject: [PATCH 08/22] Prepare changelog for v1.8.6-rc.2 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a778e7400f..780955915f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Changes in [1.8.6-rc.2](https://github.com/vector-im/element-desktop/releases/tag/v1.8.6-rc.2) (2021-09-22) +=========================================================================================================== + +## πŸ› Bug Fixes + * Fix spacing for message composer buttons ([\#6854](https://github.com/matrix-org/matrix-react-sdk/pull/6854)). + Changes in [1.8.6-rc.1](https://github.com/vector-im/element-desktop/releases/tag/v1.8.6-rc.1) (2021-09-21) =========================================================================================================== From b4742373f35a9e921435da3aadebbb3f891acbc0 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 22 Sep 2021 14:40:47 +0100 Subject: [PATCH 09/22] v1.8.6-rc.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0871ac459b..c7c76d83df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.8.6-rc.1", + "version": "1.8.6-rc.2", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": { From 017e4bd84bd7d16b401ecd2cfd884aa0136aeb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 24 Sep 2021 20:51:02 +0200 Subject: [PATCH 10/22] Convert index to TS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ε imon Brandner --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 484fe70033..444dfcb2ee 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -90,7 +90,7 @@ module.exports = (env, argv) => { "bundle": "./src/vector/index.ts", "mobileguide": "./src/vector/mobile_guide/index.ts", "jitsi": "./src/vector/jitsi/index.ts", - "usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.js", + "usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.ts", ...(useHMR ? {} : cssThemes), }, From 539f892c671b98f7595b5246b54ed6027a79f424 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 27 Sep 2021 14:55:24 +0100 Subject: [PATCH 11/22] Upgrade matrix-js-sdk to 13.0.0 --- package.json | 2 +- yarn.lock | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c7c76d83df..e034f60333 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "highlight.js": "^10.5.0", "jsrsasign": "^10.2.0", "katex": "^0.12.0", - "matrix-js-sdk": "13.0.0-rc.1", + "matrix-js-sdk": "13.0.0", "matrix-react-sdk": "3.31.0-rc.2", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", diff --git a/yarn.lock b/yarn.lock index e37e098460..9c8b33332b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7687,6 +7687,22 @@ 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-js-sdk@13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-13.0.0.tgz#a57a4b73892e98fcd5eb0081e4745fac567211dd" + integrity sha512-VkZhQBd6jlRNjsqjLIoHV3fnjOSljPDuJklKsF4l6yffkra7llxQctyMsrCnoiosdAQWigbLZsKSb+HbSFmcnw== + 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" + p-retry "^4.5.0" + qs "^6.9.6" + request "^2.88.2" + unhomoglyph "^1.0.6" + matrix-js-sdk@13.0.0-rc.1: version "13.0.0-rc.1" resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-13.0.0-rc.1.tgz#12deab353862852acae8342108d30ce080d364da" From 46769046da3b68ef979f0d8d4f2e3c56062b57e4 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 27 Sep 2021 14:55:53 +0100 Subject: [PATCH 12/22] Upgrade matrix-react-sdk to 3.31.0 --- package.json | 2 +- yarn.lock | 26 +++++--------------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index e034f60333..48bd7983ea 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jsrsasign": "^10.2.0", "katex": "^0.12.0", "matrix-js-sdk": "13.0.0", - "matrix-react-sdk": "3.31.0-rc.2", + "matrix-react-sdk": "3.31.0", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 9c8b33332b..d837ad4890 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7703,22 +7703,6 @@ matrix-js-sdk@13.0.0: request "^2.88.2" unhomoglyph "^1.0.6" -matrix-js-sdk@13.0.0-rc.1: - version "13.0.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-13.0.0-rc.1.tgz#12deab353862852acae8342108d30ce080d364da" - integrity sha512-dfqJwXmG1+Ky2geaNADWYb7mwB2IfLFTE+T4q16gCoh2HM0W5yTMvi+kiJs0QspWFXICTps7eBSSq0827QNU8A== - 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" - 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" @@ -7727,10 +7711,10 @@ matrix-mock-request@^1.2.3: bluebird "^3.5.0" expect "^1.20.2" -matrix-react-sdk@3.31.0-rc.2: - version "3.31.0-rc.2" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.31.0-rc.2.tgz#256d7b7954b124d0e91803a4208171a5716c5dd4" - integrity sha512-Vnn8KJu6k9UUvF9kmHKttJtk0X4N3hvC0ai+z8s1pgWdCwwEVROsbmGc21uk++Odheo5oyZAeDwhJAV5qA2WfQ== +matrix-react-sdk@3.31.0: + version "3.31.0" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.31.0.tgz#5b7bc5705919524aee5224a9f6757777c9eced32" + integrity sha512-Uf9RZQbpVWA+l8WU9TjuqqqLg0JHJmRP9zjxInwApsajLyjCELz7HobLzNn4Ti39yVdsSfgRXoPUY8aDH9WUIg== dependencies: "@babel/runtime" "^7.12.5" "@sentry/browser" "^6.11.0" @@ -7760,7 +7744,7 @@ matrix-react-sdk@3.31.0-rc.2: katex "^0.12.0" linkifyjs "^2.1.9" lodash "^4.17.20" - matrix-js-sdk "13.0.0-rc.1" + matrix-js-sdk "13.0.0" matrix-widget-api "^0.1.0-beta.16" minimist "^1.2.5" opus-recorder "^8.0.3" From c3cc9f20f5f3d7f94c7f9a428ea66c2c8b83bf06 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 27 Sep 2021 14:58:14 +0100 Subject: [PATCH 13/22] Prepare changelog for v1.9.0 --- CHANGELOG.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 780955915f..2d492d0305 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,52 @@ +Changes in [1.9.0](https://github.com/vector-im/element-desktop/releases/tag/v1.9.0) (2021-09-27) +================================================================================================= + +## ✨ Features + * Fix space keyboard shortcuts conflicting with native zoom shortcuts ([\#19037](https://github.com/vector-im/element-web/pull/19037)). Fixes #18481 and undefined/element-web#18481. + * Say Joining space instead of Joining room where we know its a space ([\#6818](https://github.com/matrix-org/matrix-react-sdk/pull/6818)). Fixes #19064 and #19064. + * Add warning that some spaces may not be relinked to the newly upgraded room ([\#6805](https://github.com/matrix-org/matrix-react-sdk/pull/6805)). Fixes #18858 and #18858. + * Delabs Spaces, iterate some copy and move communities/space toggle to preferences ([\#6594](https://github.com/matrix-org/matrix-react-sdk/pull/6594)). Fixes #18088, #18524 #18088 and #18088. + * Show "Message" in the user info panel instead of "Start chat" ([\#6319](https://github.com/matrix-org/matrix-react-sdk/pull/6319)). Fixes #17877 and #17877. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * Fix space keyboard shortcuts conflicting with native zoom shortcuts ([\#6804](https://github.com/matrix-org/matrix-react-sdk/pull/6804)). + * Replace plain text emoji at the end of a line ([\#6784](https://github.com/matrix-org/matrix-react-sdk/pull/6784)). Fixes #18833 and #18833. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * Simplify Space Panel layout and fix some edge cases ([\#6800](https://github.com/matrix-org/matrix-react-sdk/pull/6800)). Fixes #18694 and #18694. + * Show unsent message warning on Space Panel buttons ([\#6778](https://github.com/matrix-org/matrix-react-sdk/pull/6778)). Fixes #18891 and #18891. + * Hide mute/unmute button in UserInfo for Spaces as it makes no sense ([\#6790](https://github.com/matrix-org/matrix-react-sdk/pull/6790)). Fixes #19007 and #19007. + * Fix automatic field population in space create menu not validating ([\#6792](https://github.com/matrix-org/matrix-react-sdk/pull/6792)). Fixes #19005 and #19005. + * Optimize input label transition on focus ([\#6783](https://github.com/matrix-org/matrix-react-sdk/pull/6783)). Fixes #12876 and #12876. Contributed by [MadLittleMods](https://github.com/MadLittleMods). + * Adapt and re-use the RolesRoomSettingsTab for Spaces ([\#6779](https://github.com/matrix-org/matrix-react-sdk/pull/6779)). Fixes #18908 #18909 and #18908. + * Deduplicate join rule management between rooms and spaces ([\#6724](https://github.com/matrix-org/matrix-react-sdk/pull/6724)). Fixes #18798 and #18798. + * Add config option to turn on in-room event sending timing metrics ([\#6766](https://github.com/matrix-org/matrix-react-sdk/pull/6766)). + * Improve the upgrade for restricted user experience ([\#6764](https://github.com/matrix-org/matrix-react-sdk/pull/6764)). Fixes #18677 and #18677. + * Improve tooltips on space quick actions and explore button ([\#6760](https://github.com/matrix-org/matrix-react-sdk/pull/6760)). Fixes #18528 and #18528. + * Make space members and user info behave more expectedly ([\#6765](https://github.com/matrix-org/matrix-react-sdk/pull/6765)). Fixes #17018 and #17018. + * hide no-op m.room.encryption events and better word param changes ([\#6747](https://github.com/matrix-org/matrix-react-sdk/pull/6747)). Fixes #18597 and #18597. + * Respect m.space.parent relations if they hold valid permissions ([\#6746](https://github.com/matrix-org/matrix-react-sdk/pull/6746)). Fixes #10935 and #10935. + * Space panel accessibility improvements ([\#6744](https://github.com/matrix-org/matrix-react-sdk/pull/6744)). Fixes #18892 and #18892. + +## πŸ› Bug Fixes + * Fix spacing for message composer buttons ([\#6854](https://github.com/matrix-org/matrix-react-sdk/pull/6854)). + * Fix accessing field on oobData which may be undefined ([\#6830](https://github.com/matrix-org/matrix-react-sdk/pull/6830)). Fixes #19085 and #19085. + * Fix reactions aria-label not being a string and thus being read as [Object object] ([\#6828](https://github.com/matrix-org/matrix-react-sdk/pull/6828)). + * Fix missing null guard in space hierarchy pagination ([\#6821](https://github.com/matrix-org/matrix-react-sdk/pull/6821)). Fixes matrix-org/element-web-rageshakes#6299 and matrix-org/element-web-rageshakes#6299. + * Fix checks to show prompt to start new chats ([\#6812](https://github.com/matrix-org/matrix-react-sdk/pull/6812)). + * Fix room list scroll jumps ([\#6777](https://github.com/matrix-org/matrix-react-sdk/pull/6777)). Fixes #17460 #18440 and #17460. Contributed by [robintown](https://github.com/robintown). + * Fix various message bubble alignment issues ([\#6785](https://github.com/matrix-org/matrix-react-sdk/pull/6785)). Fixes #18293, #18294 #18305 and #18293. Contributed by [robintown](https://github.com/robintown). + * Make message bubble font size consistent ([\#6795](https://github.com/matrix-org/matrix-react-sdk/pull/6795)). Contributed by [robintown](https://github.com/robintown). + * Fix edge cases around joining new room which does not belong to active space ([\#6797](https://github.com/matrix-org/matrix-react-sdk/pull/6797)). Fixes #19025 and #19025. + * Fix edge case space issues around creation and initial view ([\#6798](https://github.com/matrix-org/matrix-react-sdk/pull/6798)). Fixes #19023 and #19023. + * Stop spinner on space preview if the join fails ([\#6803](https://github.com/matrix-org/matrix-react-sdk/pull/6803)). Fixes #19034 and #19034. + * Fix emoji picker and stickerpicker not appearing correctly when opened ([\#6793](https://github.com/matrix-org/matrix-react-sdk/pull/6793)). Fixes #19012 and #19012. Contributed by [Palid](https://github.com/Palid). + * Fix autocomplete not having y-scroll ([\#6794](https://github.com/matrix-org/matrix-react-sdk/pull/6794)). Fixes #18997 and #18997. Contributed by [Palid](https://github.com/Palid). + * Fix broken edge case with public space creation with no alias ([\#6791](https://github.com/matrix-org/matrix-react-sdk/pull/6791)). Fixes #19003 and #19003. + * Redirect from /#/welcome to /#/home if already logged in ([\#6786](https://github.com/matrix-org/matrix-react-sdk/pull/6786)). Fixes #18990 and #18990. Contributed by [aaronraimist](https://github.com/aaronraimist). + * Fix build issues from two conflicting PRs landing without merge conflict ([\#6780](https://github.com/matrix-org/matrix-react-sdk/pull/6780)). + * Render guest settings only in public rooms/spaces ([\#6693](https://github.com/matrix-org/matrix-react-sdk/pull/6693)). Fixes #18776 and #18776. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * Fix message bubble corners being wrong in the presence of hidden events ([\#6776](https://github.com/matrix-org/matrix-react-sdk/pull/6776)). Fixes #18124 and #18124. Contributed by [robintown](https://github.com/robintown). + * Debounce read marker update on scroll ([\#6771](https://github.com/matrix-org/matrix-react-sdk/pull/6771)). Fixes #18961 and #18961. + * Use cursor:pointer on space panel buttons ([\#6770](https://github.com/matrix-org/matrix-react-sdk/pull/6770)). Fixes #18951 and #18951. + * Fix regressed tab view buttons in space update toast ([\#6761](https://github.com/matrix-org/matrix-react-sdk/pull/6761)). Fixes #18781 and #18781. + Changes in [1.8.6-rc.2](https://github.com/vector-im/element-desktop/releases/tag/v1.8.6-rc.2) (2021-09-22) =========================================================================================================== From bd96d299667d0013f1525819140860823ba5596e Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 27 Sep 2021 14:58:14 +0100 Subject: [PATCH 14/22] v1.9.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 48bd7983ea..35ef5399d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.8.6-rc.2", + "version": "1.9.0", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": { From 6590debbc6b0ec4b5b8aa9cfa24fc28758623a6b Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 27 Sep 2021 15:16:18 +0100 Subject: [PATCH 15/22] Reset matrix-js-sdk back to develop branch --- package.json | 2 +- yarn.lock | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 35ef5399d8..cf9bafd7e9 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "highlight.js": "^10.5.0", "jsrsasign": "^10.2.0", "katex": "^0.12.0", - "matrix-js-sdk": "13.0.0", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", "matrix-react-sdk": "3.31.0", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", diff --git a/yarn.lock b/yarn.lock index d837ad4890..54434975a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7703,6 +7703,21 @@ matrix-js-sdk@13.0.0: request "^2.88.2" unhomoglyph "^1.0.6" +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": + version "13.0.0" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/2515d07c8fc3bf5e1afc8352e3e330cca30dde85" + 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" + 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 cf5cbb1ff97623be1d60539aad372f4b38e68f09 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 27 Sep 2021 15:16:28 +0100 Subject: [PATCH 16/22] Reset matrix-react-sdk back to develop branch --- package.json | 2 +- yarn.lock | 23 +++-------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index cf9bafd7e9..767bd9fc25 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jsrsasign": "^10.2.0", "katex": "^0.12.0", "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", - "matrix-react-sdk": "3.31.0", + "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 54434975a6..495e84140e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7687,22 +7687,6 @@ 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-js-sdk@13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-13.0.0.tgz#a57a4b73892e98fcd5eb0081e4745fac567211dd" - integrity sha512-VkZhQBd6jlRNjsqjLIoHV3fnjOSljPDuJklKsF4l6yffkra7llxQctyMsrCnoiosdAQWigbLZsKSb+HbSFmcnw== - 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" - 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 "13.0.0" resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/2515d07c8fc3bf5e1afc8352e3e330cca30dde85" @@ -7726,10 +7710,9 @@ matrix-mock-request@^1.2.3: bluebird "^3.5.0" expect "^1.20.2" -matrix-react-sdk@3.31.0: +"matrix-react-sdk@github:matrix-org/matrix-react-sdk#develop": version "3.31.0" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.31.0.tgz#5b7bc5705919524aee5224a9f6757777c9eced32" - integrity sha512-Uf9RZQbpVWA+l8WU9TjuqqqLg0JHJmRP9zjxInwApsajLyjCELz7HobLzNn4Ti39yVdsSfgRXoPUY8aDH9WUIg== + resolved "https://codeload.github.com/matrix-org/matrix-react-sdk/tar.gz/b635d017799e198fa0391e51af0b12e9d5843992" dependencies: "@babel/runtime" "^7.12.5" "@sentry/browser" "^6.11.0" @@ -7759,7 +7742,7 @@ matrix-react-sdk@3.31.0: katex "^0.12.0" linkifyjs "^2.1.9" lodash "^4.17.20" - matrix-js-sdk "13.0.0" + matrix-js-sdk "github:matrix-org/matrix-js-sdk#develop" matrix-widget-api "^0.1.0-beta.16" minimist "^1.2.5" opus-recorder "^8.0.3" From a3c4fac375774cf9836a950886d8d4ff4f350336 Mon Sep 17 00:00:00 2001 From: James Salter Date: Tue, 28 Sep 2021 12:15:34 +0100 Subject: [PATCH 17/22] Use custom nginx conf --- Dockerfile | 3 +++ nginx/config.d/default.conf | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 nginx/config.d/default.conf diff --git a/Dockerfile b/Dockerfile index e62b867d38..6032156d6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,5 +33,8 @@ COPY --from=builder /src/webapp /app # Insert wasm type into Nginx mime.types file so they load correctly. RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types +# Override default nginx config +COPY /nginx/config.d/default.conf /etc/nginx/config.d/default.conf + RUN rm -rf /usr/share/nginx/html \ && ln -s /app /usr/share/nginx/html diff --git a/nginx/config.d/default.conf b/nginx/config.d/default.conf new file mode 100644 index 0000000000..638f80d124 --- /dev/null +++ b/nginx/config.d/default.conf @@ -0,0 +1,46 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + add_header Cache-Control "no-cache"; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} + From 212138b0176f0aa9d2cd5be054d587245049a1aa Mon Sep 17 00:00:00 2001 From: James Salter Date: Tue, 28 Sep 2021 13:24:44 +0100 Subject: [PATCH 18/22] Fix path --- Dockerfile | 2 +- nginx/{config.d => conf.d}/default.conf | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename nginx/{config.d => conf.d}/default.conf (100%) diff --git a/Dockerfile b/Dockerfile index 6032156d6c..601f2cdbbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ COPY --from=builder /src/webapp /app RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types # Override default nginx config -COPY /nginx/config.d/default.conf /etc/nginx/config.d/default.conf +COPY /nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf RUN rm -rf /usr/share/nginx/html \ && ln -s /app /usr/share/nginx/html diff --git a/nginx/config.d/default.conf b/nginx/conf.d/default.conf similarity index 100% rename from nginx/config.d/default.conf rename to nginx/conf.d/default.conf From b4187c61509c48418105d03de50183e5f5f9bf0d Mon Sep 17 00:00:00 2001 From: James Salter Date: Tue, 28 Sep 2021 13:24:54 +0100 Subject: [PATCH 19/22] Fix rule --- nginx/conf.d/default.conf | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index 638f80d124..b2b539bfe4 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -5,9 +5,11 @@ server { #access_log /var/log/nginx/host.access.log main; - location / { - root /usr/share/nginx/html; - index index.html index.htm; + root /usr/share/nginx/html; + index index.html index.htm; + + # Set no-cache for the index.html only so that browsers always check for a new copy of Element Web. + location = /index.html { add_header Cache-Control "no-cache"; } @@ -16,9 +18,6 @@ server { # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # From 237bc51cd16aa4e0423d6b5e57833531d7389eab Mon Sep 17 00:00:00 2001 From: James Salter Date: Tue, 28 Sep 2021 13:25:43 +0100 Subject: [PATCH 20/22] Remove commented out cruft --- nginx/conf.d/default.conf | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index b2b539bfe4..bd2225ba4b 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -3,8 +3,6 @@ server { listen [::]:80; server_name localhost; - #access_log /var/log/nginx/host.access.log main; - root /usr/share/nginx/html; index index.html index.htm; @@ -13,33 +11,8 @@ server { add_header Cache-Control "no-cache"; } - #error_page 404 /404.html; - # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - #location ~ \.php$ { - # root html; - # fastcgi_pass 127.0.0.1:9000; - # fastcgi_index index.php; - # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - # include fastcgi_params; - #} - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } From e7caa54e59c7418ee15720c1acaf8a84b94512f8 Mon Sep 17 00:00:00 2001 From: James Salter Date: Wed, 29 Sep 2021 10:32:12 +0100 Subject: [PATCH 21/22] Remove superfluous index.htm --- nginx/conf.d/default.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index bd2225ba4b..04b1e8ac6a 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -4,7 +4,7 @@ server { server_name localhost; root /usr/share/nginx/html; - index index.html index.htm; + index index.html; # Set no-cache for the index.html only so that browsers always check for a new copy of Element Web. location = /index.html { From 5741baed2547038e3b66eb13023e27ce811462f5 Mon Sep 17 00:00:00 2001 From: James Salter Date: Wed, 29 Sep 2021 13:14:03 +0100 Subject: [PATCH 22/22] Note that caching is configured in he Dockerfile --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f1d31f7b9..441ce5109b 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,8 @@ Element requires the following URLs not to be cached, when/if you are serving El We also recommend that you force browsers to re-validate any cached copy of Element on page load by configuring your webserver to return `Cache-Control: no-cache` for `/`. This ensures the browser will fetch a new version of Element on -the next page load after it's been deployed. +the next page load after it's been deployed. Note that this is already configured for you in the nginx config of our +Dockerfile. Development ===========