Skip to content

Commit

Permalink
Merge tag 'v1.7.34-rc.1' into develop
Browse files Browse the repository at this point in the history
[Full Changelog](element-hq/element-web@v1.7.33...v1.7.34-rc.1)
* Translations update from Weblate
[\element-hq#18260](element-hq#18260)
* Update ESLint config
[\element-hq#18236](element-hq#18236)
* Update matrix-org-eslint-plugin and tighten max warning limit
[\element-hq#18207](element-hq#18207)
* Update webpack path for new voice message worker location
[\element-hq#18187](element-hq#18187)
* yarn upgrade
[\element-hq#18150](element-hq#18150)
* Conform to new typescript eslint rules
[\element-hq#18065](element-hq#18065)
* Add the Matrix Space to the translations guide
[\element-hq#18102](element-hq#18102)
* Update eslint-plugin-matrix-org
[\element-hq#18058](element-hq#18058)
* Fix browser history getting stuck looping back to the same room
[\element-hq#18053](element-hq#18053)
* Use URLSearchParams instead of transitive dependency `querystring`
[\element-hq#13138](element-hq#13138)
* Update PR template for new changelog generation
[\element-hq#18003](element-hq#18003)
* Fix space shortcuts on layouts with non-English keys in the places of
numbers
[\element-hq#17780](element-hq#17780)
* Add comment around feature_spaces flag usage
[\element-hq#18006](element-hq#18006)
* Standardise casing of identity server
[\element-hq#17980](element-hq#17980)
* Convert CONTRIBUTING to markdown
[\element-hq#18002](element-hq#18002)
* Ignore workers for jest tests because it disagrees with worker-loader
[\element-hq#17999](element-hq#17999)
* Use webpack worker-loader instead of homegrown hack
[\element-hq#17963](element-hq#17963)
* Fix types to match Typescripted IndexedDB store
[\element-hq#17962](element-hq#17962)
* Improve and consolidate typing
[\element-hq#17931](element-hq#17931)
  • Loading branch information
William Kray committed Jul 27, 2021
2 parents 1b69ff9 + 37faa1c commit b1ba2cb
Show file tree
Hide file tree
Showing 26 changed files with 2,170 additions and 1,927 deletions.
12 changes: 10 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<!-- Please read https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.rst before submitting your pull request -->
<!-- Please read https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md before submitting your pull request -->

<!-- Include a Sign-Off as described in https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.rst#sign-off -->
<!-- Include a Sign-Off as described in https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md#sign-off -->

<!-- To specify text for the changelog entry (otherwise the PR title will be used):
Notes:
Changelog entries will also appear in element-desktop. For PRs that *only* affect the desktop version:
Notes: none
element-desktop notes: <notes>
-->
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
Changes in [1.7.34-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.34-rc.1) (2021-07-27)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.33...v1.7.34-rc.1)

* Translations update from Weblate
[\#18260](https://github.com/vector-im/element-web/pull/18260)
* Update ESLint config
[\#18236](https://github.com/vector-im/element-web/pull/18236)
* Update matrix-org-eslint-plugin and tighten max warning limit
[\#18207](https://github.com/vector-im/element-web/pull/18207)
* Update webpack path for new voice message worker location
[\#18187](https://github.com/vector-im/element-web/pull/18187)
* yarn upgrade
[\#18150](https://github.com/vector-im/element-web/pull/18150)
* Conform to new typescript eslint rules
[\#18065](https://github.com/vector-im/element-web/pull/18065)
* Add the Matrix Space to the translations guide
[\#18102](https://github.com/vector-im/element-web/pull/18102)
* Update eslint-plugin-matrix-org
[\#18058](https://github.com/vector-im/element-web/pull/18058)
* Fix browser history getting stuck looping back to the same room
[\#18053](https://github.com/vector-im/element-web/pull/18053)
* Use URLSearchParams instead of transitive dependency `querystring`
[\#13138](https://github.com/vector-im/element-web/pull/13138)
* Update PR template for new changelog generation
[\#18003](https://github.com/vector-im/element-web/pull/18003)
* Fix space shortcuts on layouts with non-English keys in the places of
numbers
[\#17780](https://github.com/vector-im/element-web/pull/17780)
* Add comment around feature_spaces flag usage
[\#18006](https://github.com/vector-im/element-web/pull/18006)
* Standardise casing of identity server
[\#17980](https://github.com/vector-im/element-web/pull/17980)
* Convert CONTRIBUTING to markdown
[\#18002](https://github.com/vector-im/element-web/pull/18002)
* Ignore workers for jest tests because it disagrees with worker-loader
[\#17999](https://github.com/vector-im/element-web/pull/17999)
* Use webpack worker-loader instead of homegrown hack
[\#17963](https://github.com/vector-im/element-web/pull/17963)
* Fix types to match Typescripted IndexedDB store
[\#17962](https://github.com/vector-im/element-web/pull/17962)
* Improve and consolidate typing
[\#17931](https://github.com/vector-im/element-web/pull/17931)

Changes in [1.7.33](https://github.com/vector-im/element-web/releases/tag/v1.7.33) (2021-07-19)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.33-rc.1...v1.7.33)
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions docs/translating.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

## Step 0: Join #element-translations:matrix.org

1. Come and join https://matrix.to/#/#element-translations:matrix.org
2. Read scrollback and/or ask if anyone else is working on your language, and co-ordinate if needed. In general little-or-no coordination is needed though :)
1. Come and join https://matrix.to/#/#element-translations:matrix.org for general discussion
2. Join https://matrix.to/#/#element-translators:matrix.org for language-specific rooms
3. Read scrollback and/or ask if anyone else is working on your language, and co-ordinate if needed. In general little-or-no coordination is needed though :)

## Step 1: Preparing your Weblate Profile

Expand Down
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "element-web",
"version": "1.7.33",
"version": "1.7.34-rc.1",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
Expand Down Expand Up @@ -48,7 +48,8 @@
"start:res": "yarn build:jitsi && node scripts/copy-res.js -w",
"start:js": "webpack-dev-server --host=0.0.0.0 --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js -w --progress --mode development --disable-host-check",
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
"lint:js": "eslint src",
"lint:js": "eslint --max-warnings 0 src",
"lint:js-fix": "eslint --fix src",
"lint:types": "tsc --noEmit --jsx react",
"lint:style": "stylelint 'res/css/**/*.scss'",
"test": "jest"
Expand All @@ -60,8 +61,8 @@
"highlight.js": "^10.5.0",
"jsrsasign": "^10.2.0",
"katex": "^0.12.0",
"matrix-js-sdk": "12.1.0",
"matrix-react-sdk": "3.26.0",
"matrix-js-sdk": "12.2.0-rc.1",
"matrix-react-sdk": "3.27.0-rc.1",
"matrix-widget-api": "^0.1.0-beta.15",
"prop-types": "^15.7.2",
"react": "^17.0.2",
Expand Down Expand Up @@ -141,16 +142,19 @@
"shell-escape": "^0.2.0",
"simple-proxy-agent": "^1.1.0",
"stylelint": "^13.9.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-scss": "^3.18.0",
"terser-webpack-plugin": "^2.3.8",
"typescript": "^4.1.3",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2"
"webpack-dev-server": "^3.11.2",
"worker-loader": "^2.0.0"
},
"jest": {
"testEnvironment": "jest-environment-jsdom-sixteen",
"testMatch": [
"<rootDir>/test/**/*-test.js"
"<rootDir>/test/**/*-test.[tj]s"
],
"setupFilesAfterEnv": [
"<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js"
Expand All @@ -168,7 +172,8 @@
"decoderWorker\\.min\\.wasm": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
"waveWorker\\.min\\.js": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
"context-filter-polyfill": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
"FontManager.ts": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/FontManager.js"
"FontManager.ts": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/FontManager.js",
"workers/(.+)\\.worker\\.ts": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/workerMock.js"
},
"transformIgnorePatterns": [
"/node_modules/(?!matrix-js-sdk).+$",
Expand Down
16 changes: 8 additions & 8 deletions src/async-components/structures/CompatibilityView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
android = [];
}

let mobileHeader = <h2 id="step2_heading">{_t("Use %(brand)s on mobile", { brand })}</h2>;
let mobileHeader = <h2 id="step2_heading">{ _t("Use %(brand)s on mobile", { brand }) }</h2>;
if (!android.length && !ios) {
mobileHeader = null;
}
Expand Down Expand Up @@ -102,11 +102,11 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
'or <safariLink>Safari</safariLink> for the best experience.',
{},
{
'chromeLink': (sub) => <a href="https://www.google.com/chrome">{sub}</a>,
'firefoxLink': (sub) => <a href="https://firefox.com">{sub}</a>,
'safariLink': (sub) => <a href="https://apple.com/safari">{sub}</a>,
'chromeLink': (sub) => <a href="https://www.google.com/chrome">{ sub }</a>,
'firefoxLink': (sub) => <a href="https://firefox.com">{ sub }</a>,
'safariLink': (sub) => <a href="https://apple.com/safari">{ sub }</a>,
},
)}
) }
</p>
<p>
{ _t(
Expand All @@ -124,9 +124,9 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
<div className="mx_HomePage_col">
<div className="mx_HomePage_row">
<div>
{mobileHeader}
{ios}
{android}
{ mobileHeader }
{ ios }
{ android }
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/async-components/structures/ErrorView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const ErrorView: React.FC<IProps> = ({ title, messages }) => {
<div className="mx_HomePage_row">
<div>
<h2 id="step1_heading">{ title }</h2>
{messages && messages.map(msg => <p key={msg}>
{ messages && messages.map(msg => <p key={msg}>
{ msg }
</p>)}
</p>) }
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/auth/VectorAuthFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ const VectorAuthFooter = () => {
for (const linkEntry of links) {
authFooterLinks.push(
<a href={linkEntry.url} key={linkEntry.text} target="_blank" rel="noreferrer noopener">
{linkEntry.text}
{ linkEntry.text }
</a>,
);
}

return (
<div className="mx_AuthFooter">
{authFooterLinks}
{ authFooterLinks }
<a href="https://matrix.org" target="_blank" rel="noreferrer noopener">{ _t('Powered by Matrix') }</a>
</div>
);
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/strings/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@
"I understand the risks and wish to continue": "Entenc els riscos i vull continuar",
"Go to element.io": "Vés a element.io",
"Failed to start": "Ha fallat l'inici",
"Missing indexeddb worker script!": "Falta l'script del treballador indexeddb!"
"Missing indexeddb worker script!": "Falta l'script del treballador indexeddb!",
"Use %(brand)s on mobile": "Utilitza %(brand)s al mòbil",
"Switch to space by number": "Canvia d'espai per número"
}
1 change: 0 additions & 1 deletion src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"Missing indexeddb worker script!": "Missing indexeddb worker script!",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.",
"Invalid configuration: no default server specified.": "Invalid configuration: no default server specified.",
"Your Element is misconfigured": "Your Element is misconfigured",
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/strings/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
"Go to element.io": "برو به element.io",
"Failed to start": "مشکل در آغاز",
"Powered by Matrix": "قدرت‌گرفته از ماتریکس",
"Use %(brand)s on mobile": "استفاده از %(brand)s روی گوشی"
"Use %(brand)s on mobile": "استفاده از %(brand)s روی گوشی",
"Switch to space by number": "تغییر به فضا با شماره"
}
8 changes: 4 additions & 4 deletions src/i18n/strings/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"Unknown device": "מכשיר לא ידוע",
"You need to be using HTTPS to place a screen-sharing call.": "עליך להשתמש ב HTTPS בכדי לבצע שיחת ווידאו משותפת.",
"Welcome to Element": "ברוכים הבאים ל Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "צא'ט וכלי שיתוף פעולה מבוזר ומוצפן &amp; מופעל ע\"י [matrix]",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "צא'ט וכלי שיתוף פעולה מבוזר ומוצפן &amp; מופעל באמצעות [matrix]",
"Invalid JSON": "JSON לא חוקי",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "תצורה שגויה: ניתן לציין רק אחד מהערכים הבאים, default_server_config, default_server_name, או default_hs_url.",
"Invalid configuration: no default server specified.": "תצורה שגויה: לא צוין שרת ברירת מחדל.",
"Open user settings": "פתח הגדרות משתמש",
"Go to your browser to complete Sign In": "עבור לדפדפן להמשך ההתחברות",
"Explore rooms": "שיטוט בחדרים",
"Explore rooms": "גלה חדרים",
"Create Account": "יצירת חשבון",
"Sign In": "כניסה",
"Previous/next recently visited room or community": "הבא\\קודם חדרים וקהילות שביקרתם לאחרונה",
"Open": "פתח",
"Download Completed": "ההורדה הושלמה",
"Unexpected error preparing the app. See console for details.": "שגיאה לא צפויה במהלך הכנת האפליקציה. ראו קונסול לפרטים נוספים.",
"Unable to load config file: please refresh the page to try again.": "לא יכול לטעון את קובץ ההגדרות: יש לרענן את הדף כדי לנסות שנית.",
"Unexpected error preparing the app. See console for details.": "שגיאה לא צפויה במהלך טעינת האפליקציה. ראו קונסול לפרטים נוספים.",
"Unable to load config file: please refresh the page to try again.": "לא ניתן לטעון את קובץ ההגדרות: יש לרענן את הדף כדי לנסות שנית.",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "האלמנט מכיל הגדרת JSON שגויה, אנא תקנו את הבעיה ואתחלו את הדף.",
"Your Element is misconfigured": "האלמנט מוגדר באופן שגוי",
"Go to element.io": "חזור לאתר הראשי: element.io",
Expand Down
29 changes: 28 additions & 1 deletion src/i18n/strings/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,32 @@
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Obrolan terenkripsi, terdesentralisasi &amp; kolaborasi didukung oleh [matrix]",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Konfigurasi Element Anda mengandung JSON yang tidak valid. Mohon perbaiki masalahnya dan muat ulang halaman nya.",
"Invalid configuration: no default server specified.": "Konfigurasi tidak valid: server default belum ditentukan.",
"Missing indexeddb worker script!": "Tidak ada script worker indexeddb!"
"Missing indexeddb worker script!": "Tidak ada script worker indexeddb!",
"Explore rooms": "Jelajahi ruang",
"Create Account": "Buat Akun",
"Switch to space by number": "Beralih ke ruang dengan nomor",
"Go to your browser to complete Sign In": "Buka browser Anda untuk menyelesaikan Masuk",
"Sign In": "Masuk",
"Failed to start": "Gagal untuk memulai",
"Go to element.io": "Buka element.io",
"I understand the risks and wish to continue": "Saya memahami risikonya dan ingin melanjutkan",
"You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "Anda dapat lanjut menggunakan browser Anda saat ini, tetapi beberapa atau semua fitur mungkin tidak berfungsi dan tampilan serta nuansa aplikasi mungkin salah.",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Mohon instal <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, atau <safariLink>Safari</safariLink> untuk pengalaman terbaik.",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s menggunakan fitur browser lanjutan yang tidak didukung oleh browser Anda saat ini.",
"Your browser can't run %(brand)s": "Browser Anda tidak bisa menjalankan %(brand)s",
"Unsupported browser": "Browser tidak didukung",
"Use %(brand)s on mobile": "Gunakan %(brand)s di ponsel",
"Powered by Matrix": "Didukung oleh Matrix",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)",
"Previous/next recently visited room or community": "Ruangan atau komunitas yang baru saja dikunjungi sebelum/berikutnya",
"Open user settings": "Buka pengaturan pengguna",
"Open": "Buka",
"Download Completed": "Unduh Selesai",
"Unexpected error preparing the app. See console for details.": "Kesalahan tak terduga saat menyiapkan aplikasi. Lihat konsol untuk detail.",
"Unable to load config file: please refresh the page to try again.": "Tidak bisa muat file konfigurasi: mohon segarkan halaman untuk mencoba lagi.",
"Invalid JSON": "JSON tidak valid",
"The message from the parser is: %(message)s": "Pesan dari pengurai adalah: %(message)s",
"Your Element is misconfigured": "Element Anda salah dikonfigurasi",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Konfigurasi tidak valid: hanya bisa menentukan satu dari default_server_config, default_server_name, atau default_hs_url."
}
3 changes: 2 additions & 1 deletion src/i18n/strings/ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
"Unable to load config file: please refresh the page to try again.": "Nu se poate încărca fișierul de configurație: vă rugăm sa reîncărcați pagina și să încercați din nou.",
"The message from the parser is: %(message)s": "Mesajul de la parser este: %(message)s",
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Configurația ta Element conține JSON invalid. Vă rugăm sa corectați problema și să reîncărcați pagina.",
"Invalid configuration: no default server specified.": "Configurație invalidă: niciun server implicit specificat."
"Invalid configuration: no default server specified.": "Configurație invalidă: niciun server implicit specificat.",
"Switch to space by number": "Comută spațiul folosind un număr"
}
21 changes: 8 additions & 13 deletions src/vector/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import AutoDiscoveryUtils from 'matrix-react-sdk/src/utils/AutoDiscoveryUtils';
import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery";
import * as Lifecycle from "matrix-react-sdk/src/Lifecycle";
import type MatrixChatType from "matrix-react-sdk/src/components/structures/MatrixChat";
import { MatrixClientPeg } from 'matrix-react-sdk/src/MatrixClientPeg';
import SdkConfig from "matrix-react-sdk/src/SdkConfig";

import { parseQs, parseQsFromFragment } from './url_utils';
Expand Down Expand Up @@ -74,6 +73,14 @@ function onNewScreen(screen: string, replaceLast = false) {
const hash = '#/' + screen;
lastLocationHashSet = hash;

// if the new hash is a substring of the old one then we are stripping fields e.g `via` so replace history
if (screen.startsWith("room/") &&
window.location.hash.includes("/$") === hash.includes("/$") && // only if both did or didn't contain event link
window.location.hash.startsWith(hash)
) {
replaceLast = true;
}

if (replaceLast) {
window.location.replace(hash);
} else {
Expand Down Expand Up @@ -129,18 +136,6 @@ function onTokenLoginCompleted() {
}

export async function loadApp(fragParams: {}) {
// XXX: the way we pass the path to the worker script from webpack via html in body's dataset is a hack
// but alternatives seem to require changing the interface to passing Workers to js-sdk
const vectorIndexeddbWorkerScript = document.body.dataset.vectorIndexeddbWorkerScript;
if (!vectorIndexeddbWorkerScript) {
// If this is missing, something has probably gone wrong with
// the bundling. The js-sdk will just fall back to accessing
// indexeddb directly with no worker script, but we want to
// make sure the indexeddb script is present, so fail hard.
throw newTranslatableError(_td("Missing indexeddb worker script!"));
}
MatrixClientPeg.setIndexedDbWorkerScript(vectorIndexeddbWorkerScript);

window.addEventListener('hashchange', onHashChange);

const platform = PlatformPeg.get();
Expand Down
Loading

0 comments on commit b1ba2cb

Please sign in to comment.