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

Tweak room list skeleton UI height and behaviour #6926

Merged
merged 3 commits into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion res/css/views/rooms/_RoomSublist.scss
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ limitations under the License.
.mx_RoomSublist_skeletonUI {
position: relative;
margin-left: 4px;
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
height: 288px;
height: 240px;

&::before {
background: $roomsublist-skeleton-ui-bg;
Expand All @@ -406,3 +406,8 @@ limitations under the License.
mask-image: url('$(res)/img/element-icons/roomlist/skeleton-ui.svg');
}
}

.mx_RoomSublist_minimized .mx_RoomSublist_skeletonUI {
width: 32px; // cut off the horizontal lines in the svg
margin-left: 10px; // align with sublist + buttons
}
4 changes: 2 additions & 2 deletions src/components/views/rooms/RoomList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
}

private renderSublists(): React.ReactElement[] {
// show a skeleton UI if the user is in no rooms and they are not filtering
const showSkeleton = !this.state.isNameFiltering &&
// show a skeleton UI if the user is in no rooms and they are not filtering and have no suggested rooms
const showSkeleton = !this.state.isNameFiltering && !this.state.suggestedRooms?.length &&
Object.values(RoomListStore.instance.unfilteredLists).every(list => !list?.length);

return TAG_ORDER.reduce((tags, tagId) => {
Expand Down