Skip to content

Commit d73391c

Browse files
committed
Merge tag 'tags/v3.28.0' into tmp
* Show how long a call was on call tiles ([\matrix-org#6570](matrix-org#6570)). Fixes element-hq/element-web#18405. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Add regional indicators to emoji picker ([\matrix-org#6490](matrix-org#6490)). Fixes element-hq/element-web#14963. Contributed by [robintown](https://github.com/robintown). * Make call control buttons accessible to screen reader users ([\matrix-org#6181](matrix-org#6181)). Fixes element-hq/element-web#18358. Contributed by [pvagner](https://github.com/pvagner). * Skip sending a thumbnail if it is not a sufficient saving over the original ([\matrix-org#6559](matrix-org#6559)). Fixes element-hq/element-web#17906. * Increase PiP snapping speed ([\matrix-org#6539](matrix-org#6539)). Fixes element-hq/element-web#18371. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Improve and move the incoming call toast ([\matrix-org#6470](matrix-org#6470)). Fixes element-hq/element-web#17912. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Allow all of the URL schemes that Firefox allows ([\matrix-org#6457](matrix-org#6457)). Contributed by [aaronraimist](https://github.com/aaronraimist). * Improve bubble layout colors ([\matrix-org#6452](matrix-org#6452)). Fixes element-hq/element-web#18081. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Spaces let users switch between Home and All Rooms behaviours ([\matrix-org#6497](matrix-org#6497)). Fixes element-hq/element-web#18093. * Support for MSC2285 (hidden read receipts) ([\matrix-org#6390](matrix-org#6390)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Group pinned message events with MELS ([\matrix-org#6349](matrix-org#6349)). Fixes element-hq/element-web#17938. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Make version copiable ([\matrix-org#6227](matrix-org#6227)). Fixes element-hq/element-web#17603 and element-hq/element-web#18329. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Improve voice messages uploading state ([\matrix-org#6530](matrix-org#6530)). Fixes element-hq/element-web#18226 and element-hq/element-web#18224. * Add surround with feature ([\matrix-org#5510](matrix-org#5510)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Improve call event tile wording ([\matrix-org#6545](matrix-org#6545)). Fixes element-hq/element-web#18376. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Show an avatar/a turned off microphone icon for muted users ([\matrix-org#6486](matrix-org#6486)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Prompt user to leave rooms/subspaces in a space when leaving space ([\matrix-org#6424](matrix-org#6424)). Fixes element-hq/element-web#18071. * Add customisation point to override widget variables ([\matrix-org#6455](matrix-org#6455)). Fixes element-hq/element-web#18035. * Add support for screen sharing in 1:1 calls ([\matrix-org#5992](matrix-org#5992)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * [Release] Fix glare related regressions ([\matrix-org#6622](matrix-org#6622)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * [Release] Fix PiP of held calls ([\matrix-org#6612](matrix-org#6612)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * [Release] Fix toast colors ([\matrix-org#6607](matrix-org#6607)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix [object Object] in Widget Permissions ([\matrix-org#6560](matrix-org#6560)). Fixes element-hq/element-web#18384. Contributed by [Palid](https://github.com/Palid). * Fix right margin for events on IRC layout ([\matrix-org#6542](matrix-org#6542)). Fixes element-hq/element-web#18354. * Mirror only usermedia feeds ([\matrix-org#6512](matrix-org#6512)). Fixes element-hq/element-web#5633. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix LogoutDialog warning + TypeScript migration ([\matrix-org#6533](matrix-org#6533)). * Fix the wrong font being used in the room topic field ([\matrix-org#6527](matrix-org#6527)). Fixes element-hq/element-web#18339. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix inconsistent styling for links on hover ([\matrix-org#6513](matrix-org#6513)). Contributed by [janogarcia](https://github.com/janogarcia). * Fix incorrect height for encoded placeholder images ([\matrix-org#6514](matrix-org#6514)). Contributed by [Palid](https://github.com/Palid). * Fix call events layout for message bubble ([\matrix-org#6465](matrix-org#6465)). Fixes element-hq/element-web#18144. * Improve subspaces and some utilities around room/space creation ([\matrix-org#6458](matrix-org#6458)). Fixes element-hq/element-web#18090 element-hq/element-web#18091 and element-hq/element-web#17256. * Restore pointer cursor for SenderProfile in message bubbles ([\matrix-org#6501](matrix-org#6501)). Fixes element-hq/element-web#18249. * Fix issues with the Call View ([\matrix-org#6472](matrix-org#6472)). Fixes element-hq/element-web#18221. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Align event list summary read receipts when using message bubbles ([\matrix-org#6500](matrix-org#6500)). Fixes element-hq/element-web#18143. * Better positioning for unbubbled events in timeline ([\matrix-org#6477](matrix-org#6477)). Fixes element-hq/element-web#18132. * Realign reactions row with messages in modern layout ([\matrix-org#6491](matrix-org#6491)). Fixes element-hq/element-web#18118. Contributed by [robintown](https://github.com/robintown). * Fix CreateRoomDialog exploding when making public room outside of a space ([\matrix-org#6492](matrix-org#6492)). Fixes element-hq/element-web#18275. * Fix call crashing because `element` was undefined ([\matrix-org#6488](matrix-org#6488)). Fixes element-hq/element-web#18270. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Upscale thumbnails to the container size ([\matrix-org#6589](matrix-org#6589)). Fixes element-hq/element-web#18307. * Fix create room dialog in spaces no longer adding to the space ([\matrix-org#6587](matrix-org#6587)). Fixes element-hq/element-web#18465. * Don't show a modal on call reject/user hangup ([\matrix-org#6580](matrix-org#6580)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fade Call View Buttons after `componentDidMount` ([\matrix-org#6581](matrix-org#6581)). Fixes element-hq/element-web#18439. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix missing expand button on codeblocks ([\matrix-org#6565](matrix-org#6565)). Fixes element-hq/element-web#18388. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * allow customizing the bubble layout colors ([\matrix-org#6568](matrix-org#6568)). Fixes element-hq/element-web#18408. Contributed by [benneti](https://github.com/benneti). * Don't flash "Missed call" when accepting a call ([\matrix-org#6567](matrix-org#6567)). Fixes element-hq/element-web#18404. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix clicking whitespaces on replies ([\matrix-org#6571](matrix-org#6571)). Fixes element-hq/element-web#18327. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix disabled state for voice messages + send button tooltip ([\matrix-org#6562](matrix-org#6562)). Fixes element-hq/element-web#18413. * Fix voice feed being cut-off ([\matrix-org#6550](matrix-org#6550)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix sizing issues of the screen picker ([\matrix-org#6498](matrix-org#6498)). Fixes element-hq/element-web#18281. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Stop voice messages that are playing when starting a recording ([\matrix-org#6563](matrix-org#6563)). Fixes element-hq/element-web#18410. * Properly set style attribute on shared usercontent iframe ([\matrix-org#6561](matrix-org#6561)). Fixes element-hq/element-web#18414. * Null guard space inviter to prevent the app exploding ([\matrix-org#6558](matrix-org#6558)). * Make the ringing sound mutable/disablable ([\matrix-org#6534](matrix-org#6534)). Fixes element-hq/element-web#15591. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix wrong cursor being used in PiP ([\matrix-org#6551](matrix-org#6551)). Fixes element-hq/element-web#18383. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Re-pin Jitsi if the widget already exists ([\matrix-org#6226](matrix-org#6226)). Fixes element-hq/element-web#17679. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix broken call notification regression ([\matrix-org#6526](matrix-org#6526)). Fixes element-hq/element-web#18335. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * createRoom, only send join rule event if we have a join rule to put in it ([\matrix-org#6516](matrix-org#6516)). Fixes element-hq/element-web#18301. * Fix clicking pills inside replies ([\matrix-org#6508](matrix-org#6508)). Fixes element-hq/element-web#18283. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix grecaptcha regression ([\matrix-org#6503](matrix-org#6503)). Fixes element-hq/element-web#18284. Contributed by [Palid](https://github.com/Palid).
2 parents 21388a4 + c4de03d commit d73391c

File tree

1,056 files changed

+42900
-25603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,056 files changed

+42900
-25603
lines changed

.eslintignore.errorfiles

Lines changed: 0 additions & 16 deletions
This file was deleted.

.eslintrc.js

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
module.exports = {
2-
extends: ["matrix-org", "matrix-org/react-legacy"],
3-
parser: "babel-eslint",
4-
2+
plugins: ["matrix-org"],
3+
extends: [
4+
"plugin:matrix-org/babel",
5+
"plugin:matrix-org/react",
6+
],
57
env: {
68
browser: true,
79
node: true,
@@ -15,35 +17,60 @@ module.exports = {
1517
"prefer-promise-reject-errors": "off",
1618
"no-async-promise-executor": "off",
1719
"quotes": "off",
18-
},
20+
"no-extra-boolean-cast": "off",
21+
22+
// Bind or arrow functions in props causes performance issues (but we
23+
// currently use them in some places).
24+
// It's disabled here, but we should using it sparingly.
25+
"react/jsx-no-bind": "off",
26+
"react/jsx-key": ["error"],
1927

28+
"no-restricted-properties": [
29+
"error",
30+
...buildRestrictedPropertiesOptions(
31+
["window.innerHeight", "window.innerWidth", "window.visualViewport"],
32+
"Use UIStore to access window dimensions instead.",
33+
),
34+
...buildRestrictedPropertiesOptions(
35+
["*.mxcUrlToHttp", "*.getHttpUriForMxc"],
36+
"Use Media helper instead to centralise access for customisation.",
37+
),
38+
],
39+
},
2040
overrides: [{
21-
"files": ["src/**/*.{ts,tsx}"],
22-
"extends": ["matrix-org/ts"],
23-
"rules": {
41+
files: [
42+
"src/**/*.{ts,tsx}",
43+
"test/**/*.{ts,tsx}",
44+
],
45+
extends: [
46+
"plugin:matrix-org/typescript",
47+
"plugin:matrix-org/react",
48+
],
49+
rules: {
50+
// Things we do that break the ideal style
51+
"prefer-promise-reject-errors": "off",
52+
"quotes": "off",
53+
"no-extra-boolean-cast": "off",
54+
55+
// Remove Babel things manually due to override limitations
56+
"@babel/no-invalid-this": ["off"],
57+
2458
// We're okay being explicit at the moment
2559
"@typescript-eslint/no-empty-interface": "off",
2660
// We disable this while we're transitioning
2761
"@typescript-eslint/no-explicit-any": "off",
2862
// We'd rather not do this but we do
2963
"@typescript-eslint/ban-ts-comment": "off",
30-
31-
"quotes": "off",
32-
"no-extra-boolean-cast": "off",
33-
"no-restricted-properties": [
34-
"error",
35-
...buildRestrictedPropertiesOptions(
36-
["window.innerHeight", "window.innerWidth", "window.visualViewport"],
37-
"Use UIStore to access window dimensions instead",
38-
),
39-
],
4064
},
4165
}],
4266
};
4367

4468
function buildRestrictedPropertiesOptions(properties, message) {
4569
return properties.map(prop => {
46-
const [object, property] = prop.split(".");
70+
let [object, property] = prop.split(".");
71+
if (object === "*") {
72+
object = undefined;
73+
}
4774
return {
4875
object,
4976
property,

.flowconfig

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @matrix-org/element-web

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- Please read https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md before submitting your pull request -->
2+
3+
<!-- Include a Sign-Off as described in https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md#sign-off -->
4+
5+
<!-- To specify text for the changelog entry (otherwise the PR title will be used):
6+
Notes:
7+
8+
Changes in this project generate changelog entries in element-web by default.
9+
To suppress this:
10+
11+
element-web notes: none
12+
13+
...or to specify different notes:
14+
element-web notes: <notes>
15+
-->

.github/workflows/develop.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Develop
2+
on:
3+
# These tests won't work for non-develop branches at the moment as they
4+
# won't pull in the right versions of other repos, so they're only enabled
5+
# on develop.
6+
push:
7+
branches: [develop]
8+
pull_request:
9+
branches: [develop]
10+
jobs:
11+
end-to-end:
12+
runs-on: ubuntu-latest
13+
container: vectorim/element-web-ci-e2etests-env:latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
- name: Prepare End-to-End tests
18+
run: ./scripts/ci/prepare-end-to-end-tests.sh
19+
- name: Run End-to-End tests
20+
run: ./scripts/ci/run-end-to-end-tests.sh
21+
- name: Archive logs
22+
uses: actions/upload-artifact@v2
23+
if: ${{ always() }}
24+
with:
25+
path: |
26+
test/end-to-end-tests/logs/**/*
27+
test/end-to-end-tests/synapse/installations/consent/homeserver.log
28+
retention-days: 14
29+
- name: Download previous benchmark data
30+
uses: actions/cache@v1
31+
with:
32+
path: ./cache
33+
key: ${{ runner.os }}-benchmark
34+
- name: Store benchmark result
35+
uses: matrix-org/github-action-benchmark@jsperfentry-1
36+
with:
37+
tool: 'jsperformanceentry'
38+
output-file-path: test/end-to-end-tests/performance-entries.json
39+
fail-on-alert: false
40+
comment-on-alert: false
41+
# Only temporary to monitor where failures occur
42+
alert-comment-cc-users: '@gsouquet'
43+
github-token: ${{ secrets.DEPLOY_GH_PAGES }}
44+
auto-push: ${{ github.ref == 'refs/heads/develop' }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Layered Preview Build
2+
on:
3+
pull_request:
4+
branches: [develop]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Build
11+
run: scripts/ci/layered.sh && cd element-web && cp element.io/develop/config.json config.json && CI_PACKAGE=true yarn build
12+
- name: Upload Artifact
13+
uses: actions/upload-artifact@v2
14+
with:
15+
name: previewbuild
16+
path: element-web/webapp
17+
# We'll only use this in a triggered job, then we're done with it
18+
retention-days: 1
19+

.github/workflows/netflify.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Upload Preview Build to Netlify
2+
on:
3+
workflow_run:
4+
workflows: ["Layered Preview Build"]
5+
types:
6+
- completed
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
if: >
11+
${{ github.event.workflow_run.conclusion == 'success' }}
12+
steps:
13+
# There's a 'download artifact' action but it hasn't been updated for the
14+
# workflow_run action (https://github.com/actions/download-artifact/issues/60)
15+
# so instead we get this mess:
16+
- name: 'Download artifact'
17+
uses: actions/github-script@v3.1.0
18+
with:
19+
script: |
20+
var artifacts = await github.actions.listWorkflowRunArtifacts({
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
run_id: ${{github.event.workflow_run.id }},
24+
});
25+
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
26+
return artifact.name == "previewbuild"
27+
})[0];
28+
var download = await github.actions.downloadArtifact({
29+
owner: context.repo.owner,
30+
repo: context.repo.repo,
31+
artifact_id: matchArtifact.id,
32+
archive_format: 'zip',
33+
});
34+
var fs = require('fs');
35+
fs.writeFileSync('${{github.workspace}}/previewbuild.zip', Buffer.from(download.data));
36+
- run: unzip previewbuild.zip && rm previewbuild.zip
37+
- name: Deploy to Netlify
38+
id: netlify
39+
uses: nwtgck/actions-netlify@v1.2
40+
with:
41+
publish-dir: .
42+
deploy-message: "Deploy from GitHub Actions"
43+
# These don't work because we're in workflow_run
44+
enable-pull-request-comment: false
45+
enable-commit-comment: false
46+
env:
47+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
48+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
49+
timeout-minutes: 1
50+
- name: Comment on PR
51+
uses: phulsechinmay/rewritable-pr-comment@v0.3.0
52+
with:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
ISSUE_ID: ${{ github.event.workflow_run.pull_requests[0].number }}
55+
message: |
56+
Preview: ${{ steps.netlify.outputs.deploy-url }}
57+
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.
58+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Preview Changelog
2+
on:
3+
pull_request_target:
4+
types: [ opened, edited, labeled ]
5+
jobs:
6+
changelog:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Preview Changelog
10+
uses: matrix-org/allchange@main
11+
with:
12+
ghToken: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ package-lock.json
1515

1616
.DS_Store
1717
*.tmp
18+
19+
.vscode
20+
.vscode/

0 commit comments

Comments
 (0)