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

Commit 0e87a54

Browse files
authored
Merge branch 'develop' into EventBubbleTile
2 parents 7c6c37d + 765a715 commit 0e87a54

File tree

92 files changed

+1464
-1312
lines changed

Some content is hidden

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

92 files changed

+1464
-1312
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ module.exports = {
8686
"jsx-a11y/no-static-element-interactions": "off",
8787
"jsx-a11y/role-supports-aria-props": "off",
8888
"jsx-a11y/tabindex-no-positive": "off",
89+
90+
"matrix-org/require-copyright-header": "error",
8991
},
9092
overrides: [
9193
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
"eslint-config-google": "^0.14.0",
174174
"eslint-plugin-import": "^2.25.4",
175175
"eslint-plugin-jsx-a11y": "^6.5.1",
176-
"eslint-plugin-matrix-org": "^0.4.0",
176+
"eslint-plugin-matrix-org": "^0.5.2",
177177
"eslint-plugin-react": "^7.28.0",
178178
"eslint-plugin-react-hooks": "^4.3.0",
179179
"fs-extra": "^10.0.1",

res/css/_components.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@
126126
@import "./views/dialogs/_SpacePreferencesDialog.scss";
127127
@import "./views/dialogs/_SpaceSettingsDialog.scss";
128128
@import "./views/dialogs/_SpotlightDialog.scss";
129-
@import "./views/dialogs/_TabbedIntegrationManagerDialog.scss";
130129
@import "./views/dialogs/_TermsDialog.scss";
131130
@import "./views/dialogs/_UntrustedDeviceDialog.scss";
132131
@import "./views/dialogs/_UploadConfirmDialog.scss";
@@ -163,6 +162,7 @@
163162
@import "./views/elements/_InviteReason.scss";
164163
@import "./views/elements/_ManageIntegsButton.scss";
165164
@import "./views/elements/_MiniAvatarUploader.scss";
165+
@import "./views/elements/_Pill.scss";
166166
@import "./views/elements/_PowerSelector.scss";
167167
@import "./views/elements/_ProgressBar.scss";
168168
@import "./views/elements/_QRCode.scss";

res/css/structures/_RoomDirectory.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ limitations under the License.
155155
line-height: $font-20px;
156156
padding: 0 5px;
157157
color: $accent-fg-color;
158-
background-color: $rte-room-pill-color;
158+
background-color: $pill-bg-color;
159159
}
160160

161161
.mx_RoomDirectory_topic {

res/css/views/dialogs/_TabbedIntegrationManagerDialog.scss

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

res/css/views/elements/_Pill.scss

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
Copyright 2021 Šimon Brandner <[email protected]>
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_Pill {
18+
padding: $font-1px 0.4em $font-1px 0;
19+
line-height: $font-17px;
20+
border-radius: $font-16px;
21+
vertical-align: text-top;
22+
display: inline-flex;
23+
align-items: center;
24+
25+
cursor: pointer;
26+
27+
color: $accent-fg-color !important; // To override .markdown-body
28+
background-color: $pill-bg-color !important; // To override .markdown-body
29+
30+
&.mx_UserPill_me,
31+
&.mx_AtRoomPill {
32+
background-color: $alert !important; // To override .markdown-body
33+
}
34+
35+
&:hover {
36+
background-color: $pill-hover-bg-color !important; // To override .markdown-body
37+
}
38+
39+
&.mx_UserPill_me:hover {
40+
background-color: #ff6b75 !important; // To override .markdown-body | same on both themes
41+
}
42+
43+
// We don't want to indicate clickability
44+
&.mx_AtRoomPill:hover {
45+
background-color: $alert !important; // To override .markdown-body
46+
cursor: unset;
47+
}
48+
49+
.mx_BaseAvatar {
50+
position: relative;
51+
display: inline-flex;
52+
align-items: center;
53+
border-radius: 10rem;
54+
margin-right: 0.24rem;
55+
}
56+
57+
a& {
58+
text-overflow: ellipsis;
59+
white-space: nowrap;
60+
overflow: hidden;
61+
text-decoration: none !important; // To override .markdown-body
62+
}
63+
}

res/css/views/elements/_RichText.scss

Lines changed: 7 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -2,86 +2,6 @@
22
// naming scheme; it's completely unclear where or how they're being used
33
// --Matthew
44

5-
.mx_UserPill,
6-
.mx_RoomPill,
7-
.mx_AtRoomPill {
8-
display: inline-flex;
9-
align-items: center;
10-
vertical-align: middle;
11-
border-radius: $font-16px;
12-
line-height: $font-15px;
13-
padding-left: 0;
14-
}
15-
16-
a.mx_Pill {
17-
text-overflow: ellipsis;
18-
white-space: nowrap;
19-
overflow: hidden;
20-
max-width: 100%;
21-
}
22-
23-
.mx_Pill {
24-
padding: $font-1px;
25-
padding-right: 0.4em;
26-
vertical-align: text-top;
27-
line-height: $font-17px;
28-
}
29-
30-
/* More specific to override `.markdown-body a` text-decoration */
31-
.mx_EventTile_content .markdown-body a.mx_Pill {
32-
text-decoration: none;
33-
}
34-
35-
/* More specific to override `.markdown-body a` color */
36-
.mx_EventTile_content .markdown-body a.mx_UserPill,
37-
.mx_UserPill {
38-
color: $primary-content;
39-
background-color: $other-user-pill-bg-color;
40-
}
41-
42-
.mx_UserPill_selected {
43-
background-color: $accent !important;
44-
}
45-
46-
/* More specific to override `.markdown-body a` color */
47-
.mx_EventTile_highlight .mx_EventTile_content .markdown-body a.mx_UserPill_me,
48-
.mx_EventTile_content .markdown-body a.mx_AtRoomPill,
49-
.mx_EventTile_content .mx_AtRoomPill,
50-
.mx_MessageComposer_input .mx_AtRoomPill {
51-
color: $accent-fg-color;
52-
background-color: $alert;
53-
}
54-
55-
/* More specific to override `.markdown-body a` color */
56-
.mx_EventTile_content .markdown-body a.mx_RoomPill,
57-
.mx_RoomPill {
58-
color: $accent-fg-color;
59-
background-color: $rte-room-pill-color;
60-
}
61-
62-
.mx_EventTile_body .mx_UserPill,
63-
.mx_EventTile_body .mx_RoomPill {
64-
cursor: pointer;
65-
}
66-
67-
.mx_UserPill .mx_BaseAvatar,
68-
.mx_RoomPill .mx_BaseAvatar,
69-
.mx_AtRoomPill .mx_BaseAvatar {
70-
position: relative;
71-
display: inline-flex;
72-
align-items: center;
73-
border-radius: 10rem;
74-
margin-right: 0.24rem;
75-
pointer-events: none;
76-
}
77-
78-
.mx_Emoji {
79-
// Should be 1.8rem for our default 1.4rem message bodies,
80-
// and scale with the size of the surrounding text
81-
font-size: calc(18 / 14 * 1em);
82-
vertical-align: bottom;
83-
}
84-
855
.mx_Markdown_BOLD {
866
font-weight: bold;
877
}
@@ -115,3 +35,10 @@ a.mx_Pill {
11535
.mx_Markdown_STRIKETHROUGH {
11636
text-decoration: line-through;
11737
}
38+
39+
.mx_Emoji {
40+
// Should be 1.8rem for our default message bodies, and scale with the
41+
// surrounding text
42+
font-size: max($font-18px, 1em);
43+
vertical-align: bottom;
44+
}

res/css/views/messages/_MLocationBody.scss

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ limitations under the License.
1515
*/
1616

1717
.mx_MLocationBody {
18+
max-width: 100%;
19+
1820
.mx_MLocationBody_map {
21+
max-width: 100%;
1922
width: 450px;
2023
height: 300px;
2124
z-index: 0; // keeps the entire map under the message action bar
@@ -27,15 +30,11 @@ limitations under the License.
2730

2831
/* In the timeline, we fit the width of the container */
2932
.mx_EventTile_line .mx_MLocationBody .mx_MLocationBody_map {
30-
width: 100%;
3133
max-width: 450px;
34+
width: 100%;
3235
}
3336

34-
.mx_EventTile[data-layout="bubble"] .mx_EventTile_line .mx_MLocationBody {
37+
.mx_EventTile[data-layout="bubble"] .mx_EventTile_line .mx_MLocationBody .mx_MLocationBody_map {
3538
max-width: 100%;
36-
37-
.mx_MLocationBody_map {
38-
max-width: 100%;
39-
width: 450px;
40-
}
39+
width: 450px;
4140
}

res/css/views/rooms/_BasicMessageComposer.scss

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,15 @@ limitations under the License.
5151
}
5252

5353
&.mx_BasicMessageComposer_input_shouldShowPillAvatar {
54-
span.mx_UserPill, span.mx_RoomPill {
55-
position: relative;
54+
span.mx_UserPill, span.mx_RoomPill, span.mx_SpacePill {
5655
user-select: all;
56+
position: relative;
57+
cursor: unset; // We don't want indicate clickability
58+
59+
&:hover {
60+
// We don't want indicate clickability | To override the overriding of .markdown-body
61+
background-color: $pill-bg-color !important;
62+
}
5763

5864
// avatar psuedo element
5965
&::before {
@@ -72,14 +78,6 @@ limitations under the License.
7278
font-size: $font-10-4px;
7379
}
7480
}
75-
76-
span.mx_UserPill {
77-
cursor: pointer;
78-
}
79-
80-
span.mx_RoomPill {
81-
cursor: default;
82-
}
8381
}
8482

8583
&.mx_BasicMessageComposer_input_disabled {

res/css/views/rooms/_EventTile.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
704704

705705
.mx_MessagePanel_narrow .mx_ThreadSummary {
706706
min-width: initial;
707-
max-width: initial;
707+
max-width: 100%; // prevent overflow
708708
width: initial;
709709
}
710710

res/css/views/rooms/_ReplyPreview.scss

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,31 @@ limitations under the License.
2525

2626
.mx_ReplyPreview_section {
2727
border-bottom: 1px solid $primary-hairline-color;
28+
display: flex;
29+
flex-flow: column;
30+
row-gap: $spacing-8;
31+
padding: $spacing-8 $spacing-8 0 $spacing-8;
2832

2933
.mx_ReplyPreview_header {
30-
margin: 8px;
34+
display: flex;
35+
justify-content: space-between;
36+
column-gap: 8px;
37+
3138
color: $primary-content;
3239
font-weight: 400;
3340
opacity: 0.4;
34-
}
35-
36-
.mx_ReplyPreview_tile {
37-
margin: 0 8px;
38-
}
39-
40-
.mx_ReplyPreview_title {
41-
float: left;
42-
}
43-
44-
.mx_ReplyPreview_cancel {
45-
float: right;
46-
cursor: pointer;
47-
display: flex;
48-
}
4941

50-
.mx_ReplyPreview_clear {
51-
clear: both;
42+
.mx_ReplyPreview_header_cancel {
43+
background-color: $primary-content;
44+
mask: url('$(res)/img/cancel.svg');
45+
mask-repeat: no-repeat;
46+
mask-position: center;
47+
mask-size: 18px;
48+
width: 18px;
49+
height: 18px;
50+
min-width: 18px;
51+
min-height: 18px;
52+
}
5253
}
5354
}
5455
}

0 commit comments

Comments
 (0)