Skip to content

Commit 252aec1

Browse files
Merge tag 'v3.30.0' into AMP.chat
* Add bubble highlight styling ([\matrix-org#6582](matrix-org#6582)). Fixes element-hq/element-web#18295 and element-hq/element-web#18295. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * [Release] Add config option to turn on in-room event sending timing metrics ([\matrix-org#6773](matrix-org#6773)). * Create narrow mode for Composer ([\matrix-org#6682](matrix-org#6682)). Fixes element-hq/element-web#18533 and element-hq/element-web#18533. * Prefer matrix.to alias links over room id in spaces & share ([\matrix-org#6745](matrix-org#6745)). Fixes element-hq/element-web#18796 and element-hq/element-web#18796. * Stop automatic playback of voice messages if a non-voice message is encountered ([\matrix-org#6728](matrix-org#6728)). Fixes element-hq/element-web#18850 and element-hq/element-web#18850. * Show call length during a call ([\matrix-org#6700](matrix-org#6700)). Fixes element-hq/element-web#18566 and element-hq/element-web#18566. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Serialize and retry mass-leave when leaving space ([\matrix-org#6737](matrix-org#6737)). Fixes element-hq/element-web#18789 and element-hq/element-web#18789. * Improve form handling in and around space creation ([\matrix-org#6739](matrix-org#6739)). Fixes element-hq/element-web#18775 and element-hq/element-web#18775. * Split autoplay GIFs and videos into different settings ([\matrix-org#6726](matrix-org#6726)). Fixes element-hq/element-web#5771 and element-hq/element-web#5771. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Add autoplay for voice messages ([\matrix-org#6710](matrix-org#6710)). Fixes element-hq/element-web#18804, element-hq/element-web#18715, element-hq/element-web#18714 element-hq/element-web#17961 and element-hq/element-web#18804. * Allow to use basic html to format invite messages ([\matrix-org#6703](matrix-org#6703)). Fixes element-hq/element-web#15738 and element-hq/element-web#15738. Contributed by [skolmer](https://github.com/skolmer). * Allow widgets, when eligible, to interact with more rooms as per MSC2762 ([\matrix-org#6684](matrix-org#6684)). * Remove arbitrary limits from send/receive events for widgets ([\matrix-org#6719](matrix-org#6719)). Fixes element-hq/element-web#17994 and element-hq/element-web#17994. * Reload suggested rooms if we see the state change down /sync ([\matrix-org#6715](matrix-org#6715)). Fixes element-hq/element-web#18761 and element-hq/element-web#18761. * When creating private spaces, make the initial rooms restricted if supported ([\matrix-org#6721](matrix-org#6721)). Fixes element-hq/element-web#18722 and element-hq/element-web#18722. * Threading exploration work ([\matrix-org#6658](matrix-org#6658)). Fixes element-hq/element-web#18532 and element-hq/element-web#18532. * Default to `Don't leave any` when leaving a space ([\matrix-org#6697](matrix-org#6697)). Fixes element-hq/element-web#18592 and element-hq/element-web#18592. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Special case redaction event sending from widgets per MSC2762 ([\matrix-org#6686](matrix-org#6686)). Fixes element-hq/element-web#18573 and element-hq/element-web#18573. * Add active speaker indicators ([\matrix-org#6639](matrix-org#6639)). Fixes element-hq/element-web#17627 and element-hq/element-web#17627. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Increase general app performance by optimizing layers ([\matrix-org#6644](matrix-org#6644)). Fixes element-hq/element-web#18730 and element-hq/element-web#18730. Contributed by [Palid](https://github.com/Palid). * Fix autocomplete not having y-scroll ([\matrix-org#6802](matrix-org#6802)). * Fix emoji picker and stickerpicker not appearing correctly when opened ([\matrix-org#6801](matrix-org#6801)). * Debounce read marker update on scroll ([\matrix-org#6774](matrix-org#6774)). * Fix Space creation wizard go to my first room button behaviour ([\matrix-org#6748](matrix-org#6748)). Fixes element-hq/element-web#18764 and element-hq/element-web#18764. * Fix scroll being stuck at bottom ([\matrix-org#6751](matrix-org#6751)). Fixes element-hq/element-web#18903 and element-hq/element-web#18903. * Fix widgets not remembering identity verification when asked to. ([\matrix-org#6742](matrix-org#6742)). Fixes element-hq/element-web#15631 and element-hq/element-web#15631. * Add missing pluralisation i18n strings for Spaces ([\matrix-org#6738](matrix-org#6738)). Fixes element-hq/element-web#18780 and element-hq/element-web#18780. * Make ForgotPassword UX slightly more user friendly ([\matrix-org#6636](matrix-org#6636)). Fixes element-hq/element-web#11531 and element-hq/element-web#11531. Contributed by [Palid](https://github.com/Palid). * Don't context switch room on SpaceStore ready as it can break permalinks ([\matrix-org#6730](matrix-org#6730)). Fixes element-hq/element-web#17974 and element-hq/element-web#17974. * Fix explore rooms button not working during space creation wizard ([\matrix-org#6729](matrix-org#6729)). Fixes element-hq/element-web#18762 and element-hq/element-web#18762. * Fix bug where one party's media would sometimes not be shown ([\matrix-org#6731](matrix-org#6731)). * Only make the initial space rooms suggested by default ([\matrix-org#6714](matrix-org#6714)). Fixes element-hq/element-web#18760 and element-hq/element-web#18760. * Replace fake username in EventTilePreview with a proper loading state ([\matrix-org#6702](matrix-org#6702)). Fixes element-hq/element-web#15897 and element-hq/element-web#15897. Contributed by [skolmer](https://github.com/skolmer). * Don't send prehistorical events to widgets during decryption at startup ([\matrix-org#6695](matrix-org#6695)). Fixes element-hq/element-web#18060 and element-hq/element-web#18060. * When creating subspaces properly set restricted join rule ([\matrix-org#6725](matrix-org#6725)). Fixes element-hq/element-web#18797 and element-hq/element-web#18797. * Fix the Image View not openning for some pinned messages ([\matrix-org#6723](matrix-org#6723)). Fixes element-hq/element-web#18422 and element-hq/element-web#18422. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Show autocomplete sections vertically ([\matrix-org#6722](matrix-org#6722)). Fixes element-hq/element-web#18860 and element-hq/element-web#18860. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix EmojiPicker filtering to lower case emojibase data strings ([\matrix-org#6717](matrix-org#6717)). Fixes element-hq/element-web#18686 and element-hq/element-web#18686. * Clear currentRoomId when viewing home page, fixing document title ([\matrix-org#6716](matrix-org#6716)). Fixes element-hq/element-web#18668 and element-hq/element-web#18668. * Fix membership updates to Spaces not applying in real-time ([\matrix-org#6713](matrix-org#6713)). Fixes element-hq/element-web#18737 and element-hq/element-web#18737. * Don't show a double stacked invite modals when inviting to Spaces ([\matrix-org#6698](matrix-org#6698)). Fixes element-hq/element-web#18745 and element-hq/element-web#18745. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Remove non-functional DuckDuckGo Autocomplete Provider ([\matrix-org#6712](matrix-org#6712)). Fixes element-hq/element-web#18778 and element-hq/element-web#18778. * Filter members on `MemberList` load ([\matrix-org#6708](matrix-org#6708)). Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix improper voice messages being produced in Firefox and sometimes other browsers. ([\matrix-org#6696](matrix-org#6696)). Fixes element-hq/element-web#18587 and element-hq/element-web#18587. * Fix client forgetting which capabilities a widget was approved for ([\matrix-org#6685](matrix-org#6685)). Fixes element-hq/element-web#18786 and element-hq/element-web#18786. * Fix left panel widgets not remembering collapsed state ([\matrix-org#6687](matrix-org#6687)). Fixes element-hq/element-web#17803 and element-hq/element-web#17803. * Fix changelog link colour back to blue ([\matrix-org#6692](matrix-org#6692)). Fixes element-hq/element-web#18726 and element-hq/element-web#18726. * Soften codeblock border color ([\matrix-org#6564](matrix-org#6564)). Fixes element-hq/element-web#18367 and element-hq/element-web#18367. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Pause ringing more aggressively ([\matrix-org#6691](matrix-org#6691)). Fixes element-hq/element-web#18588 and element-hq/element-web#18588. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix command autocomplete ([\matrix-org#6680](matrix-org#6680)). Fixes element-hq/element-web#18670 and element-hq/element-web#18670. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Don't re-sort the room-list based on profile/status changes ([\matrix-org#6595](matrix-org#6595)). Fixes vector-im/element-web#110 and vector-im/element-web#110. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Fix codeblock formatting with syntax highlighting on ([\matrix-org#6681](matrix-org#6681)). Fixes element-hq/element-web#18739 element-hq/element-web#18365 and element-hq/element-web#18739. Contributed by [SimonBrandner](https://github.com/SimonBrandner). * Add padding to the Add button in the notification settings ([\matrix-org#6665](matrix-org#6665)). Fixes element-hq/element-web#18706 and element-hq/element-web#18706. Contributed by [SimonBrandner](https://github.com/SimonBrandner). # Conflicts: # src/components/structures/MessagePanel.js # src/components/structures/RoomView.tsx # src/components/views/settings/tabs/user/HelpUserSettingsTab.js # src/i18n/strings/de_DE.json # src/utils/permalinks/SpecPermalinkConstructor.ts Change-Id: I526ee4e0de3ec11f735f782aa2ebd94ff23cca15
2 parents 61f6987 + c3089a1 commit 252aec1

File tree

1,335 files changed

+113202
-43407
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,335 files changed

+113202
-43407
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
src/component-index.js
22
test/end-to-end-tests/node_modules/
3-
test/end-to-end-tests/riot/
3+
test/end-to-end-tests/element/
44
test/end-to-end-tests/synapse/

.eslintignore.errorfiles

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

.eslintrc.js

Lines changed: 62 additions & 11 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,20 +17,69 @@ module.exports = {
1517
"prefer-promise-reject-errors": "off",
1618
"no-async-promise-executor": "off",
1719
"quotes": "off",
18-
"indent": "off",
19-
},
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"],
2027

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+
},
2140
overrides: [{
22-
"files": ["src/**/*.{ts,tsx}"],
23-
"extends": ["matrix-org/ts"],
24-
"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+
58+
// We're okay being explicit at the moment
59+
"@typescript-eslint/no-empty-interface": "off",
2560
// We disable this while we're transitioning
2661
"@typescript-eslint/no-explicit-any": "off",
2762
// We'd rather not do this but we do
2863
"@typescript-eslint/ban-ts-comment": "off",
29-
30-
"quotes": "off",
31-
"no-extra-boolean-cast": "off",
3264
},
3365
}],
66+
settings: {
67+
react: {
68+
version: "detect",
69+
}
70+
}
3471
};
72+
73+
function buildRestrictedPropertiesOptions(properties, message) {
74+
return properties.map(prop => {
75+
let [object, property] = prop.split(".");
76+
if (object === "*") {
77+
object = undefined;
78+
}
79+
return {
80+
object,
81+
property,
82+
message,
83+
};
84+
});
85+
}

.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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
env:
14+
PR_NUMBER: ${{github.event.number}}
15+
container: vectorim/element-web-ci-e2etests-env:latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
- name: Prepare End-to-End tests
20+
run: ./scripts/ci/prepare-end-to-end-tests.sh
21+
- name: Run End-to-End tests
22+
run: ./scripts/ci/run-end-to-end-tests.sh
23+
- name: Archive logs
24+
uses: actions/upload-artifact@v2
25+
if: ${{ always() }}
26+
with:
27+
path: |
28+
test/end-to-end-tests/logs/**/*
29+
test/end-to-end-tests/synapse/installations/consent/homeserver.log
30+
retention-days: 14
31+
- name: Download previous benchmark data
32+
uses: actions/cache@v1
33+
with:
34+
path: ./cache
35+
key: ${{ runner.os }}-benchmark
36+
- name: Store benchmark result
37+
uses: matrix-org/github-action-benchmark@jsperfentry-1
38+
with:
39+
tool: 'jsperformanceentry'
40+
output-file-path: test/end-to-end-tests/performance-entries.json
41+
fail-on-alert: false
42+
comment-on-alert: false
43+
# Only temporary to monitor where failures occur
44+
alert-comment-cc-users: '@gsouquet'
45+
github-token: ${{ secrets.DEPLOY_GH_PAGES }}
46+
auto-push: ${{ github.ref == 'refs/heads/develop' }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
- uses: actions/[email protected]
20+
with:
21+
script: |
22+
var fs = require('fs');
23+
fs.writeFileSync('${{github.workspace}}/pr.json', JSON.stringify(context.payload.pull_request));
24+
- name: Upload PR Info
25+
uses: actions/upload-artifact@v2
26+
with:
27+
name: pr.json
28+
path: pr.json
29+
# We'll only use this in a triggered job, then we're done with it
30+
retention-days: 1
31+

.github/workflows/netlify.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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/[email protected]
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+
37+
var prInfoArtifact = artifacts.data.artifacts.filter((artifact) => {
38+
return artifact.name == "pr.json"
39+
})[0];
40+
var download = await github.actions.downloadArtifact({
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
artifact_id: prInfoArtifact.id,
44+
archive_format: 'zip',
45+
});
46+
var fs = require('fs');
47+
fs.writeFileSync('${{github.workspace}}/pr.json.zip', Buffer.from(download.data));
48+
- name: Extract Artifacts
49+
run: unzip -d webapp previewbuild.zip && rm previewbuild.zip && unzip pr.json.zip && rm pr.json.zip
50+
- name: 'Read PR Info'
51+
id: readctx
52+
uses: actions/[email protected]
53+
with:
54+
script: |
55+
var fs = require('fs');
56+
var pr = JSON.parse(fs.readFileSync('${{github.workspace}}/pr.json'));
57+
console.log(`::set-output name=prnumber::${pr.number}`);
58+
- name: Deploy to Netlify
59+
id: netlify
60+
uses: nwtgck/[email protected]
61+
with:
62+
publish-dir: webapp
63+
deploy-message: "Deploy from GitHub Actions"
64+
# These don't work because we're in workflow_run
65+
enable-pull-request-comment: false
66+
enable-commit-comment: false
67+
env:
68+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
69+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
70+
timeout-minutes: 1
71+
- name: Edit PR Description
72+
uses: velas/[email protected]
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
with:
76+
pull-request-number: ${{ steps.readctx.outputs.prnumber }}
77+
description-message: |
78+
Preview: ${{ steps.netlify.outputs.deploy-url }}
79+
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.
80+
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 }}

0 commit comments

Comments
 (0)