Skip to content

Commit

Permalink
Merge tag 'v3.30.0' into AMP.chat
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
awesome-michael committed Sep 15, 2021
2 parents 61f6987 + c3089a1 commit 252aec1
Show file tree
Hide file tree
Showing 1,335 changed files with 113,202 additions and 43,407 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
src/component-index.js
test/end-to-end-tests/node_modules/
test/end-to-end-tests/riot/
test/end-to-end-tests/element/
test/end-to-end-tests/synapse/
16 changes: 0 additions & 16 deletions .eslintignore.errorfiles

This file was deleted.

73 changes: 62 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module.exports = {
extends: ["matrix-org", "matrix-org/react-legacy"],
parser: "babel-eslint",

plugins: ["matrix-org"],
extends: [
"plugin:matrix-org/babel",
"plugin:matrix-org/react",
],
env: {
browser: true,
node: true,
Expand All @@ -15,20 +17,69 @@ module.exports = {
"prefer-promise-reject-errors": "off",
"no-async-promise-executor": "off",
"quotes": "off",
"indent": "off",
},
"no-extra-boolean-cast": "off",

// Bind or arrow functions in props causes performance issues (but we
// currently use them in some places).
// It's disabled here, but we should using it sparingly.
"react/jsx-no-bind": "off",
"react/jsx-key": ["error"],

"no-restricted-properties": [
"error",
...buildRestrictedPropertiesOptions(
["window.innerHeight", "window.innerWidth", "window.visualViewport"],
"Use UIStore to access window dimensions instead.",
),
...buildRestrictedPropertiesOptions(
["*.mxcUrlToHttp", "*.getHttpUriForMxc"],
"Use Media helper instead to centralise access for customisation.",
),
],
},
overrides: [{
"files": ["src/**/*.{ts,tsx}"],
"extends": ["matrix-org/ts"],
"rules": {
files: [
"src/**/*.{ts,tsx}",
"test/**/*.{ts,tsx}",
],
extends: [
"plugin:matrix-org/typescript",
"plugin:matrix-org/react",
],
rules: {
// Things we do that break the ideal style
"prefer-promise-reject-errors": "off",
"quotes": "off",
"no-extra-boolean-cast": "off",

// Remove Babel things manually due to override limitations
"@babel/no-invalid-this": ["off"],

// We're okay being explicit at the moment
"@typescript-eslint/no-empty-interface": "off",
// We disable this while we're transitioning
"@typescript-eslint/no-explicit-any": "off",
// We'd rather not do this but we do
"@typescript-eslint/ban-ts-comment": "off",

"quotes": "off",
"no-extra-boolean-cast": "off",
},
}],
settings: {
react: {
version: "detect",
}
}
};

function buildRestrictedPropertiesOptions(properties, message) {
return properties.map(prop => {
let [object, property] = prop.split(".");
if (object === "*") {
object = undefined;
}
return {
object,
property,
message,
};
});
}
6 changes: 0 additions & 6 deletions .flowconfig

This file was deleted.

1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @matrix-org/element-web
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- 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.md#sign-off -->

<!-- To specify text for the changelog entry (otherwise the PR title will be used):
Notes:
Changes in this project generate changelog entries in element-web by default.
To suppress this:
element-web notes: none
...or to specify different notes:
element-web notes: <notes>
-->
46 changes: 46 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Develop
on:
# These tests won't work for non-develop branches at the moment as they
# won't pull in the right versions of other repos, so they're only enabled
# on develop.
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
end-to-end:
runs-on: ubuntu-latest
env:
PR_NUMBER: ${{github.event.number}}
container: vectorim/element-web-ci-e2etests-env:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare End-to-End tests
run: ./scripts/ci/prepare-end-to-end-tests.sh
- name: Run End-to-End tests
run: ./scripts/ci/run-end-to-end-tests.sh
- name: Archive logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
path: |
test/end-to-end-tests/logs/**/*
test/end-to-end-tests/synapse/installations/consent/homeserver.log
retention-days: 14
- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: matrix-org/github-action-benchmark@jsperfentry-1
with:
tool: 'jsperformanceentry'
output-file-path: test/end-to-end-tests/performance-entries.json
fail-on-alert: false
comment-on-alert: false
# Only temporary to monitor where failures occur
alert-comment-cc-users: '@gsouquet'
github-token: ${{ secrets.DEPLOY_GH_PAGES }}
auto-push: ${{ github.ref == 'refs/heads/develop' }}
31 changes: 31 additions & 0 deletions .github/workflows/layered-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Layered Preview Build
on:
pull_request:
branches: [develop]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: scripts/ci/layered.sh && cd element-web && cp element.io/develop/config.json config.json && CI_PACKAGE=true yarn build
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: previewbuild
path: element-web/webapp
# We'll only use this in a triggered job, then we're done with it
retention-days: 1
- uses: actions/[email protected]
with:
script: |
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.json', JSON.stringify(context.payload.pull_request));
- name: Upload PR Info
uses: actions/upload-artifact@v2
with:
name: pr.json
path: pr.json
# We'll only use this in a triggered job, then we're done with it
retention-days: 1

80 changes: 80 additions & 0 deletions .github/workflows/netlify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Upload Preview Build to Netlify
on:
workflow_run:
workflows: ["Layered Preview Build"]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.conclusion == 'success' }}
steps:
# There's a 'download artifact' action but it hasn't been updated for the
# workflow_run action (https://github.com/actions/download-artifact/issues/60)
# so instead we get this mess:
- name: 'Download artifact'
uses: actions/[email protected]
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "previewbuild"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/previewbuild.zip', Buffer.from(download.data));
var prInfoArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr.json"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: prInfoArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.json.zip', Buffer.from(download.data));
- name: Extract Artifacts
run: unzip -d webapp previewbuild.zip && rm previewbuild.zip && unzip pr.json.zip && rm pr.json.zip
- name: 'Read PR Info'
id: readctx
uses: actions/[email protected]
with:
script: |
var fs = require('fs');
var pr = JSON.parse(fs.readFileSync('${{github.workspace}}/pr.json'));
console.log(`::set-output name=prnumber::${pr.number}`);
- name: Deploy to Netlify
id: netlify
uses: nwtgck/[email protected]
with:
publish-dir: webapp
deploy-message: "Deploy from GitHub Actions"
# These don't work because we're in workflow_run
enable-pull-request-comment: false
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
- name: Edit PR Description
uses: velas/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
pull-request-number: ${{ steps.readctx.outputs.prnumber }}
description-message: |
Preview: ${{ steps.netlify.outputs.deploy-url }}
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.
12 changes: 12 additions & 0 deletions .github/workflows/preview_changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Preview Changelog
on:
pull_request_target:
types: [ opened, edited, labeled ]
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Preview Changelog
uses: matrix-org/allchange@main
with:
ghToken: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/*.log
package-lock.json

/coverage
/node_modules
/lib

Expand All @@ -13,3 +14,7 @@ package-lock.json
/src/component-index.js

.DS_Store
*.tmp

.vscode
.vscode/
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
2 changes: 2 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
"stylelint-scss",
],
"rules": {
"color-hex-case": null,
"indentation": 4,
"comment-empty-line-before": null,
"declaration-empty-line-before": null,
Expand All @@ -16,6 +17,7 @@ module.exports = {
"selector-list-comma-newline-after": null,
"at-rule-no-unknown": null,
"no-descending-specificity": null,
"no-empty-first-line": true,
"scss/at-rule-no-unknown": [true, {
// https://github.com/vector-im/element-web/issues/10544
"ignoreAtRules": ["define-mixin"],
Expand Down
Loading

0 comments on commit 252aec1

Please sign in to comment.