Skip to content
This repository was archived by the owner on May 18, 2025. It is now read-only.

Commit 6250d9b

Browse files
authored
Merge branch 'develop' into t3chguy/ts/4
2 parents 231b404 + 9d6d8fc commit 6250d9b

File tree

693 files changed

+4989
-5251
lines changed

Some content is hidden

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

693 files changed

+4989
-5251
lines changed

.eslintrc.js

Lines changed: 29 additions & 9 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,21 +17,39 @@ module.exports = {
1517
"prefer-promise-reject-errors": "off",
1618
"no-async-promise-executor": "off",
1719
"quotes": "off",
18-
},
20+
"no-extra-boolean-cast": "off",
1921

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"],
27+
},
2028
overrides: [{
21-
"files": ["src/**/*.{ts,tsx}", "test/**/*.{ts,tsx}"],
22-
"extends": ["matrix-org/ts"],
23-
"rules": {
29+
files: [
30+
"src/**/*.{ts,tsx}",
31+
"test/**/*.{ts,tsx}",
32+
],
33+
extends: [
34+
"plugin:matrix-org/typescript",
35+
"plugin:matrix-org/react",
36+
],
37+
rules: {
38+
// Things we do that break the ideal style
39+
"prefer-promise-reject-errors": "off",
40+
"quotes": "off",
41+
"no-extra-boolean-cast": "off",
42+
43+
// Remove Babel things manually due to override limitations
44+
"@babel/no-invalid-this": ["off"],
45+
2446
// We're okay being explicit at the moment
2547
"@typescript-eslint/no-empty-interface": "off",
2648
// We disable this while we're transitioning
2749
"@typescript-eslint/no-explicit-any": "off",
2850
// We'd rather not do this but we do
2951
"@typescript-eslint/ban-ts-comment": "off",
3052

31-
"quotes": "off",
32-
"no-extra-boolean-cast": "off",
3353
"no-restricted-properties": [
3454
"error",
3555
...buildRestrictedPropertiesOptions(

.flowconfig

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

babel.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ module.exports = {
1010
],
1111
}],
1212
"@babel/preset-typescript",
13-
"@babel/preset-flow",
1413
"@babel/preset-react",
1514
],
1615
"plugins": [
@@ -19,7 +18,6 @@ module.exports = {
1918
"@babel/plugin-proposal-numeric-separator",
2019
"@babel/plugin-proposal-class-properties",
2120
"@babel/plugin-proposal-object-rest-spread",
22-
"@babel/plugin-transform-flow-comments",
2321
"@babel/plugin-syntax-dynamic-import",
2422
"@babel/plugin-transform-runtime",
2523
],

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,16 @@
104104
"devDependencies": {
105105
"@babel/cli": "^7.12.10",
106106
"@babel/core": "^7.12.10",
107+
"@babel/eslint-parser": "^7.12.10",
108+
"@babel/eslint-plugin": "^7.12.10",
107109
"@babel/parser": "^7.12.11",
108110
"@babel/plugin-proposal-class-properties": "^7.12.1",
109111
"@babel/plugin-proposal-decorators": "^7.12.12",
110112
"@babel/plugin-proposal-export-default-from": "^7.12.1",
111113
"@babel/plugin-proposal-numeric-separator": "^7.12.7",
112114
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
113-
"@babel/plugin-transform-flow-comments": "^7.12.1",
114115
"@babel/plugin-transform-runtime": "^7.12.10",
115116
"@babel/preset-env": "^7.12.11",
116-
"@babel/preset-flow": "^7.12.1",
117117
"@babel/preset-react": "^7.12.10",
118118
"@babel/preset-typescript": "^7.12.7",
119119
"@babel/register": "^7.12.10",
@@ -139,18 +139,16 @@
139139
"@types/react-transition-group": "^4.4.0",
140140
"@types/sanitize-html": "^2.3.1",
141141
"@types/zxcvbn": "^4.4.0",
142-
"@typescript-eslint/eslint-plugin": "^4.14.0",
143-
"@typescript-eslint/parser": "^4.14.0",
142+
"@typescript-eslint/eslint-plugin": "^4.17.0",
143+
"@typescript-eslint/parser": "^4.17.0",
144144
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.1",
145-
"babel-eslint": "^10.1.0",
146145
"babel-jest": "^26.6.3",
147146
"chokidar": "^3.5.1",
148147
"concurrently": "^5.3.0",
149148
"enzyme": "^3.11.0",
150149
"eslint": "7.18.0",
151-
"eslint-config-matrix-org": "^0.2.0",
152-
"eslint-plugin-babel": "^5.3.1",
153-
"eslint-plugin-flowtype": "^5.2.0",
150+
"eslint-config-google": "^0.14.0",
151+
"eslint-plugin-matrix-org": "github:matrix-org/eslint-plugin-matrix-org#main",
154152
"eslint-plugin-react": "^7.22.0",
155153
"eslint-plugin-react-hooks": "^4.2.0",
156154
"glob": "^7.1.6",

res/css/structures/_LeftPanel.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,29 @@ $roomListCollapsedWidth: 68px;
111111
}
112112
}
113113

114+
.mx_LeftPanel_dialPadButton {
115+
width: 32px;
116+
height: 32px;
117+
border-radius: 8px;
118+
background-color: $roomlist-button-bg-color;
119+
position: relative;
120+
margin-left: 8px;
121+
122+
&::before {
123+
content: '';
124+
position: absolute;
125+
top: 8px;
126+
left: 8px;
127+
width: 16px;
128+
height: 16px;
129+
mask-image: url('$(res)/img/element-icons/call/dialpad.svg');
130+
mask-position: center;
131+
mask-size: contain;
132+
mask-repeat: no-repeat;
133+
background: $secondary-fg-color;
134+
}
135+
}
136+
114137
.mx_LeftPanel_exploreButton {
115138
width: 32px;
116139
height: 32px;
@@ -185,6 +208,12 @@ $roomListCollapsedWidth: 68px;
185208
flex-direction: column;
186209
justify-content: center;
187210

211+
.mx_LeftPanel_dialPadButton {
212+
margin-left: 0;
213+
margin-top: 8px;
214+
background-color: transparent;
215+
}
216+
188217
.mx_LeftPanel_exploreButton {
189218
margin-left: 0;
190219
margin-top: 8px;

res/css/structures/_RoomStatusBar.scss

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ limitations under the License.
112112

113113
.mx_AccessibleButton {
114114
padding: 5px 10px;
115-
padding-left: 28px; // 16px for the icon, 2px margin to text, 10px regular padding
115+
padding-left: 30px; // 18px for the icon, 2px margin to text, 10px regular padding
116116
display: inline-block;
117117
position: relative;
118118

@@ -128,23 +128,21 @@ limitations under the License.
128128
mask-repeat: no-repeat;
129129
mask-position: center;
130130
mask-size: contain;
131+
width: 18px;
132+
height: 18px;
133+
top: 50%; // text sizes are dynamic
134+
transform: translateY(-50%);
131135
}
132136

133137
&.mx_RoomStatusBar_unsentCancelAllBtn::before {
134138
mask-image: url('$(res)/img/element-icons/trashcan.svg');
135-
width: 12px;
136-
height: 16px;
137-
top: calc(50% - 8px); // text sizes are dynamic
138139
}
139140

140141
&.mx_RoomStatusBar_unsentResendAllBtn {
141142
padding-left: 34px; // 28px from above, but +6px to account for the wider icon
142143

143144
&::before {
144145
mask-image: url('$(res)/img/element-icons/retry.svg');
145-
width: 18px;
146-
height: 18px;
147-
top: calc(50% - 9px); // text sizes are dynamic
148146
}
149147
}
150148
}

res/css/structures/_ToastContainer.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,15 @@ limitations under the License.
134134
.mx_Toast_buttons {
135135
float: right;
136136
display: flex;
137-
gap: 5px;
138137

139138
.mx_AccessibleButton {
140139
min-width: 96px;
141140
box-sizing: border-box;
142141
}
142+
143+
.mx_AccessibleButton + .mx_AccessibleButton {
144+
margin-left: 5px;
145+
}
143146
}
144147

145148
.mx_Toast_description {
Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
Copyright 2015, 2016 OpenMarket Ltd
3+
Copyright 2021 Michael Weimann <mail@michael-weimann.eu>
34
45
Licensed under the Apache License, Version 2.0 (the "License");
56
you may not use this file except in compliance with the License.
@@ -15,16 +16,69 @@ limitations under the License.
1516
*/
1617

1718
.mx_MessageContextMenu {
18-
padding: 6px;
19-
}
2019

21-
.mx_MessageContextMenu_field {
22-
display: block;
23-
padding: 3px 6px 3px 6px;
24-
cursor: pointer;
25-
white-space: nowrap;
26-
}
20+
.mx_IconizedContextMenu_icon {
21+
width: 16px;
22+
height: 16px;
23+
display: block;
24+
25+
&::before {
26+
content: '';
27+
width: 16px;
28+
height: 16px;
29+
display: block;
30+
mask-position: center;
31+
mask-size: contain;
32+
mask-repeat: no-repeat;
33+
background: $primary-fg-color;
34+
}
35+
}
36+
37+
.mx_MessageContextMenu_iconCollapse::before {
38+
mask-image: url('$(res)/img/element-icons/message/chevron-up.svg');
39+
}
40+
41+
.mx_MessageContextMenu_iconReport::before {
42+
mask-image: url('$(res)/img/element-icons/warning-badge.svg');
43+
}
44+
45+
.mx_MessageContextMenu_iconLink::before {
46+
mask-image: url('$(res)/img/element-icons/link.svg');
47+
}
48+
49+
.mx_MessageContextMenu_iconPermalink::before {
50+
mask-image: url('$(res)/img/element-icons/room/share.svg');
51+
}
52+
53+
.mx_MessageContextMenu_iconUnhidePreview::before {
54+
mask-image: url('$(res)/img/element-icons/settings/appearance.svg');
55+
}
56+
57+
.mx_MessageContextMenu_iconForward::before {
58+
mask-image: url('$(res)/img/element-icons/message/fwd.svg');
59+
}
60+
61+
.mx_MessageContextMenu_iconRedact::before {
62+
mask-image: url('$(res)/img/element-icons/trashcan.svg');
63+
}
64+
65+
.mx_MessageContextMenu_iconResend::before {
66+
mask-image: url('$(res)/img/element-icons/retry.svg');
67+
}
68+
69+
.mx_MessageContextMenu_iconSource::before {
70+
mask-image: url('$(res)/img/element-icons/room/format-bar/code.svg');
71+
}
72+
73+
.mx_MessageContextMenu_iconQuote::before {
74+
mask-image: url('$(res)/img/element-icons/room/format-bar/quote.svg');
75+
}
76+
77+
.mx_MessageContextMenu_iconPin::before {
78+
mask-image: url('$(res)/img/element-icons/room/pin-upright.svg');
79+
}
2780

28-
.mx_MessageContextMenu_field.mx_MessageContextMenu_fieldSet {
29-
font-weight: bold;
81+
.mx_MessageContextMenu_iconUnpin::before {
82+
mask-image: url('$(res)/img/element-icons/room/pin.svg');
83+
}
3084
}

res/css/views/dialogs/_ForwardDialog.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ limitations under the License.
3434
> .mx_ForwardDialog_preview {
3535
max-height: 30%;
3636
flex-shrink: 0;
37-
overflow: scroll;
37+
overflow-y: auto;
3838

3939
div {
4040
pointer-events: none;

res/css/views/messages/_TextualEvent.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@ limitations under the License.
1717
.mx_TextualEvent {
1818
opacity: 0.5;
1919
overflow-y: hidden;
20+
21+
a {
22+
color: $accent-color;
23+
cursor: pointer;
24+
}
2025
}

0 commit comments

Comments
 (0)