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

Commit 44776a1

Browse files
committed
Use a somewhat sane visual layout
1 parent 7d98740 commit 44776a1

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

res/css/views/right_panel/_TimelineCard.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2021 The Matrix.org Foundation C.I.C.
2+
Copyright 2021 - 2022 The Matrix.org Foundation C.I.C.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -35,6 +35,12 @@ limitations under the License.
3535
}
3636
}
3737

38+
.mx_TimelineCard_timeline {
39+
overflow: hidden;
40+
position: relative; // offset parent for jump to bottom button
41+
flex: 1;
42+
}
43+
3844
.mx_AutoHideScrollbar {
3945
padding-right: 10px;
4046
width: calc(100% - 10px);
@@ -119,9 +125,3 @@ limitations under the License.
119125
flex-basis: 48px; // 12 (padding on message list) + 36 (padding on event lines)
120126
}
121127
}
122-
123-
.mx_TimelineCard_timeline {
124-
overflow: hidden;
125-
position: relative; // offset parent for jump to bottom button
126-
flex: 1;
127-
}

res/css/views/rooms/_RoomPreviewBar.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2015, 2016 OpenMarket Ltd
2+
Copyright 2015 - 2022 The Matrix.org Foundation C.I.C.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -98,6 +98,14 @@ limitations under the License.
9898
}
9999
}
100100

101+
// With maximised widgets, the panel fits in better when rounded
102+
.mx_MainSplit_maximisedWidget .mx_RoomPreviewBar_panel {
103+
margin: $container-gap-width;
104+
margin-right: calc($container-gap-width / 2); // Shared with right panel
105+
margin-top: 0; // Already covered by apps drawer
106+
border-radius: 8px;
107+
}
108+
101109
.mx_RoomPreviewBar_dialog {
102110
margin: auto;
103111
box-sizing: content;

src/components/structures/RoomView.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,9 +2104,11 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
21042104
const showChatEffects = SettingsStore.getValue('showChatEffects');
21052105

21062106
let mainSplitBody;
2107+
let mainSplitContentClassName;
21072108
// Decide what to show in the main split
21082109
switch (this.state.mainSplitContentType) {
21092110
case MainSplitContentType.Timeline:
2111+
mainSplitContentClassName = "mx_MainSplit_timeline";
21102112
mainSplitBody = <>
21112113
<Measured
21122114
sensor={this.roomViewBody.current}
@@ -2126,6 +2128,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
21262128
</>;
21272129
break;
21282130
case MainSplitContentType.MaximisedWidget:
2131+
mainSplitContentClassName = "mx_MainSplit_maximisedWidget";
21292132
mainSplitBody = <>
21302133
<AppsDrawer
21312134
room={this.state.room}
@@ -2139,6 +2142,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
21392142
case MainSplitContentType.Video: {
21402143
const app = getVoiceChannel(this.state.room.roomId);
21412144
if (!app) break;
2145+
mainSplitContentClassName = "mx_MainSplit_video";
21422146
mainSplitBody = <AppTile
21432147
app={app}
21442148
room={this.state.room}
@@ -2150,6 +2154,8 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
21502154
/>;
21512155
}
21522156
}
2157+
const mainSplitContentClasses = classNames("mx_RoomView_body", mainSplitContentClassName);
2158+
21532159
let excludedRightPanelPhaseButtons = [RightPanelPhases.Timeline];
21542160
let onAppsClick = this.onAppsClick;
21552161
let onForgetClick = this.onForgetClick;
@@ -2165,6 +2171,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
21652171
onForgetClick = null;
21662172
onSearchClick = null;
21672173
}
2174+
21682175
return (
21692176
<RoomContext.Provider value={this.state}>
21702177
<main className={mainClasses} ref={this.roomView} onKeyDown={this.onReactKeyDown}>
@@ -2186,7 +2193,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
21862193
excludedRightPanelPhaseButtons={excludedRightPanelPhaseButtons}
21872194
/>
21882195
<MainSplit panel={rightPanel} resizeNotifier={this.props.resizeNotifier}>
2189-
<div className="mx_RoomView_body" ref={this.roomViewBody} data-layout={this.state.layout}>
2196+
<div className={mainSplitContentClasses} ref={this.roomViewBody} data-layout={this.state.layout}>
21902197
{ mainSplitBody }
21912198
</div>
21922199
</MainSplit>

0 commit comments

Comments
 (0)