Skip to content

Commit d337106

Browse files
authored
New room list: fix multiple visual issues (#29673)
* fix(room list item): add bold when there is a notification * fix(room list item menu): fix color of check icon * fix(menu): remove chevron * chore: update @vector-im/compound-web * test(room list): update tests * test(e2e): update snapshots
1 parent 5ce5e90 commit d337106

18 files changed

+85
-22
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"@types/png-chunks-extract": "^1.0.2",
9494
"@types/react-virtualized": "^9.21.30",
9595
"@vector-im/compound-design-tokens": "^4.0.0",
96-
"@vector-im/compound-web": "^7.10.0",
96+
"@vector-im/compound-web": "^7.10.1",
9797
"@vector-im/matrix-wysiwyg": "2.38.3",
9898
"@zxcvbn-ts/core": "^3.0.4",
9999
"@zxcvbn-ts/language-common": "^3.0.4",
234 Bytes
Loading
22 Bytes
Loading
206 Bytes
Loading
64 Bytes
Loading
392 Bytes
Loading
15 Bytes
Loading
-53 Bytes
Loading

res/css/views/rooms/RoomListPanel/_RoomListItemView.pcss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
box-sizing: border-box;
4040
min-width: 0;
4141

42-
span {
42+
.mx_RoomListItemView_roomName {
4343
white-space: nowrap;
4444
overflow: hidden;
4545
text-overflow: ellipsis;
@@ -71,3 +71,7 @@
7171
padding-right: var(--cpd-space-3x);
7272
}
7373
}
74+
75+
.mx_RoomListItemView_bold .mx_RoomListItemView_roomName {
76+
font: var(--cpd-font-body-md-semibold);
77+
}

src/components/viewmodels/roomlist/RoomListItemViewModel.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export interface RoomListItemViewState {
3636
* The notification state of the room.
3737
*/
3838
notificationState: RoomNotificationState;
39+
/**
40+
* Whether the room should be bolded.
41+
*/
42+
isBold: boolean;
3943
}
4044

4145
/**
@@ -51,6 +55,7 @@ export function useRoomListItemViewModel(room: Room): RoomListItemViewState {
5155
hasAccessToOptionsMenu(room) || hasAccessToNotificationMenu(room, matrixClient.isGuest(), isArchived);
5256
const notificationState = useMemo(() => RoomNotificationStateStore.instance.getRoomState(room), [room]);
5357
const a11yLabel = getA11yLabel(room, notificationState);
58+
const isBold = notificationState.hasAnyNotificationOrActivity;
5459

5560
// Actions
5661

@@ -67,6 +72,7 @@ export function useRoomListItemViewModel(room: Room): RoomListItemViewState {
6772
showHoverMenu,
6873
openRoom,
6974
a11yLabel,
75+
isBold,
7076
};
7177
}
7278

0 commit comments

Comments
 (0)