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

Commit dc837df

Browse files
author
Kerry Archibald
committed
Merge branch 'kerry/unstable-prefix-for-tile-server' into psf-924/basic-beacon-maximised-view
Signed-off-by: Kerry Archibald <[email protected]>
2 parents 58c91b5 + d73f510 commit dc837df

File tree

37 files changed

+166
-76
lines changed

37 files changed

+166
-76
lines changed

res/css/views/right_panel/_ThreadPanel.scss

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ limitations under the License.
165165
}
166166
}
167167

168+
.mx_GenericEventListSummary > .mx_EventTile_line {
169+
padding-left: 30px !important; // Override main timeline styling - align summary text with message text
170+
}
171+
168172
.mx_EventTile:not([data-layout=bubble]) {
169173
.mx_EventTile_e2eIcon {
170174
left: 8px;
@@ -212,19 +216,21 @@ limitations under the License.
212216
}
213217

214218
// handling for hidden events (e.g reactions) in the thread view
215-
&.mx_ThreadView .mx_GenericEventListSummary_unstyledList .mx_EventTile_info {
219+
&.mx_ThreadView .mx_EventTile_info {
220+
padding-top: 0 !important; // override main timeline padding
221+
216222
.mx_EventTile_line {
217223
padding-left: 0 !important; // override main timeline padding
218224

219225
.mx_EventTile_content {
220-
margin-left: 54px; // align with text
221-
width: calc(100% - 54px - 8px); // match width of parent
226+
margin-left: 48px; // align with text
227+
width: calc(100% - 48px - 8px); // match width of parent
222228
}
223229
}
224230

225231
.mx_EventTile_avatar {
226232
position: absolute;
227-
left: 36px !important; // override main timeline positioning
233+
left: 30px !important; // override main timeline positioning
228234
z-index: 9; // position above the hover styling
229235
}
230236

res/css/views/right_panel/_TimelineCard.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ limitations under the License.
3939
overflow: hidden;
4040
position: relative; // offset parent for jump to bottom button
4141
flex: 1;
42+
border-radius: 8px;
4243
}
4344

4445
.mx_AutoHideScrollbar {
@@ -124,4 +125,12 @@ limitations under the License.
124125
.mx_WhoIsTypingTile_avatars {
125126
flex-basis: 48px; // 12 (padding on message list) + 36 (padding on event lines)
126127
}
128+
129+
&.mx_BaseCard {
130+
// For a chat timeline on the right panel when the widget is maximised
131+
// TODO: rename ThreadPanel
132+
&.mx_ThreadPanel {
133+
padding-right: 8px; // .mx_RightPanel padding
134+
}
135+
}
127136
}

res/css/views/rooms/_EventTile.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,8 @@ $left-gutter: 64px;
762762
bottom: 0;
763763
width: 60px;
764764
box-sizing: border-box;
765-
background: linear-gradient(270deg, $system 52.6%, transparent 100%);
765+
// XXX: We use `$system-transparent` instead of `transparent` to work around a Safari <15.4 bug
766+
background: linear-gradient(270deg, $system 50%, $system-transparent 100%);
766767

767768
opacity: 0;
768769
transform: translateX(60px);

res/themes/dark/css/_dark.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $quaternary-content: #6F7882;
77
$quinary-content: #394049;
88

99
$system: #21262C;
10+
$system-transparent: rgba($system, 0.0); // XXX: workaround for Safari 15.3 linear-gradient bug
1011
$background: #15191E;
1112
$overlay-background: rgba($background, 0.85);
1213

res/themes/legacy-dark/css/_legacy-dark.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Colors from Figma Compound https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=559%3A741
22
$system: #21262C;
3+
$system-transparent: rgba($system, 0.0); // XXX: workaround for Safari 15.3 linear-gradient bug
34

45
// unified palette
56
// try to use these colors when possible
@@ -97,6 +98,7 @@ $tertiary-content: $tertiary-fg-color;
9798
$quaternary-content: #6F7882;
9899
$quinary-content: $quaternary-content;
99100
$system: #21262C;
101+
$system-transparent: rgba($system, 0.0); // XXX: workaround for Safari 15.3 linear-gradient bug
100102
$background: $primary-bg-color;
101103
$overlay-background: rgba($background, 0.85);
102104

res/themes/legacy-light/css/_legacy-light.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ $tertiary-content: $tertiary-fg-color;
150150
$quaternary-content: #6F7882;
151151
$quinary-content: $quaternary-content;
152152
$system: #F4F6FA;
153+
$system-transparent: rgba($system, 0.0); // XXX: workaround for Safari 15.3 linear-gradient bug
153154
$background: $primary-bg-color;
154155
$overlay-background: rgba($background, 0.85);
155156

res/themes/light-custom/css/_custom.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ $secondary-content: var(--secondary-content, $secondary-content);
2626
$tertiary-content: var(--tertiary-content, $tertiary-content);
2727
$quaternary-content: var(--quaternary-content, $quaternary-content);
2828
$quinary-content: var(--quinary-content, $quinary-content);
29+
// XXX: workaround for Safari 15.3 linear-gradient bug https://github.com/vector-im/element-web/issues/21670
30+
$system-transparent: var(--system-transparent, rgba($system, 0.0));
2931
$system: var(--system, $system);
3032
$background: var(--background, $background);
3133
$panels: rgba($system, 0.9);

res/themes/light/css/_light.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ $quaternary-content: #c1c6cd;
3434
$quinary-content: #E3E8F0;
3535

3636
$system: #F4F6FA;
37+
$system-transparent: rgba($system, 0.0); // XXX: workaround for Safari 15.3 linear-gradient bug
3738
$background: #ffffff;
3839
$overlay-background: rgba($background, 0.85);
3940

src/Avatar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function isValidHexColor(color: string): boolean {
5757
return typeof color === "string" &&
5858
(color.length === 7 || color.length === 9) &&
5959
color.charAt(0) === "#" &&
60-
!color.substr(1).split("").some(c => isNaN(parseInt(c, 16)));
60+
!color.slice(1).split("").some(c => isNaN(parseInt(c, 16)));
6161
}
6262

6363
function urlForColor(color: string): string {

src/Lifecycle.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,9 @@ async function clearStorage(opts?: { deleteEverything?: boolean }): Promise<void
875875
Analytics.disable();
876876

877877
if (window.localStorage) {
878-
// try to save any 3pid invites from being obliterated
878+
// try to save any 3pid invites from being obliterated and registration time
879879
const pendingInvites = ThreepidInviteStore.instance.getWireInvites();
880+
const registrationTime = window.localStorage.getItem("mx_registration_time");
880881

881882
window.localStorage.clear();
882883

@@ -886,13 +887,17 @@ async function clearStorage(opts?: { deleteEverything?: boolean }): Promise<void
886887
logger.error("idbDelete failed for account:mx_access_token", e);
887888
}
888889

889-
// now restore those invites
890+
// now restore those invites and registration time
890891
if (!opts?.deleteEverything) {
891892
pendingInvites.forEach(i => {
892893
const roomId = i.roomId;
893894
delete i.roomId; // delete to avoid confusing the store
894895
ThreepidInviteStore.instance.storeInvite(roomId, i);
895896
});
897+
898+
if (registrationTime) {
899+
window.localStorage.setItem("mx_registration_time", registrationTime);
900+
}
896901
}
897902
}
898903

0 commit comments

Comments
 (0)