Skip to content

Commit

Permalink
Merge tag 'v1.11.2' into sc
Browse files Browse the repository at this point in the history
  • Loading branch information
su-ex committed Aug 4, 2022
2 parents 88a54fd + 1af4f75 commit 5f387fe
Show file tree
Hide file tree
Showing 21 changed files with 1,835 additions and 2,259 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/dockerhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Dockerhub
on:
workflow_dispatch: { }
push:
tags: [ v* ]
schedule:
# This job can take a while, and we have usage limits, so just publish develop only twice a day
- cron: '0 7/12 * * *'
concurrency: ${{ github.ref_name }}
jobs:
buildx:
name: Docker Buildx
runs-on: ubuntu-latest
environment: dockerhub
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # needed for docker-package to be able to calculate the version

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
vectorim/element-web
tags: |
type=ref,event=branch
type=ref,event=tag
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Update repo description
uses: peter-evans/dockerhub-description@v2
continue-on-error: true
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: vectorim/element-web
6 changes: 3 additions & 3 deletions .github/workflows/static_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ jobs:
with:
cache: 'yarn'

# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
# Needs branch matching as it inherits .stylelintrc.js from matrix-react-sdk
- name: Install Dependencies
run: "./scripts/layered.sh"

- name: Run Linter
run: "yarn run lint:style"
9 changes: 1 addition & 8 deletions .github/workflows/triage-labelled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,7 @@ jobs:
name: P1 X-Needs-Design to Design project board
runs-on: ubuntu-latest
if: >
contains(github.event.issue.labels.*.name, 'X-Needs-Design') &&
(contains(github.event.issue.labels.*.name, 'S-Critical') &&
(contains(github.event.issue.labels.*.name, 'O-Frequent') ||
contains(github.event.issue.labels.*.name, 'O-Occasional')) ||
contains(github.event.issue.labels.*.name, 'S-Major') &&
contains(github.event.issue.labels.*.name, 'O-Frequent') ||
contains(github.event.issue.labels.*.name, 'A11y') &&
contains(github.event.issue.labels.*.name, 'O-Frequent'))
contains(github.event.issue.labels.*.name, 'X-Needs-Design')
steps:
- uses: octokit/[email protected]
id: add_to_project
Expand Down
25 changes: 1 addition & 24 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
// Copied from react-sdk
// TODO: Only keep one copy of this for synchronization purposes
module.exports = {
"extends": "stylelint-config-standard",
"plugins": [
"stylelint-scss",
],
"rules": {
"indentation": 4,
"comment-empty-line-before": null,
"declaration-empty-line-before": null,
"length-zero-no-unit": null,
"rule-empty-line-before": null,
"color-hex-length": null,
"max-empty-lines": null,
"number-no-trailing-zeros": null,
"number-leading-zero": null,
"selector-list-comma-newline-after": null,
"at-rule-no-unknown": null,
"no-descending-specificity": null,
"scss/at-rule-no-unknown": [true, {
// https://github.com/vector-im/element-web/issues/10544
"ignoreAtRules": ["define-mixin"],
}],
}
...require("matrix-react-sdk/.stylelintrc.js"),
};
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
Changes in [1.11.2](https://github.com/vector-im/element-web/releases/tag/v1.11.2) (2022-08-03)
===============================================================================================

## ✨ Features
* Live location share - focus on user location on list item click ([\#9051](https://github.com/matrix-org/matrix-react-sdk/pull/9051)). Contributed by @kerryarchibald.
* Live location sharing - don't trigger unread counts for beacon location events ([\#9071](https://github.com/matrix-org/matrix-react-sdk/pull/9071)). Contributed by @kerryarchibald.
* Support for sending voice messages as replies and in threads ([\#9097](https://github.com/matrix-org/matrix-react-sdk/pull/9097)). Fixes #22031.
* Add `Reply in thread` button to the right-click message context-menu ([\#9004](https://github.com/matrix-org/matrix-react-sdk/pull/9004)). Fixes #22745.
* Starred_Messages_Feature_Contd_II/Outreachy ([\#9086](https://github.com/matrix-org/matrix-react-sdk/pull/9086)).
* Use "frequently used emojis" for autocompletion in composer ([\#8998](https://github.com/matrix-org/matrix-react-sdk/pull/8998)). Fixes #18978. Contributed by @grimhilt.
* Improve clickability of view source event toggle button ([\#9068](https://github.com/matrix-org/matrix-react-sdk/pull/9068)). Fixes #21856. Contributed by @luixxiul.
* Improve clickability of "collapse" link button on bubble layout ([\#9037](https://github.com/matrix-org/matrix-react-sdk/pull/9037)). Fixes #22864. Contributed by @luixxiul.
* Starred_Messages_Feature/Outreachy ([\#8842](https://github.com/matrix-org/matrix-react-sdk/pull/8842)).
* Implement Use Case Selection screen ([\#8984](https://github.com/matrix-org/matrix-react-sdk/pull/8984)). Contributed by @justjanne.
* Live location share - handle insufficient permissions in location sharing ([\#9047](https://github.com/matrix-org/matrix-react-sdk/pull/9047)). Contributed by @kerryarchibald.
* Improve _FilePanel.scss ([\#9031](https://github.com/matrix-org/matrix-react-sdk/pull/9031)). Contributed by @luixxiul.
* Improve spotlight accessibility by adding context menus ([\#8907](https://github.com/matrix-org/matrix-react-sdk/pull/8907)). Fixes #20875 and #22675. Contributed by @justjanne.

## 🐛 Bug Fixes
* Replace mask-images with svg components in MessageActionBar ([\#9088](https://github.com/matrix-org/matrix-react-sdk/pull/9088)). Fixes #22912. Contributed by @kerryarchibald.
* Unbreak in-app permalink tooltips ([\#9087](https://github.com/matrix-org/matrix-react-sdk/pull/9087)). Fixes #22874.
* Show a back button when viewing a space member ([\#9095](https://github.com/matrix-org/matrix-react-sdk/pull/9095)). Fixes #22898.
* Align the right edge of info tile lines with normal ones on IRC layout ([\#9058](https://github.com/matrix-org/matrix-react-sdk/pull/9058)). Fixes #22871. Contributed by @luixxiul.
* Prevent email verification from overriding existing sessions ([\#9075](https://github.com/matrix-org/matrix-react-sdk/pull/9075)). Fixes #22881. Contributed by @justjanne.
* Fix wrong buttons being used when exploring public rooms ([\#9062](https://github.com/matrix-org/matrix-react-sdk/pull/9062)). Fixes #22862.
* Re-add padding to generic event list summary on IRC layout ([\#9063](https://github.com/matrix-org/matrix-react-sdk/pull/9063)). Fixes #22869. Contributed by @luixxiul.
* Joining federated rooms via the spotlight search should no longer cause a "No known servers" error. ([\#9055](https://github.com/matrix-org/matrix-react-sdk/pull/9055)). Fixes #22845. Contributed by @Half-Shot.

Changes in [1.11.1](https://github.com/vector-im/element-web/releases/tag/v1.11.1) (2022-07-26)
===============================================================================================

Expand Down
4 changes: 4 additions & 0 deletions docs/labs.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,7 @@ Enables rendering of MD / HTML in room topics.

Enables exploring public spaces in the new search dialog. Requires the server to
have [MSC3827](https://github.com/matrix-org/matrix-spec-proposals/pull/3827) enabled.

## Favourite Messages (`feature_favourite_messages`) [In Development]

Enables users to bookmark a message or content for a later reference.
10 changes: 5 additions & 5 deletions docs/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ As of March 2022, skins are not fully supported; Element is the only available s
To define a theme for Element:

1. Pick a name, e.g. `teal`. at time of writing we have `light` and `dark`.
2. Fork `src/skins/vector/css/themes/dark.scss` to be `teal.scss`
3. Fork `src/skins/vector/css/themes/_base.scss` to be `_teal.scss`
4. Override variables in `_teal.scss` as desired. You may wish to delete ones
which don't differ from `_base.scss`, to make it clear which are being
overridden. If every single colour is being changed (as per `_dark.scss`)
2. Fork `src/skins/vector/css/themes/dark.pcss` to be `teal.pcss`
3. Fork `src/skins/vector/css/themes/_base.pcss` to be `_teal.pcss`
4. Override variables in `_teal.pcss` as desired. You may wish to delete ones
which don't differ from `_base.pcss`, to make it clear which are being
overridden. If every single colour is being changed (as per `_dark.pcss`)
then you might as well keep them all.
5. Add the theme to the list of entrypoints in webpack.config.js
6. Add the theme to the list of themes in matrix-react-sdk's UserSettings.js
Expand Down
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "element-web",
"version": "1.11.1",
"version": "1.11.2",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
Expand Down Expand Up @@ -49,19 +49,20 @@
"lint:js": "eslint --max-warnings 0 src module_system",
"lint:js-fix": "eslint --fix src module_system",
"lint:types": "tsc --noEmit --jsx react && tsc --noEmit --project ./tsconfig.module_system.json",
"lint:style": "stylelint \"res/css/**/*.scss\"",
"lint:style": "stylelint \"res/css/**/*.pcss\"",
"test": "jest",
"coverage": "yarn test --coverage"
"coverage": "yarn test --coverage",
"analyse:unused-exports": "node ./scripts/analyse_unused_exports.js"
},
"dependencies": {
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.8.tgz",
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz",
"@matrix-org/react-sdk-module-api": "^0.0.3",
"browser-request": "^0.3.3",
"gfm.css": "^1.1.2",
"jsrsasign": "^10.5.25",
"katex": "^0.12.0",
"matrix-js-sdk": "19.1.0",
"matrix-react-sdk": "3.49.0",
"matrix-js-sdk": "19.2.0",
"matrix-react-sdk": "3.51.0",
"matrix-widget-api": "^0.1.0-beta.18",
"prop-types": "^15.7.2",
"react": "17.0.2",
Expand Down Expand Up @@ -135,7 +136,7 @@
"node-fetch": "^2.6.7",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"postcss-easings": "^2.0.0",
"postcss-hexrgba": "^2.0.1",
"postcss-hexrgba": "2.0.1",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"postcss-mixins": "^6.2.3",
Expand All @@ -151,11 +152,12 @@
"simple-proxy-agent": "^1.1.0",
"string-replace-loader": "2",
"style-loader": "2",
"stylelint": "^13.9.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-scss": "^3.18.0",
"stylelint": "^14.9.1",
"stylelint-config-standard": "^26.0.0",
"stylelint-scss": "^4.2.0",
"terser-webpack-plugin": "^2.3.8",
"typescript": "^4.5.3",
"ts-prune": "^0.10.3",
"typescript": "^4.7.4",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2",
Expand All @@ -175,7 +177,7 @@
"<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js"
],
"moduleNameMapper": {
"\\.(css|scss)$": "<rootDir>/__mocks__/cssMock.js",
"\\.(css|scss|pcss)$": "<rootDir>/__mocks__/cssMock.js",
"\\.(gif|png|ttf|woff2)$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/imageMock.js",
"\\.svg$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/svg.js",
"\\$webapp/i18n/languages.json": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/languages.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,29 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// import font-size variables manually, ideally this scss would get loaded by the theme which has all variables in context
@import "../../../node_modules/matrix-react-sdk/res/css/_font-sizes.scss";
@import "../../../node_modules/matrix-react-sdk/res/css/_border-radii.scss";
// import font-size variables manually,
// ideally this file would get loaded by the theme which has all variables in context
@import "../../../node_modules/matrix-react-sdk/res/css/_font-sizes.pcss";
@import "../../../node_modules/matrix-react-sdk/res/css/_border-radii.pcss";

.mx_ErrorView {
background: #c5e0f7;
background: -moz-linear-gradient(top, #c5e0f7 0%, #ffffff 100%);
background: -webkit-linear-gradient(top, #c5e0f7 0%, #ffffff 100%);
background: linear-gradient(to bottom, #c5e0f7 0%, #ffffff 100%);
/* stylelint-disable-next-line function-no-unknown */
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#c5e0f7', endColorstr='#ffffff', GradientType=0);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-family:
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Helvetica,
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol";
width: 100%;
min-height: 100%;
height: auto;
Expand Down
48 changes: 48 additions & 0 deletions scripts/analyse_unused_exports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env node
'use strict';

const fs = require("fs");
const { exec } = require("node:child_process");

const includeJSSDK = process.argv.includes("--include-js-sdk");
const ignore = [];

ignore.push(...Object.values(JSON.parse(fs.readFileSync(`${__dirname}/../components.json`))));
ignore.push("/index.ts");
// We ignore js-sdk by default as it may export for other non element-web projects
if (!includeJSSDK) ignore.push("matrix-js-sdk");

const command = `yarn ts-prune --ignore "${ignore.join("|")}" | grep -v "(used in module)"`;

exec(command, (error, stdout, stderr) => {
if (error) throw error;
// We have to do this as piping the output of ts-prune causes the return
// code to be 0
if (stderr) throw Error(stderr);

let lines = stdout.split("\n");
// Remove the first line as that is the command that was being run and we
// log that only in case of an error
lines.splice(0, 1);
// Remove the last line as it is empty
lines.pop();

// ts-prune has bug where if the unused export is in a dependency, the path
// won't have an "/" character at the start, so we try to fix that for
// better UX
// TODO: This might break on Windows
lines = lines.reduce((newLines, line) => {
if (!line.startsWith("/")) newLines.push("/" + line);
else newLines.push(line);
return newLines;
}, []);

// If an unused export has been found, we error
if (lines.length > 0) {
console.log(`Command that was run: ${command}`);
console.log(lines.join("\n"));
throw Error("Unused exports found!");
}

console.log("Success - no unused exports found!");
});
4 changes: 2 additions & 2 deletions src/async-components/structures/CompatibilityView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import { _t } from "matrix-react-sdk/src/languageHandler";
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';

// directly import the style here as this layer does not support rethemedex at this time so no matrix-react-sdk
// scss variables will be accessible.
import "../../../res/css/structures/ErrorView.scss";
// PostCSS variables will be accessible.
import "../../../res/css/structures/ErrorView.pcss";

interface IProps {
onAccept(): void;
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 @@ -18,8 +18,8 @@ import * as React from "react";
import { _t } from "matrix-react-sdk/src/languageHandler";

// directly import the style here as this layer does not support rethemedex at this time so no matrix-react-sdk
// scss variables will be accessible.
import "../../../res/css/structures/ErrorView.scss";
// PostCSS variables will be accessible.
import "../../../res/css/structures/ErrorView.pcss";

interface IProps {
// both of these should already be internationalised
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 @@ -27,5 +27,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 گوشی استفاده کنید",
"Decentralised, encrypted chat &amp; collaboration powered by $matrixLogo": "همکاری چت غیرمتمرکز و رمزگذاری شده &amp; توسعه یافته با استفاده از $matrixLogo"
}
6 changes: 3 additions & 3 deletions src/i18n/strings/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Unknown device": "알 수 없는 기기",
"Welcome to Element": "Element에 오신 것을 환영합니다",
"The message from the parser is: %(message)s": "파서에서 온 메시지: %(message)s",
"Invalid JSON": "잘못된 JSON",
"Invalid JSON": "유효하지 않은 JSON",
"Unexpected error preparing the app. See console for details.": "앱을 준비하는 동안 예기치 않은 오류가 발생했습니다. 자세한 내용은 콘솔을 확인하세요.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "잘못된 설정: default_server_config 와 defalut_server_name, default_hs_url 중 하나만 지정할 수 있습니다.",
"Invalid configuration: no default server specified.": "잘못된 설정: 기본 서버가 지정되지 않았습니다.",
Expand All @@ -16,9 +16,9 @@
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"Unsupported browser": "지원되지 않는 브라우저",
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "최상의 경험을 위해 <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, 또는 <safariLink>Safari</safariLink>를 설치해주세요.",
"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.": "현재 사용중이신 브라우저를 계속 사용하셔도 됩니다, 다만 일부 기능들이 작동하지 않을 수 있으며 애플리케이션이 잘못돼 보일 수 있습니다.",
"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.": "현재 사용 중인 브라우저를 계속 사용할 수 있지만, 일부 기능들이 작동하지 않거나 애플리케이션이 올바르게 보여지지 않을 수 있습니다.",
"I understand the risks and wish to continue": "위험하다는 것을 이해했으며 계속하고 싶습니다",
"Go to element.io": "element.io으로 가기",
"Go to element.io": "element.io 로 이동",
"Failed to start": "시작 실패",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s 는 당신의 브라우저에서 지원되지 않는 고급 기능을 사용합니다.",
"Your browser can't run %(brand)s": "당신의 브라우저는 %(brand)s 를 작동할 수 없습니다",
Expand Down
Loading

0 comments on commit 5f387fe

Please sign in to comment.