Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 0f53fb7

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feature/mid-call-device-change
Signed-off-by: Šimon Brandner <[email protected]>
2 parents 71e648e + 6c69f3e commit 0f53fb7

File tree

664 files changed

+24109
-22446
lines changed

Some content is hidden

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

664 files changed

+24109
-22446
lines changed

.eslintrc.js

Lines changed: 91 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,36 @@ module.exports = {
4040
),
4141
],
4242

43+
// Ban matrix-js-sdk/src imports in favour of matrix-js-sdk/src/matrix imports to prevent unleashing hell.
44+
"no-restricted-imports": ["error", {
45+
"paths": [{
46+
"name": "matrix-js-sdk",
47+
"message": "Please use matrix-js-sdk/src/matrix instead",
48+
}, {
49+
"name": "matrix-js-sdk/",
50+
"message": "Please use matrix-js-sdk/src/matrix instead",
51+
}, {
52+
"name": "matrix-js-sdk/src",
53+
"message": "Please use matrix-js-sdk/src/matrix instead",
54+
}, {
55+
"name": "matrix-js-sdk/src/",
56+
"message": "Please use matrix-js-sdk/src/matrix instead",
57+
}, {
58+
"name": "matrix-js-sdk/src/index",
59+
"message": "Please use matrix-js-sdk/src/matrix instead",
60+
}, {
61+
"name": "matrix-react-sdk",
62+
"message": "Please use matrix-react-sdk/src/index instead",
63+
}, {
64+
"name": "matrix-react-sdk/",
65+
"message": "Please use matrix-react-sdk/src/index instead",
66+
}],
67+
"patterns": [{
68+
"group": ["matrix-js-sdk/lib", "matrix-js-sdk/lib/", "matrix-js-sdk/lib/**"],
69+
"message": "Please use matrix-js-sdk/src/* instead",
70+
}],
71+
}],
72+
4373
// There are too many a11y violations to fix at once
4474
// Turn violated rules off until they are fixed
4575
"jsx-a11y/alt-text": "off",
@@ -57,32 +87,70 @@ module.exports = {
5787
"jsx-a11y/role-supports-aria-props": "off",
5888
"jsx-a11y/tabindex-no-positive": "off",
5989
},
60-
overrides: [{
61-
files: [
62-
"src/**/*.{ts,tsx}",
63-
"test/**/*.{ts,tsx}",
64-
],
65-
extends: [
66-
"plugin:matrix-org/typescript",
67-
"plugin:matrix-org/react",
68-
],
69-
rules: {
70-
// Things we do that break the ideal style
71-
"prefer-promise-reject-errors": "off",
72-
"quotes": "off",
73-
"no-extra-boolean-cast": "off",
90+
overrides: [
91+
{
92+
files: [
93+
"src/**/*.{ts,tsx}",
94+
"test/**/*.{ts,tsx}",
95+
],
96+
extends: [
97+
"plugin:matrix-org/typescript",
98+
"plugin:matrix-org/react",
99+
],
100+
rules: {
101+
// Things we do that break the ideal style
102+
"prefer-promise-reject-errors": "off",
103+
"quotes": "off",
104+
"no-extra-boolean-cast": "off",
74105

75-
// Remove Babel things manually due to override limitations
76-
"@babel/no-invalid-this": ["off"],
106+
// Remove Babel things manually due to override limitations
107+
"@babel/no-invalid-this": ["off"],
77108

78-
// We're okay being explicit at the moment
79-
"@typescript-eslint/no-empty-interface": "off",
80-
// We disable this while we're transitioning
81-
"@typescript-eslint/no-explicit-any": "off",
82-
// We'd rather not do this but we do
83-
"@typescript-eslint/ban-ts-comment": "off",
109+
// We're okay being explicit at the moment
110+
"@typescript-eslint/no-empty-interface": "off",
111+
// We disable this while we're transitioning
112+
"@typescript-eslint/no-explicit-any": "off",
113+
// We'd rather not do this but we do
114+
"@typescript-eslint/ban-ts-comment": "off",
115+
},
84116
},
85-
}],
117+
// temporary override for offending icon require files
118+
{
119+
files: [
120+
"src/SdkConfig.ts",
121+
"src/components/structures/FileDropTarget.tsx",
122+
"src/components/structures/RoomStatusBar.tsx",
123+
"src/components/structures/UserMenu.tsx",
124+
"src/components/views/avatars/WidgetAvatar.tsx",
125+
"src/components/views/dialogs/AddExistingToSpaceDialog.tsx",
126+
"src/components/views/dialogs/ForwardDialog.tsx",
127+
"src/components/views/dialogs/InviteDialog.tsx",
128+
"src/components/views/dialogs/ModalWidgetDialog.tsx",
129+
"src/components/views/dialogs/UploadConfirmDialog.tsx",
130+
"src/components/views/dialogs/security/SetupEncryptionDialog.tsx",
131+
"src/components/views/elements/AddressTile.tsx",
132+
"src/components/views/elements/AppWarning.tsx",
133+
"src/components/views/elements/SSOButtons.tsx",
134+
"src/components/views/messages/MAudioBody.tsx",
135+
"src/components/views/messages/MImageBody.tsx",
136+
"src/components/views/messages/MFileBody.tsx",
137+
"src/components/views/messages/MStickerBody.tsx",
138+
"src/components/views/messages/MVideoBody.tsx",
139+
"src/components/views/messages/MVoiceMessageBody.tsx",
140+
"src/components/views/right_panel/EncryptionPanel.tsx",
141+
"src/components/views/rooms/EntityTile.tsx",
142+
"src/components/views/rooms/LinkPreviewGroup.tsx",
143+
"src/components/views/rooms/MemberList.tsx",
144+
"src/components/views/rooms/MessageComposer.tsx",
145+
"src/components/views/rooms/ReplyPreview.tsx",
146+
"src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx",
147+
"src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx"
148+
],
149+
rules: {
150+
"@typescript-eslint/no-var-requires": "off",
151+
},
152+
}
153+
],
86154
settings: {
87155
react: {
88156
version: "detect",

.github/codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
codecov:
2+
allow_coverage_offsets: True
3+
coverage:
4+
status:
5+
project: off
6+
patch: off
7+
comment:
8+
layout: "diff, files"
9+
behavior: default
10+
require_changes: false
11+
require_base: no
12+
require_head: no

.github/workflows/develop.yml renamed to .github/workflows/end-to-end-tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Develop
1+
name: End-to-end Tests
22
on:
33
# These tests won't work for non-develop branches at the moment as they
44
# won't pull in the right versions of other repos, so they're only enabled
@@ -11,6 +11,7 @@ jobs:
1111
end-to-end:
1212
runs-on: ubuntu-latest
1313
env:
14+
# This must be set for fetchdep.sh to get the right branch
1415
PR_NUMBER: ${{github.event.number}}
1516
container: vectorim/element-web-ci-e2etests-env:latest
1617
steps:

.github/workflows/layered-build.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
# Produce a 'layered build' (a build of element-web with this version of
2+
# react-sdk) and output it as an artifact
13
name: Layered Preview Build
24
on:
35
pull_request:
46
jobs:
57
build:
68
runs-on: ubuntu-latest
79
env:
10+
# This must be set for fetchdep.sh to get the right branch
811
PR_NUMBER: ${{github.event.number}}
912
steps:
1013
- uses: actions/checkout@v2

.github/workflows/netlify.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Triggers after the layered build has finished, taking the artifact
2+
# and uploading it to netlify
13
name: Upload Preview Build to Netlify
24
on:
35
workflow_run:

.github/workflows/test_coverage.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test coverage
2+
on:
3+
pull_request: {}
4+
push:
5+
branches: [develop, main, master]
6+
jobs:
7+
test-coverage:
8+
runs-on: ubuntu-latest
9+
env:
10+
# This must be set for fetchdep.sh to get the right branch
11+
PR_NUMBER: ${{github.event.number}}
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Yarn cache
17+
uses: c-hive/gha-yarn-cache@v2
18+
19+
- name: Install Deps
20+
run: "./scripts/ci/install-deps.sh --ignore-scripts"
21+
22+
- name: Run tests with coverage
23+
run: "yarn install && yarn reskindex && yarn coverage"
24+
25+
- name: Upload coverage
26+
uses: codecov/codecov-action@v2
27+
with:
28+
fail_ci_if_error: false
29+
verbose: true

.github/workflows/typecheck.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
env:
9+
# This must be set for fetchdep.sh to get the right branch
910
PR_NUMBER: ${{github.event.number}}
1011
steps:
1112
- uses: actions/checkout@v2

.stylelintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,10 @@ module.exports = {
2323
// https://github.com/vector-im/element-web/issues/10544
2424
"ignoreAtRules": ["define-mixin"],
2525
}],
26+
// Disable `&_kind`-style selectors while our unused CSS approach is "Find & Replace All"
27+
// rather than a CI thing. Shorthand selectors are harder to detect when searching for a
28+
// class name. This regex is trying to *allow* anything except `&words`, such as `&::before`,
29+
// `&.mx_Class`, etc.
30+
"selector-nested-pattern": "^((&[ :.\\\[,])|([^&]))"
2631
}
2732
}

0 commit comments

Comments
 (0)