Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New memberlist #28605

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
Draft
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
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@matrix-org/react-sdk-module-api": "^2.4.0",
"@matrix-org/spec": "^1.7.0",
"@sentry/browser": "^8.0.0",
"@vector-im/compound-design-tokens": "^2.0.1",
"@vector-im/compound-design-tokens": "^2.1.0",
"@vector-im/compound-web": "^7.5.0",
"@vector-im/matrix-wysiwyg": "2.37.13",
"@zxcvbn-ts/core": "^3.0.4",
Expand Down Expand Up @@ -148,7 +148,9 @@
"temporal-polyfill": "^0.2.5",
"ua-parser-js": "^1.0.2",
"uuid": "^11.0.0",
"what-input": "^5.2.10"
"what-input": "^5.2.10",
"@types/react-virtualized": "^9.21.30",
"react-virtualized": "^9.22.5"
},
"devDependencies": {
"@action-validator/cli": "^0.6.0",
Expand Down
5 changes: 4 additions & 1 deletion res/css/_components.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@
@import "./views/rooms/_EditMessageComposer.pcss";
@import "./views/rooms/_EmojiButton.pcss";
@import "./views/rooms/_EntityTile.pcss";
@import "./views/rooms/_MemberTileView.pcss";
@import "./views/rooms/_OverflowTile.pcss";
@import "./views/rooms/_EventBubbleTile.pcss";
@import "./views/rooms/_EventPreview.pcss";
@import "./views/rooms/_EventTile.pcss";
Expand All @@ -290,7 +292,8 @@
@import "./views/rooms/_LinkPreviewGroup.pcss";
@import "./views/rooms/_LinkPreviewWidget.pcss";
@import "./views/rooms/_LiveContentSummary.pcss";
@import "./views/rooms/_MemberList.pcss";
@import "./views/rooms/_MemberListView.pcss";
@import "./views/rooms/_MemberListHeaderView.pcss";
@import "./views/rooms/_MessageComposer.pcss";
@import "./views/rooms/_MessageComposerFormatBar.pcss";
@import "./views/rooms/_NewRoomIntro.pcss";
Expand Down
22 changes: 21 additions & 1 deletion res/css/views/messages/_DisambiguatedProfile.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,28 @@ Please see LICENSE files in the repository root for full details.
}

.mx_DisambiguatedProfile_mxid {
margin-inline-start: 5px;
color: $secondary-content;
font-size: var(--cpd-font-size-body-sm);
margin-inline-start: 5px;
}
}

.mx_MemberTileView .mx_DisambiguatedProfile {
display: flex;
flex-direction: column;

.mx_DisambiguatedProfile_mxid {
margin-inline-start: 0;
font: var(--cpd-font-body-sm-regular);
}

span:not(.mx_DisambiguatedProfile_mxid) {
/**
In a member tile, this span element is a flex child and so
we need the following for text overflow to work.
**/
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
69 changes: 0 additions & 69 deletions res/css/views/rooms/_MemberList.pcss

This file was deleted.

38 changes: 38 additions & 0 deletions res/css/views/rooms/_MemberListHeaderView.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2015, 2016 OpenMarket Ltd

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/

.mx_MemberListHeaderView {
border-bottom: var(--cpd-border-width-1) solid var(--cpd-color-gray-400);
max-height: 112px;

.mx_MemberListHeaderView_container {
margin-top: var(--cpd-space-6x);
width: 100%;
}

.mx_MemberListHeaderView_invite_small {
margin-left: var(--cpd-space-3x);
}

.mx_MemberListHeaderView_invite_large {
width: 288px;
height: 36px;
}

.mx_MemberListHeaderView_label {
padding: var(--cpd-space-6x) 0 var(--cpd-space-2x) var(--cpd-space-4x);
box-sizing: border-box;
width: 100%;
color: var(--cpd-color-text-secondary);
font: var(--cpd-font-body-sm-semibold);
}

.mx_MemberListHeaderView_search {
width: 240px;
}
}
19 changes: 19 additions & 0 deletions res/css/views/rooms/_MemberListView.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2015, 2016 OpenMarket Ltd

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/

.mx_MemberListView {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;

.mx_MemberListView_container {
height: 100%;
}

}
52 changes: 52 additions & 0 deletions res/css/views/rooms/_MemberTileView.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.mx_MemberTileView {
display: flex;
padding: var(--cpd-space-3x) var(--cpd-space-3x) var(--cpd-space-3x) var(--cpd-space-4x);
box-sizing: border-box;
height: 56px;
border-bottom: var(--cpd-border-width-1) solid var(--cpd-color-gray-300);

.mx_MemberTileView_left,
.mx_MemberTileView_right {
display: flex;
align-items: center;
gap: 8px
}

.mx_MemberTileView_left {
flex-basis: 209px;
flex-grow: 1;
min-width: 0;
}

.mx_MemberTileView_name {
font: var(--cpd-font-body-md-medium);
font-size: 15px;
min-width: 0;
}

.mx_MemberTileView_user_label {
font: var(--cpd-font-body-sm-regular);
font-size: 13px;
}

.mx_MemberTileView_avatar {
position: relative;
height: 32px;
width: 32px;
}

.mx_E2EIconView {
display: flex;
justify-content: center;
align-items: center;
}

.mx_E2EIconView_warning {
color: var(--cpd-color-icon-critical-primary);
}

.mx_E2EIconView_verified {

color: var(--cpd-color-icon-success-primary);
}
}
43 changes: 43 additions & 0 deletions res/css/views/rooms/_OverflowTile.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

.mx_OverflowTileView {
display: flex;
align-items: center;
color: $primary-content;
cursor: pointer;
}

.mx_OverflowTileView_text {
flex: 1 1 0;
overflow: hidden;
font: var(--cpd-font-body-md-regular);
text-overflow: ellipsis;
white-space: nowrap;
font-style: italic;
}

.mx_OverflowTileView:hover {
padding-right: 30px;
position: relative; /* to keep the chevron aligned */
}

.mx_OverflowTileView:hover::before {
content: "";
position: absolute;
top: calc(50% - 8px); /* center */
right: -8px;
mask: url("@vector-im/compound-design-tokens/icons/chevron-right.svg");
mask-repeat: no-repeat;
mask-position: center;
width: 16px;
height: 16px;
background-color: $header-panel-text-primary-color;
}

.mx_OverflowTileView_icon {
padding-left: 3px;
padding-right: 12px;
padding-top: 4px;
padding-bottom: 4px;
position: relative;
line-height: 0;
}
25 changes: 25 additions & 0 deletions res/css/views/rooms/_PresenceLabel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,28 @@ Please see LICENSE files in the repository root for full details.
.mx_PresenceLabel_online {
color: var(--cpd-color-text-success-primary);
}

.mx_PresenceIconView {
position: absolute;
top: 24px;
left: 24px;
width: 12px;
height: 12px;
display: flex;
justify-content: center;
align-items: center;
background: var(--cpd-color-bg-canvas-default);
border-radius: 100%;

.mx_PresenceIconView_online {
color: var(--cpd-color-icon-accent-primary);
}

.mx_PresenceIconView_offline, .mx_PresenceIconView_dnd {
color: var(--cpd-color-icon-tertiary);
}

.mx_PresenceIconView_unavailable {
color: var(--cpd-color-icon-quaternary);
}
}
2 changes: 1 addition & 1 deletion src/components/structures/MainSplit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class MainSplit extends React.Component<IProps> {
<Resizable
key={this.props.sizeKey}
defaultSize={this.loadSidePanelSize()}
minWidth={264}
minWidth={320}
maxWidth="50%"
enable={{
top: false,
Expand Down
20 changes: 11 additions & 9 deletions src/components/structures/RightPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import MatrixClientContext from "../../contexts/MatrixClientContext";
import RoomSummaryCard from "../views/right_panel/RoomSummaryCard";
import WidgetCard from "../views/right_panel/WidgetCard";
import MemberList from "../views/rooms/MemberList";
// import MemberList from "../views/rooms/MemberList";
import UserInfo from "../views/right_panel/UserInfo";
import ThirdPartyMemberInfo from "../views/rooms/ThirdPartyMemberInfo";
import FilePanel from "./FilePanel";
Expand All @@ -34,6 +34,7 @@
import { Action } from "../../dispatcher/actions";
import { XOR } from "../../@types/common";
import ExtensionsCard from "../views/right_panel/ExtensionsCard";
import MemberListView from "../views/rooms/MemberListView";

interface BaseProps {
overwriteCard?: IRightPanelCard; // used to display a custom card and ignoring the RightPanelStore (used for UserView)
Expand Down Expand Up @@ -63,7 +64,7 @@

export default class RightPanel extends React.Component<Props, IState> {
public static contextType = MatrixClientContext;
declare public context: React.ContextType<typeof MatrixClientContext>;
public declare context: React.ContextType<typeof MatrixClientContext>;

public constructor(props: Props, context: React.ContextType<typeof MatrixClientContext>) {
super(props, context);
Expand Down Expand Up @@ -147,7 +148,7 @@
}
};

private onSearchQueryChanged = (searchQuery: string): void => {

Check failure on line 151 in src/components/structures/RightPanel.tsx

View workflow job for this annotation

GitHub Actions / Typescript Syntax Check

'onSearchQueryChanged' is declared but its value is never read.
this.setState({ searchQuery });
};

Expand All @@ -160,13 +161,14 @@
case RightPanelPhases.MemberList:
if (!!roomId) {
card = (
<MemberList
roomId={roomId}
key={roomId}
onClose={this.onClose}
searchQuery={this.state.searchQuery}
onSearchQueryChanged={this.onSearchQueryChanged}
/>
<MemberListView roomId={roomId} onClose={this.onClose} />
// <MemberList
// roomId={roomId}
// key={roomId}
// onClose={this.onClose}
// searchQuery={this.state.searchQuery}
// onSearchQueryChanged={this.onSearchQueryChanged}
// />
);
}
break;
Expand Down
Loading
Loading