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

Commit 760b11f

Browse files
authored
Merge pull request #5789 from matrix-org/t3chguy/spaces4.11
Tweak and fix some space features
2 parents da7d31a + d3cdd38 commit 760b11f

27 files changed

+342
-193
lines changed

res/css/structures/_LeftPanel.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ $roomListCollapsedWidth: 68px;
130130
mask-repeat: no-repeat;
131131
background: $secondary-fg-color;
132132
}
133+
134+
&.mx_LeftPanel_exploreButton_space::before {
135+
mask-image: url('$(res)/img/element-icons/roomlist/browse.svg');
136+
}
133137
}
134138
}
135139

res/css/structures/_SpacePanel.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ $activeBorderColor: $secondary-fg-color;
146146

147147
.mx_SpaceButton_toggleCollapse {
148148
width: $gutterSize;
149-
// negative margin to place it correctly even with the complex
150-
// 4px selection border each space button has when active
151-
margin-right: -4px;
152149
height: 20px;
153150
mask-position: center;
154151
mask-size: 20px;
@@ -342,11 +339,15 @@ $activeBorderColor: $secondary-fg-color;
342339
}
343340

344341
.mx_SpacePanel_iconPlus::before {
345-
mask-image: url('$(res)/img/element-icons/plus.svg');
342+
mask-image: url('$(res)/img/element-icons/roomlist/plus-circle.svg');
343+
}
344+
345+
.mx_SpacePanel_iconHash::before {
346+
mask-image: url('$(res)/img/element-icons/roomlist/hash-circle.svg');
346347
}
347348

348349
.mx_SpacePanel_iconExplore::before {
349-
mask-image: url('$(res)/img/element-icons/roomlist/explore.svg');
350+
mask-image: url('$(res)/img/element-icons/roomlist/browse.svg');
350351
}
351352
}
352353

res/css/structures/_SpaceRoomView.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $SpaceRoomViewInnerWidth: 428px;
2222
width: 432px;
2323
box-sizing: border-box;
2424
border-radius: 8px;
25-
border: 1px solid $input-darker-bg-color;
25+
border: 1px solid $space-button-outline-color;
2626
font-size: $font-15px;
2727
margin: 20px 0;
2828

@@ -89,7 +89,7 @@ $SpaceRoomViewInnerWidth: 428px;
8989
width: $SpaceRoomViewInnerWidth;
9090
text-align: right; // button alignment right
9191

92-
.mx_FormButton {
92+
.mx_AccessibleButton_hasKind {
9393
padding: 8px 22px;
9494
margin-left: 16px;
9595
}

res/css/views/dialogs/_AddExistingToSpaceDialog.scss

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,23 @@ limitations under the License.
2828
flex-direction: column;
2929
flex-wrap: nowrap;
3030
min-height: 0;
31+
height: 80vh;
3132

3233
.mx_Dialog_title {
3334
display: flex;
3435

35-
.mx_BaseAvatar {
36-
display: inline-flex;
37-
margin: 5px 16px 5px 5px;
38-
vertical-align: middle;
39-
}
40-
4136
.mx_BaseAvatar_image {
4237
border-radius: 8px;
4338
margin: 0;
4439
vertical-align: unset;
4540
}
4641

42+
.mx_BaseAvatar {
43+
display: inline-flex;
44+
margin: 5px 16px 5px 5px;
45+
vertical-align: middle;
46+
}
47+
4748
> div {
4849
> h1 {
4950
font-weight: $font-semi-bold;
@@ -101,6 +102,7 @@ limitations under the License.
101102

102103
.mx_SearchBox {
103104
margin: 0;
105+
flex-grow: 0;
104106
}
105107

106108
.mx_AddExistingToSpaceDialog_errorText {
@@ -112,7 +114,10 @@ limitations under the License.
112114
}
113115

114116
.mx_AddExistingToSpaceDialog_content {
117+
flex-grow: 1;
118+
115119
.mx_AddExistingToSpaceDialog_noResults {
120+
display: block;
116121
margin-top: 24px;
117122
}
118123
}
@@ -162,8 +167,14 @@ limitations under the License.
162167

163168
> span {
164169
flex-grow: 1;
165-
font-size: $font-12px;
170+
font-size: $font-14px;
166171
line-height: $font-15px;
172+
font-weight: $font-semi-bold;
173+
174+
.mx_AccessibleButton {
175+
font-size: inherit;
176+
display: inline-block;
177+
}
167178

168179
> * {
169180
vertical-align: middle;

res/css/views/dialogs/_SpaceSettingsDialog.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ limitations under the License.
4949
}
5050
}
5151

52-
.mx_FormButton {
52+
.mx_AccessibleButton_hasKind {
5353
padding: 8px 22px;
5454
}
5555
}

res/css/views/rooms/_NewRoomIntro.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ limitations under the License.
3333

3434
.mx_AccessibleButton {
3535
line-height: $font-24px;
36+
display: inline-block;
3637

37-
&::before {
38+
& + .mx_AccessibleButton {
39+
margin-left: 12px;
40+
}
41+
42+
&:not(.mx_AccessibleButton_kind_primary_outline)::before {
3843
content: '';
3944
display: inline-block;
4045
background-color: $button-fg-color;

res/css/views/rooms/_RoomList.scss

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ limitations under the License.
2727
.mx_RoomList_iconExplore::before {
2828
mask-image: url('$(res)/img/element-icons/roomlist/explore.svg');
2929
}
30+
.mx_RoomList_iconBrowse::before {
31+
mask-image: url('$(res)/img/element-icons/roomlist/browse.svg');
32+
}
3033
.mx_RoomList_iconDialpad::before {
3134
mask-image: url('$(res)/img/element-icons/roomlist/dialpad.svg');
3235
}
@@ -35,28 +38,32 @@ limitations under the License.
3538
margin: 4px 12px 4px;
3639
padding-top: 12px;
3740
border-top: 1px solid $tertiary-fg-color;
38-
font-size: $font-13px;
41+
font-size: $font-14px;
3942

4043
div:first-child {
4144
font-weight: $font-semi-bold;
45+
line-height: $font-18px;
46+
color: $primary-fg-color;
4247
}
4348

4449
.mx_AccessibleButton {
45-
color: $secondary-fg-color;
50+
color: $primary-fg-color;
4651
position: relative;
47-
padding: 0 0 0 24px;
52+
padding: 8px 8px 8px 32px;
4853
font-size: inherit;
49-
margin-top: 8px;
54+
margin-top: 12px;
5055
display: block;
5156
text-align: start;
57+
background-color: $roomlist-button-bg-color;
58+
border-radius: 4px;
5259

5360
&::before {
5461
content: '';
5562
width: 16px;
5663
height: 16px;
5764
position: absolute;
58-
top: 0;
59-
left: 0;
65+
top: 8px;
66+
left: 8px;
6067
background: $secondary-fg-color;
6168
mask-position: center;
6269
mask-size: contain;
@@ -70,5 +77,13 @@ limitations under the License.
7077
&.mx_RoomList_explorePrompt_explore::before {
7178
mask-image: url('$(res)/img/element-icons/roomlist/explore.svg');
7279
}
80+
81+
&.mx_RoomList_explorePrompt_spaceInvite::before {
82+
mask-image: url('$(res)/img/element-icons/room/invite.svg');
83+
}
84+
85+
&.mx_RoomList_explorePrompt_spaceExplore::before {
86+
mask-image: url('$(res)/img/element-icons/roomlist/browse.svg');
87+
}
7388
}
7489
}

res/css/views/spaces/_SpaceCreateMenu.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ $spacePanelWidth: 71px;
7979
}
8080
}
8181

82-
.mx_FormButton {
82+
.mx_AccessibleButton_kind_primary {
8383
padding: 8px 22px;
8484
margin-left: auto;
8585
display: block;
Lines changed: 4 additions & 0 deletions
Loading

src/RoomInvite.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ export function showStartChatInviteDialog(initialText) {
4949
);
5050
}
5151

52-
export function showRoomInviteDialog(roomId) {
52+
export function showRoomInviteDialog(roomId, initialText = "") {
5353
// This dialog handles the room creation internally - we don't need to worry about it.
5454
Modal.createTrackedDialog(
5555
"Invite Users", "", InviteDialog, {
5656
kind: KIND_INVITE,
57+
initialText,
5758
roomId,
5859
},
5960
/*className=*/null, /*isPriority=*/false, /*isStatic=*/true,

0 commit comments

Comments
 (0)