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

Commit 7310d35

Browse files
committed
Merge branch 'develop' into gsouquet/benchmark-tracking
2 parents 011a2f2 + 419baeb commit 7310d35

File tree

24 files changed

+314
-208
lines changed

24 files changed

+314
-208
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"dependencies": {
5656
"@babel/runtime": "^7.12.5",
5757
"await-lock": "^2.1.0",
58-
"blueimp-canvas-to-blob": "^3.28.0",
5958
"browser-encrypt-attachment": "^0.3.0",
6059
"browser-request": "^0.3.3",
6160
"cheerio": "^1.0.0-rc.9",
@@ -88,7 +87,6 @@
8887
"png-chunks-extract": "^1.0.0",
8988
"prop-types": "^15.7.2",
9089
"qrcode": "^1.4.4",
91-
"qs": "^6.9.6",
9290
"re-resizable": "^6.9.0",
9391
"react": "^17.0.2",
9492
"react-beautiful-dnd": "^4.0.1",
@@ -99,7 +97,6 @@
9997
"rfc4648": "^1.4.0",
10098
"sanitize-html": "^2.3.2",
10199
"tar-js": "^0.3.0",
102-
"text-encoding-utf-8": "^1.0.2",
103100
"url": "^0.11.0",
104101
"what-input": "^5.2.10",
105102
"zxcvbn": "^4.4.2"

res/css/structures/_SpaceRoomView.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ $SpaceRoomViewInnerWidth: 428px;
328328
font-size: $font-15px;
329329
margin-top: 12px;
330330
margin-bottom: 16px;
331-
white-space: pre;
331+
white-space: pre-wrap;
332+
word-wrap: break-word;
332333
}
333334

334335
> hr {

res/css/views/dialogs/_InviteDialog.scss

Lines changed: 93 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ limitations under the License.
1717
.mx_InviteDialog_addressBar {
1818
display: flex;
1919
flex-direction: row;
20+
// Right margin for the design. We could apply this to the whole dialog, but then the scrollbar
21+
// for the user section gets weird.
22+
margin: 8px 45px 0 0;
2023

2124
.mx_InviteDialog_editor {
2225
flex: 1;
@@ -73,7 +76,7 @@ limitations under the License.
7376
}
7477

7578
.mx_InviteDialog_section {
76-
padding-bottom: 10px;
79+
padding-bottom: 4px;
7780

7881
h3 {
7982
font-size: $font-12px;
@@ -82,6 +85,14 @@ limitations under the License.
8285
text-transform: uppercase;
8386
}
8487

88+
> p {
89+
margin: 0;
90+
}
91+
92+
> span {
93+
color: $primary-fg-color;
94+
}
95+
8596
.mx_InviteDialog_subname {
8697
margin-bottom: 10px;
8798
margin-top: -10px; // HACK: Positioning with margins is bad
@@ -90,6 +101,63 @@ limitations under the License.
90101
}
91102
}
92103

104+
.mx_InviteDialog_section_hidden_suggestions_disclaimer {
105+
padding: 8px 0 16px 0;
106+
font-size: $font-14px;
107+
108+
> span {
109+
color: $primary-fg-color;
110+
font-weight: 600;
111+
}
112+
113+
> p {
114+
margin: 0;
115+
}
116+
}
117+
118+
.mx_InviteDialog_footer {
119+
border-top: 1px solid $input-border-color;
120+
121+
> h3 {
122+
margin: 12px 0;
123+
font-size: $font-12px;
124+
color: $muted-fg-color;
125+
font-weight: bold;
126+
text-transform: uppercase;
127+
}
128+
129+
.mx_InviteDialog_footer_link {
130+
display: flex;
131+
justify-content: space-between;
132+
border-radius: 4px;
133+
border: solid 1px $light-fg-color;
134+
padding: 8px;
135+
136+
> a {
137+
text-decoration: none;
138+
flex-shrink: 1;
139+
overflow: hidden;
140+
text-overflow: ellipsis;
141+
}
142+
}
143+
144+
.mx_InviteDialog_footer_link_copy {
145+
flex-shrink: 0;
146+
cursor: pointer;
147+
margin-left: 20px;
148+
display: inherit;
149+
150+
> div {
151+
mask-image: url($copy-button-url);
152+
background-color: $message-action-bar-fg-color;
153+
margin-left: 5px;
154+
width: 20px;
155+
height: 20px;
156+
background-repeat: no-repeat;
157+
}
158+
}
159+
}
160+
93161
.mx_InviteDialog_roomTile {
94162
cursor: pointer;
95163
padding: 5px 10px;
@@ -142,6 +210,7 @@ limitations under the License.
142210

143211
.mx_InviteDialog_roomTile_nameStack {
144212
display: inline-block;
213+
overflow: hidden;
145214
}
146215

147216
.mx_InviteDialog_roomTile_name {
@@ -157,6 +226,13 @@ limitations under the License.
157226
margin-left: 7px;
158227
}
159228

229+
.mx_InviteDialog_roomTile_name,
230+
.mx_InviteDialog_roomTile_userId {
231+
overflow: hidden;
232+
text-overflow: ellipsis;
233+
white-space: nowrap;
234+
}
235+
160236
.mx_InviteDialog_roomTile_time {
161237
text-align: right;
162238
font-size: $font-12px;
@@ -212,22 +288,29 @@ limitations under the License.
212288

213289
.mx_InviteDialog {
214290
// Prevent the dialog from jumping around randomly when elements change.
215-
height: 590px;
291+
height: 600px;
216292
padding-left: 20px; // the design wants some padding on the left
293+
display: flex;
294+
flex-direction: column;
295+
296+
.mx_InviteDialog_content {
297+
overflow: hidden;
298+
}
217299
}
218300

219301
.mx_InviteDialog_userSections {
220-
margin-top: 10px;
302+
margin-top: 4px;
221303
overflow-y: auto;
222-
padding-right: 45px;
223-
height: 455px; // mx_InviteDialog's height minus some for the upper elements
304+
padding: 0 45px 4px 0;
305+
height: calc(100% - 115px); // mx_InviteDialog's height minus some for the upper and lower elements
224306
}
225307

226-
// Right margin for the design. We could apply this to the whole dialog, but then the scrollbar
227-
// for the user section gets weird.
228-
.mx_InviteDialog_helpText,
229-
.mx_InviteDialog_addressBar {
230-
margin-right: 45px;
308+
.mx_InviteDialog_hasFooter .mx_InviteDialog_userSections {
309+
height: calc(100% - 175px);
310+
}
311+
312+
.mx_InviteDialog_helpText {
313+
margin: 0;
231314
}
232315

233316
.mx_InviteDialog_helpText .mx_AccessibleButton_kind_link {

res/css/views/messages/_SenderProfile.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
.mx_SenderProfile_name {
17+
.mx_SenderProfile_displayName {
1818
font-weight: 600;
1919
}
2020

21+
.mx_SenderProfile_mxid {
22+
font-weight: 600;
23+
font-size: 1.1rem;
24+
margin-left: 5px;
25+
opacity: 0.5; // Match mx_TextualEvent
26+
}

res/css/views/rooms/_IRCLayout.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ $irc-line-height: $font-18px;
178178
overflow: hidden;
179179
display: flex;
180180

181-
> .mx_SenderProfile_name {
181+
> .mx_SenderProfile_displayName {
182182
overflow: hidden;
183183
text-overflow: ellipsis;
184184
min-width: var(--name-width);
@@ -207,7 +207,7 @@ $irc-line-height: $font-18px;
207207
background: transparent;
208208

209209
> span {
210-
> .mx_SenderProfile_name {
210+
> .mx_SenderProfile_displayName {
211211
min-width: inherit;
212212
}
213213
}

src/ContentMessages.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import encrypt from "browser-encrypt-attachment";
2828
import extractPngChunks from "png-chunks-extract";
2929
import Spinner from "./components/views/elements/Spinner";
3030

31-
// Polyfill for Canvas.toBlob API using Canvas.toDataURL
32-
import "blueimp-canvas-to-blob";
3331
import { Action } from "./dispatcher/actions";
3432
import CountlyAnalytics from "./CountlyAnalytics";
3533
import {

src/CountlyAnalytics.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ import {sleep} from "./utils/promise";
2424
import RoomViewStore from "./stores/RoomViewStore";
2525
import { Action } from "./dispatcher/actions";
2626

27-
// polyfill textencoder if necessary
28-
import * as TextEncodingUtf8 from 'text-encoding-utf-8';
29-
let TextEncoder = window.TextEncoder;
30-
if (!TextEncoder) {
31-
TextEncoder = TextEncodingUtf8.TextEncoder;
32-
}
33-
3427
const INACTIVITY_TIME = 20; // seconds
3528
const HEARTBEAT_INTERVAL = 5_000; // ms
3629
const SESSION_UPDATE_INTERVAL = 60; // seconds

src/components/structures/SpaceRoomDirectory.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ export const SpaceHierarchy: React.FC<IHierarchyProps> = ({
520520
setError("Failed to update some suggestions. Try again later");
521521
}
522522
setSaving(false);
523+
setSelected(new Map());
523524
}}
524525
kind="primary_outline"
525526
disabled={disabled}

src/components/structures/SpaceRoomView.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import RoomTopic from "../views/elements/RoomTopic";
2828
import InlineSpinner from "../views/elements/InlineSpinner";
2929
import {inviteMultipleToRoom, showRoomInviteDialog} from "../../RoomInvite";
3030
import {useRoomMembers} from "../../hooks/useRoomMembers";
31-
import createRoom, {IOpts, Preset} from "../../createRoom";
31+
import createRoom, {IOpts} from "../../createRoom";
3232
import Field from "../views/elements/Field";
3333
import {useEventEmitter} from "../../hooks/useEventEmitter";
3434
import withValidation from "../views/elements/Validation";
@@ -65,6 +65,7 @@ import dis from "../../dispatcher/dispatcher";
6565
import Modal from "../../Modal";
6666
import BetaFeedbackDialog from "../views/dialogs/BetaFeedbackDialog";
6767
import SdkConfig from "../../SdkConfig";
68+
import { Preset } from "matrix-js-sdk/src/@types/partials";
6869

6970
interface IProps {
7071
space: Room;

src/components/views/dialogs/CreateRoomDialog.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,23 @@ See the License for the specific language governing permissions and
1515
limitations under the License.
1616
*/
1717

18-
import React, {ChangeEvent, createRef, KeyboardEvent, SyntheticEvent} from "react";
19-
import {Room} from "matrix-js-sdk/src/models/room";
18+
import React, { ChangeEvent, createRef, KeyboardEvent, SyntheticEvent } from "react";
19+
import { Room } from "matrix-js-sdk/src/models/room";
2020

2121
import SdkConfig from '../../../SdkConfig';
22-
import withValidation, {IFieldState} from '../elements/Validation';
23-
import {_t} from '../../../languageHandler';
24-
import {MatrixClientPeg} from '../../../MatrixClientPeg';
25-
import {Key} from "../../../Keyboard";
26-
import {IOpts, Preset, privateShouldBeEncrypted, Visibility} from "../../../createRoom";
27-
import {CommunityPrototypeStore} from "../../../stores/CommunityPrototypeStore";
28-
import {replaceableComponent} from "../../../utils/replaceableComponent";
22+
import withValidation, { IFieldState } from '../elements/Validation';
23+
import { _t } from '../../../languageHandler';
24+
import { MatrixClientPeg } from '../../../MatrixClientPeg';
25+
import { Key } from "../../../Keyboard";
26+
import { IOpts, privateShouldBeEncrypted } from "../../../createRoom";
27+
import { CommunityPrototypeStore } from "../../../stores/CommunityPrototypeStore";
28+
import { replaceableComponent } from "../../../utils/replaceableComponent";
2929
import Field from "../elements/Field";
3030
import RoomAliasField from "../elements/RoomAliasField";
3131
import LabelledToggleSwitch from "../elements/LabelledToggleSwitch";
3232
import DialogButtons from "../elements/DialogButtons";
3333
import BaseDialog from "../dialogs/BaseDialog";
34+
import { Preset, Visibility } from "matrix-js-sdk/src/@types/partials";
3435

3536
interface IProps {
3637
defaultPublic?: boolean;
@@ -72,7 +73,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
7273
canChangeEncryption: true,
7374
};
7475

75-
MatrixClientPeg.get().doesServerForceEncryptionForPreset("private")
76+
MatrixClientPeg.get().doesServerForceEncryptionForPreset(Preset.PrivateChat)
7677
.then(isForced => this.setState({ canChangeEncryption: !isForced }));
7778
}
7879

0 commit comments

Comments
 (0)