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

Commit 0a8cc41

Browse files
authored
Merge branch 'develop' into hs/bridge-info
2 parents b1c2887 + 6ef6b59 commit 0a8cc41

File tree

203 files changed

+5326
-2491
lines changed

Some content is hidden

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

203 files changed

+5326
-2491
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ matrix-react-sdk
44
This is a react-based SDK for inserting a Matrix chat/voip client into a web page.
55

66
This package provides the React components needed to build a Matrix web client
7-
using React. It is not useable in isolation, and instead must must be used from
7+
using React. It is not useable in isolation, and instead must be used from
88
a 'skin'. A skin provides:
99
* Customised implementations of presentation components.
1010
* Custom CSS
@@ -82,7 +82,7 @@ practices that anyone working with the SDK needs to be be aware of and uphold:
8282
'Stealing' styling information from other components (including parents)
8383
is not cool, as it breaks the independence of the components.
8484

85-
* CSS classes are named with an app-specific namespacing prefix to try to avoid
85+
* CSS classes are named with an app-specific name-spacing prefix to try to avoid
8686
CSS collisions. The base skin shipped by Matrix.org with the matrix-react-sdk
8787
uses the naming prefix "mx_". A company called Yoyodyne Inc might use a
8888
prefix like "yy_" for its app-specific classes.
@@ -107,7 +107,7 @@ practices that anyone working with the SDK needs to be be aware of and uphold:
107107
.mx_RoomTile {} in RoomList.css - only RoomTile.css is allowed to define its
108108
own CSS. Instead, say .mx_RoomList .mx_RoomTile {} to scope the override
109109
only to the context of RoomList views. N.B. overrides should be relatively
110-
rare as in general CSS inheritence should be enough.
110+
rare as in general CSS inheritance should be enough.
111111

112112
* Components should render only within the bounding box of their outermost DOM
113113
element. Page-absolute positioning and negative CSS margins and similar are

code_style.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,6 @@ React
174174
<Foo onClick={this.onFooClick}> // Best, if onFooClick would do anything other than directly calling doStuff
175175
```
176176

177-
Not doing so is acceptable in a single case: in function-refs:
178-
179-
```jsx
180-
<Foo ref={(self) => this.component = self}>
181-
```
182-
183177
- Prefer classes that extend `React.Component` (or `React.PureComponent`) instead of `React.createClass`
184178
- You can avoid the need to bind handler functions by using [property initializers](https://reactjs.org/docs/react-component.html#constructor):
185179

@@ -208,3 +202,5 @@ React
208202
```
209203
- Think about whether your component really needs state: are you duplicating
210204
information in component state that could be derived from the model?
205+
206+
- Avoid things marked as Legacy or Deprecated in React 16 (e.g string refs and legacy contexts)

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && ./scripts/gen-i18n.js && node scripts/compare-file.js src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
4444
"build": "yarn reskindex && yarn start:init",
4545
"build:watch": "babel src -w --skip-initial-build -d lib --source-maps --copy-files",
46-
"emoji-data-strip": "node scripts/emoji-data-strip.js",
4746
"start": "yarn start:init && yarn start:all",
4847
"start:all": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n build,reskindex \"yarn build:watch\" \"yarn reskindex:watch\"",
4948
"start:init": "babel src -d lib --source-maps --copy-files",
@@ -75,7 +74,7 @@
7574
"file-saver": "^1.3.3",
7675
"filesize": "3.5.6",
7776
"flux": "2.1.1",
78-
"focus-trap-react": "^3.0.5",
77+
"react-focus-lock": "^2.2.1",
7978
"focus-visible": "^5.0.2",
8079
"fuse.js": "^2.2.0",
8180
"gemini-scrollbar": "github:matrix-org/gemini-scrollbar#91e1e566",
@@ -88,7 +87,7 @@
8887
"linkifyjs": "^2.1.6",
8988
"lodash": "^4.17.14",
9089
"lolex": "4.2",
91-
"matrix-js-sdk": "2.4.6",
90+
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
9291
"optimist": "^0.6.1",
9392
"pako": "^1.0.5",
9493
"png-chunks-extract": "^1.0.0",
@@ -110,6 +109,7 @@
110109
"text-encoding-utf-8": "^1.0.1",
111110
"url": "^0.11.0",
112111
"velocity-animate": "^1.5.2",
112+
"what-input": "^5.2.6",
113113
"whatwg-fetch": "^1.1.1",
114114
"zxcvbn": "^4.4.2"
115115
},

res/css/_components.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
@import "./structures/_SearchBox.scss";
2525
@import "./structures/_TabbedView.scss";
2626
@import "./structures/_TagPanel.scss";
27-
@import "./structures/_TagPanelButtons.scss";
2827
@import "./structures/_ToastContainer.scss";
2928
@import "./structures/_TopLeftMenuButton.scss";
3029
@import "./structures/_UploadBar.scss";
@@ -64,7 +63,6 @@
6463
@import "./views/dialogs/_GroupAddressPicker.scss";
6564
@import "./views/dialogs/_IncomingSasDialog.scss";
6665
@import "./views/dialogs/_MessageEditHistoryDialog.scss";
67-
@import "./views/dialogs/_RestoreKeyBackupDialog.scss";
6866
@import "./views/dialogs/_RoomSettingsDialog.scss";
6967
@import "./views/dialogs/_RoomUpgradeDialog.scss";
7068
@import "./views/dialogs/_RoomUpgradeWarningDialog.scss";
@@ -83,6 +81,8 @@
8381
@import "./views/dialogs/keybackup/_CreateKeyBackupDialog.scss";
8482
@import "./views/dialogs/keybackup/_KeyBackupFailedDialog.scss";
8583
@import "./views/dialogs/keybackup/_RestoreKeyBackupDialog.scss";
84+
@import "./views/dialogs/secretstorage/_AccessSecretStorageDialog.scss";
85+
@import "./views/dialogs/secretstorage/_CreateSecretStorageDialog.scss";
8686
@import "./views/directory/_NetworkDropdown.scss";
8787
@import "./views/elements/_AccessibleButton.scss";
8888
@import "./views/elements/_AddressSelector.scss";
@@ -173,7 +173,10 @@
173173
@import "./views/rooms/_SendMessageComposer.scss";
174174
@import "./views/rooms/_Stickers.scss";
175175
@import "./views/rooms/_TopUnreadMessagesBar.scss";
176+
@import "./views/rooms/_UserOnlineDot.scss";
176177
@import "./views/rooms/_WhoIsTypingTile.scss";
178+
@import "./views/settings/_AvatarSetting.scss";
179+
@import "./views/settings/_CrossSigningPanel.scss";
177180
@import "./views/settings/_DevicesPanel.scss";
178181
@import "./views/settings/_EmailAddresses.scss";
179182
@import "./views/settings/_IntegrationManager.scss";

res/css/structures/_CustomRoomTagPanel.scss

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ limitations under the License.
2626

2727
.mx_CustomRoomTagPanel_scroller {
2828
max-height: inherit;
29+
display: flex;
30+
flex-direction: column;
31+
align-items: center;
2932
}
3033

3134
.mx_CustomRoomTagPanel .mx_AccessibleButton {
32-
margin: 9px auto;
35+
margin: 0 auto;
3336
width: 40px;
37+
padding: 10px 0 9px 0;
38+
position: relative;
3439
}
3540

3641
.mx_CustomRoomTagPanel .mx_BaseAvatar_image {
@@ -39,7 +44,13 @@ limitations under the License.
3944
height: 40px;
4045
}
4146

42-
.mx_CustomRoomTagPanel .mx_AccessibleButton.CustomRoomTagPanel_tileSelected .mx_BaseAvatar_image {
43-
border: 3px solid $warning-color;
44-
border-radius: 40px;
47+
.mx_CustomRoomTagPanel .mx_AccessibleButton.CustomRoomTagPanel_tileSelected::before {
48+
content: '';
49+
height: 56px;
50+
background-color: $accent-color-alt;
51+
width: 5px;
52+
position: absolute;
53+
left: -15px;
54+
border-radius: 0 3px 3px 0;
55+
top: 2px; // 10 [padding-top] - (56 - 40)/2
4556
}

res/css/structures/_TagPanel.scss

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ limitations under the License.
6868
}
6969
.mx_TagPanel .mx_TagPanel_tagTileContainer > div {
7070
height: 40px;
71-
padding: 5px 0 4px 0;
71+
padding: 10px 0 9px 0;
7272
}
7373

7474
.mx_TagPanel .mx_TagTile {
@@ -82,21 +82,39 @@ limitations under the License.
8282
// opacity: 1;
8383
}
8484

85-
.mx_TagPanel .mx_TagTile.mx_TagTile_selected .mx_TagTile_avatar .mx_BaseAvatar {
86-
background-color: $accent-color;
87-
border-radius: 40px;
88-
89-
/* In case this is a "initial" avatar */
90-
display: block;
85+
.mx_TagPanel .mx_TagTile_plus {
86+
margin-bottom: 12px;
9187
height: 40px;
9288
width: 40px;
93-
}
94-
95-
.mx_TagPanel .mx_TagTile_selected .mx_BaseAvatar_image {
96-
border: 3px solid $accent-color;
97-
height: 40px;
98-
width: 40px;
99-
box-sizing: border-box;
89+
border-radius: 20px;
90+
background-color: $roomheader-addroom-bg-color;
91+
position: relative;
92+
/* overwrite mx_RoleButton inline-block */
93+
display: block !important;
94+
95+
&::before {
96+
background-color: $roomheader-addroom-fg-color;
97+
mask-image: url('$(res)/img/feather-customised/plus.svg');
98+
mask-position: center;
99+
mask-repeat: no-repeat;
100+
content: '';
101+
position: absolute;
102+
top: 0;
103+
bottom: 0;
104+
left: 0;
105+
right: 0;
106+
}
107+
}
108+
109+
.mx_TagPanel .mx_TagTile.mx_TagTile_selected::before {
110+
content: '';
111+
height: 56px;
112+
background-color: $accent-color;
113+
width: 5px;
114+
position: absolute;
115+
left: -15px;
116+
border-radius: 0 3px 3px 0;
117+
top: -8px; // (56 - 40)/2
100118
}
101119

102120
.mx_TagPanel .mx_TagTile.mx_AccessibleButton:focus {

res/css/structures/_TagPanelButtons.scss

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

res/css/views/avatars/_BaseAvatar.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ limitations under the License.
4040
}
4141

4242
.mx_BaseAvatar_image {
43+
object-fit: cover;
4344
border-radius: 40px;
4445
vertical-align: top;
4546
background-color: $avatar-bg-color;

res/css/views/context_menus/_TopLeftMenu.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ limitations under the License.
5353
mask-image: url('$(res)/img/feather-customised/home.svg');
5454
}
5555

56+
.mx_TopLeftMenu_icon_help::after {
57+
mask-image: url('$(res)/img/feather-customised/life-buoy.svg');
58+
}
59+
5660
.mx_TopLeftMenu_icon_settings::after {
5761
mask-image: url('$(res)/img/feather-customised/settings.svg');
5862
}

res/css/views/dialogs/_RoomSettingsDialog.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ limitations under the License.
4848
padding-right: 80px;
4949
}
5050

51+
// show a different AvatarSetting placeholder for RoomProfileSettings which is basically a clone of ProfileSettings
52+
.mx_RoomSettingsDialog .mx_AvatarSetting_avatar .mx_AvatarSetting_avatarPlaceholder::before {
53+
mask: url("$(res)/img/feather-customised/image.svg");
54+
mask-repeat: no-repeat;
55+
mask-size: 36px;
56+
mask-position: center;
5157

5258
.mx_RoomSettingsDialog_BridgeList {
5359
padding: 0;
@@ -58,4 +64,5 @@ limitations under the License.
5864
padding: 0;
5965
margin: 0;
6066
border-bottom: 1px solid $panel-divider-color;
61-
}
67+
}
68+

0 commit comments

Comments
 (0)