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

Commit 3de1745

Browse files
authored
Merge pull request #5965 from matrix-org/t3chguy/fix/17158
Fix more space panel layout and hover behaviour issues
2 parents 3cca153 + caa7723 commit 3de1745

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

res/css/structures/_SpacePanel.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ $activeBorderColor: $secondary-fg-color;
7979
.mx_SpaceItem {
8080
display: inline-flex;
8181
flex-flow: wrap;
82-
align-self: baseline;
82+
83+
&.mx_SpaceItem_narrow {
84+
align-self: baseline;
85+
}
8386
}
8487

8588
.mx_SpaceItem.collapsed {
@@ -276,7 +279,7 @@ $activeBorderColor: $secondary-fg-color;
276279
.mx_SpaceButton:hover,
277280
.mx_SpaceButton:focus-within,
278281
.mx_SpaceButton_hasMenuOpen {
279-
&:not(.mx_SpaceButton_home) {
282+
&:not(.mx_SpaceButton_home):not(.mx_SpaceButton_invite) {
280283
// Hide the badge container on hover because it'll be a menu button
281284
.mx_SpacePanel_badgeContainer {
282285
width: 0;

src/components/views/spaces/SpaceTreeLevel.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,19 @@ export class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
297297
const isActive = activeSpaces.includes(space);
298298
const itemClasses = classNames({
299299
"mx_SpaceItem": true,
300+
"mx_SpaceItem_narrow": isNarrow,
300301
"collapsed": collapsed,
301302
"hasSubSpaces": childSpaces && childSpaces.length,
302303
});
304+
305+
const isInvite = space.getMyMembership() === "invite";
303306
const classes = classNames("mx_SpaceButton", {
304307
mx_SpaceButton_active: isActive,
305308
mx_SpaceButton_hasMenuOpen: !!this.state.contextMenuPosition,
306309
mx_SpaceButton_narrow: isNarrow,
310+
mx_SpaceButton_invite: isInvite,
307311
});
308-
const notificationState = space.getMyMembership() === "invite"
312+
const notificationState = isInvite
309313
? StaticNotificationState.forSymbol("!", NotificationColor.Red)
310314
: SpaceStore.instance.getNotificationState(space.roomId);
311315

0 commit comments

Comments
 (0)