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

Commit 6b522cb

Browse files
committed
Merge branch 'develop' into travis/sssssssnake_case_config
2 parents f6fdfaa + 4e4ce65 commit 6b522cb

32 files changed

+1535
-176
lines changed

res/css/_components.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@import "./_font-sizes.scss";
55
@import "./_font-weights.scss";
66
@import "./_spacing.scss";
7+
@import "./components/views/beacon/_LeftPanelLiveShareWarning.scss";
78
@import "./components/views/location/_LocationShareMenu.scss";
89
@import "./components/views/location/_MapError.scss";
910
@import "./components/views/location/_ShareDialogButtons.scss";
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
Copyright 2022 The Matrix.org Foundation C.I.C.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
.mx_LeftPanelLiveShareWarning {
18+
width: 100%;
19+
box-sizing: border-box;
20+
21+
padding: $spacing-4;
22+
text-align: center;
23+
24+
background-color: $accent;
25+
color: #fff;
26+
font-size: $font-10px;
27+
28+
// panel backdrops overlay the whole sidepanel
29+
// go above to get hover for title
30+
z-index: 1;
31+
}

res/css/components/views/location/_ShareType.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ limitations under the License.
8484
border-radius: 50%;
8585

8686
&.Own {
87-
// color is set by user color class
88-
// generated from id
89-
border-color: currentColor;
87+
border-color: $accent;
9088
}
9189

9290
&.Live {

res/css/structures/_LeftPanel.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,20 @@ $roomListCollapsedWidth: 68px;
2323
}
2424
}
2525

26-
.mx_LeftPanel_wrapper {
26+
.mx_LeftPanel_outerWrapper {
2727
display: flex;
28+
flex-direction: column;
2829
max-width: 50%;
2930
position: relative;
3031

3132
// Contain the amount of layers rendered by constraining what actually needs re-layering via css
3233
contain: layout paint;
34+
}
35+
36+
.mx_LeftPanel_wrapper {
37+
display: flex;
38+
flex-direction: row;
39+
flex: 1;
3340

3441
.mx_LeftPanel_wrapper--user {
3542
background-color: $roomlist-bg-color;

res/css/structures/_MatrixChat.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ limitations under the License.
6363
}
6464

6565
/* not the left panel, and not the resize handle, so the roomview/groupview/... */
66-
.mx_MatrixChat > :not(.mx_LeftPanel):not(.mx_SpacePanel):not(.mx_ResizeHandle):not(.mx_LeftPanel_wrapper) {
66+
.mx_MatrixChat > :not(.mx_LeftPanel):not(.mx_SpacePanel):not(.mx_ResizeHandle):not(.mx_LeftPanel_outerWrapper) {
6767
background-color: $background;
6868

6969
flex: 1 1 0;

res/css/views/dialogs/_InviteDialog.scss

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,22 @@ limitations under the License.
275275
height: 600px;
276276
padding-left: 20px; // the design wants some padding on the left
277277

278-
.mx_InviteDialog_userSections {
279-
height: calc(100% - 115px); // mx_InviteDialog's height minus some for the upper and lower elements
278+
.mx_InviteDialog_addressBar {
279+
margin-right: 0;
280+
}
281+
282+
.mx_InviteDialog_content {
283+
padding-right: 20px; // same padding on the right
284+
285+
.mx_InviteDialog_userSections {
286+
height: calc(100% - 115px); // mx_InviteDialog's height minus some for the upper and lower elements
287+
padding-right: 0;
288+
289+
.mx_InviteDialog_section {
290+
padding-bottom: 0;
291+
margin-top: 12px;
292+
}
293+
}
280294
}
281295
}
282296

res/css/views/location/_LocationPicker.scss

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ limitations under the License.
6262
width: 31px;
6363
height: 31px;
6464
border-radius: 50%;
65-
background-color: $accent;
6665
filter: drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.2));
66+
background-color: currentColor;
6767

6868
display: flex;
6969
align-items: center;
@@ -87,7 +87,7 @@ limitations under the License.
8787
width: 9px;
8888
height: 5px;
8989
position: absolute;
90-
background-color: $accent;
90+
background-color: currentColor;
9191
}
9292
}
9393
}
@@ -135,3 +135,11 @@ limitations under the License.
135135
width: 100%;
136136
height: 48px;
137137
}
138+
139+
// live marker color is set by user color class
140+
// generated from userid
141+
// others are $accent
142+
.mx_MLocationBody_marker-Self,
143+
.mx_MLocationBody_marker-Pin {
144+
color: $accent;
145+
}

src/accessibility/KeyboardShortcuts.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ export enum KeyBindingAction {
4141
FormatBold = 'KeyBinding.toggleBoldInComposer',
4242
/** Set italics format the current selection */
4343
FormatItalics = 'KeyBinding.toggleItalicsInComposer',
44+
/** Insert link for current selection */
45+
FormatLink = 'KeyBinding.FormatLink',
46+
/** Set code format for current selection */
47+
FormatCode = 'KeyBinding.FormatCode',
4448
/** Format the current selection as quote */
4549
FormatQuote = 'KeyBinding.toggleQuoteInComposer',
4650
/** Undo the last editing */
@@ -210,6 +214,8 @@ export const CATEGORIES: Record<CategoryName, ICategory> = {
210214
KeyBindingAction.FormatBold,
211215
KeyBindingAction.FormatItalics,
212216
KeyBindingAction.FormatQuote,
217+
KeyBindingAction.FormatLink,
218+
KeyBindingAction.FormatCode,
213219
KeyBindingAction.EditUndo,
214220
KeyBindingAction.EditRedo,
215221
KeyBindingAction.MoveCursorToStart,
@@ -337,6 +343,21 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
337343
},
338344
displayName: _td("Toggle Quote"),
339345
},
346+
[KeyBindingAction.FormatCode]: {
347+
default: {
348+
ctrlOrCmdKey: true,
349+
key: Key.E,
350+
},
351+
displayName: _td("Toggle Code Block"),
352+
},
353+
[KeyBindingAction.FormatLink]: {
354+
default: {
355+
ctrlOrCmdKey: true,
356+
shiftKey: true,
357+
key: Key.L,
358+
},
359+
displayName: _td("Toggle Link"),
360+
},
340361
[KeyBindingAction.CancelReplyOrEdit]: {
341362
default: {
342363
key: Key.ESCAPE,

src/components/structures/LoggedInView.tsx

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ import { TimelineRenderingType } from "../../contexts/RoomContext";
7676
import { KeyBindingAction } from "../../accessibility/KeyboardShortcuts";
7777
import { SwitchSpacePayload } from "../../dispatcher/payloads/SwitchSpacePayload";
7878
import { IConfigOptions } from "../../IConfigOptions";
79+
import LeftPanelLiveShareWarning from '../views/beacon/LeftPanelLiveShareWarning';
7980

8081
// We need to fetch each pinned message individually (if we don't already have it)
8182
// so each pinned message may trigger a request. Limit the number per room for sanity.
@@ -690,8 +691,10 @@ class LoggedInView extends React.Component<IProps, IState> {
690691
>
691692
<ToastContainer />
692693
<div className={bodyClasses}>
693-
<div className='mx_LeftPanel_wrapper'>
694-
{ SettingsStore.getValue('TagPanel.enableTagPanel') &&
694+
<div className='mx_LeftPanel_outerWrapper'>
695+
<LeftPanelLiveShareWarning isMinimized={this.props.collapseLhs || false} />
696+
<div className='mx_LeftPanel_wrapper'>
697+
{ SettingsStore.getValue('TagPanel.enableTagPanel') &&
695698
(<div className="mx_GroupFilterPanelContainer">
696699
<BackdropPanel
697700
blurMultiplier={0.5}
@@ -700,26 +703,27 @@ class LoggedInView extends React.Component<IProps, IState> {
700703
<GroupFilterPanel />
701704
{ SettingsStore.getValue("feature_custom_tags") ? <CustomRoomTagPanel /> : null }
702705
</div>)
703-
}
704-
{ SpaceStore.spacesEnabled ? <>
706+
}
707+
{ SpaceStore.spacesEnabled ? <>
708+
<BackdropPanel
709+
blurMultiplier={0.5}
710+
backgroundImage={this.state.backgroundImage}
711+
/>
712+
<SpacePanel />
713+
</> : null }
705714
<BackdropPanel
706-
blurMultiplier={0.5}
707715
backgroundImage={this.state.backgroundImage}
708716
/>
709-
<SpacePanel />
710-
</> : null }
711-
<BackdropPanel
712-
backgroundImage={this.state.backgroundImage}
713-
/>
714-
<div
715-
className="mx_LeftPanel_wrapper--user"
716-
ref={this._resizeContainer}
717-
data-collapsed={this.props.collapseLhs ? true : undefined}
718-
>
719-
<LeftPanel
720-
isMinimized={this.props.collapseLhs || false}
721-
resizeNotifier={this.props.resizeNotifier}
722-
/>
717+
<div
718+
className="mx_LeftPanel_wrapper--user"
719+
ref={this._resizeContainer}
720+
data-collapsed={this.props.collapseLhs ? true : undefined}
721+
>
722+
<LeftPanel
723+
isMinimized={this.props.collapseLhs || false}
724+
resizeNotifier={this.props.resizeNotifier}
725+
/>
726+
</div>
723727
</div>
724728
</div>
725729
<ResizeHandle passRef={this.resizeHandler} id="lp-resizer" />

src/components/structures/MatrixChat.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ import { DoAfterSyncPreparedPayload } from '../../dispatcher/payloads/DoAfterSyn
133133
import { ViewStartChatOrReusePayload } from '../../dispatcher/payloads/ViewStartChatOrReusePayload';
134134
import { IConfigOptions } from "../../IConfigOptions";
135135
import { SnakedObject } from "../../utils/SnakedObject";
136+
import InfoDialog from '../views/dialogs/InfoDialog';
136137

137138
// legacy export
138139
export { default as Views } from "../../Views";
@@ -1460,6 +1461,36 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
14601461
showNotificationsToast(false);
14611462
}
14621463

1464+
if (!localStorage.getItem("mx_seen_feature_thread_experimental")) {
1465+
setTimeout(() => {
1466+
if (SettingsStore.getValue("feature_thread") && SdkConfig.get()['showLabsSettings']) {
1467+
Modal.createDialog(InfoDialog, {
1468+
title: _t("Threads are no longer experimental! 🎉"),
1469+
description: <>
1470+
<p>
1471+
{ _t("We’ve recently introduced key stability "
1472+
+ "improvements for Threads, which also means "
1473+
+ "phasing out support for experimental Threads.") }
1474+
</p>
1475+
<p>
1476+
{ _t("All thread events created during the "
1477+
+ "experimental period will now be rendered in "
1478+
+ "the room timeline and displayed as replies. "
1479+
+ "This is a one-off transition. Threads are now "
1480+
+ "part of the Matrix specification.") }
1481+
</p>
1482+
<p>
1483+
{ _t("Thank you for helping us testing Threads!") }
1484+
</p>
1485+
</>,
1486+
onFinished: () => {
1487+
localStorage.setItem("mx_seen_feature_thread_experimental", "true");
1488+
},
1489+
});
1490+
}
1491+
}, 1 * 60 * 1000); // show after 1 minute to not overload user on launch
1492+
}
1493+
14631494
if (!localStorage.getItem("mx_seen_feature_spotlight_toast")) {
14641495
setTimeout(() => {
14651496
// Skip the toast if the beta is already enabled or the user has changed the setting from default

0 commit comments

Comments
 (0)