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

Remove SpaceScopeHeader #12785

Merged
merged 3 commits into from
Jul 17, 2024
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
2 changes: 0 additions & 2 deletions playwright/e2e/right-panel/right-panel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,10 @@ test.describe("RightPanel", () => {
.getByRole("button", { name: /\d member/ })
.click();
await expect(page.locator(".mx_MemberList")).toBeVisible();
await expect(page.locator(".mx_SpaceScopeHeader").getByText(SPACE_NAME)).toBeVisible();

await getMemberTileByName(page, NAME).click();
await expect(page.locator(".mx_UserInfo")).toBeVisible();
await expect(page.locator(".mx_UserInfo_profile").getByText(NAME)).toBeVisible();
await expect(page.locator(".mx_SpaceScopeHeader").getByText(SPACE_NAME)).toBeVisible();

await page.getByTestId("base-card-back-button").click();
await expect(page.locator(".mx_MemberList")).toBeVisible();
Expand Down
1 change: 0 additions & 1 deletion res/css/_components.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@
@import "./views/rooms/_RoomTile.pcss";
@import "./views/rooms/_RoomUpgradeWarningBar.pcss";
@import "./views/rooms/_SendMessageComposer.pcss";
@import "./views/rooms/_SpaceScopeHeader.pcss";
@import "./views/rooms/_Stickers.pcss";
@import "./views/rooms/_ThirdPartyMemberInfo.pcss";
@import "./views/rooms/_ThreadSummary.pcss";
Expand Down
29 changes: 0 additions & 29 deletions res/css/views/rooms/_SpaceScopeHeader.pcss

This file was deleted.

3 changes: 1 addition & 2 deletions src/components/views/right_panel/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ import { DirectoryMember, startDmOnFirstMessage } from "../../../utils/direct-me
import { SdkContextClass } from "../../../contexts/SDKContext";
import { asyncSome } from "../../../utils/arrays";
import UIStore from "../../../stores/UIStore";
import { createSpaceScopeHeader } from "../rooms/SpaceScopeHeader";

export interface IDevice extends Device {
ambiguous?: boolean;
Expand Down Expand Up @@ -1778,7 +1777,7 @@ const UserInfo: React.FC<IProps> = ({ user, room, onClose, phase = RightPanelPha
return (
<BaseCard
className={classes.join(" ")}
header={createSpaceScopeHeader(room) ?? _t("common|profile")}
header={_t("common|profile")}
onClose={onClose}
closeLabel={closeLabel}
cardState={cardState}
Expand Down
2 changes: 0 additions & 2 deletions src/components/views/rooms/MemberList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import { SDKContext } from "../../../contexts/SDKContext";
import { canInviteTo } from "../../../utils/room/canInviteTo";
import { inviteToRoom } from "../../../utils/room/inviteToRoom";
import { Action } from "../../../dispatcher/actions";
import { createSpaceScopeHeader } from "./SpaceScopeHeader";

const INITIAL_LOAD_NUM_MEMBERS = 30;
const INITIAL_LOAD_NUM_INVITED = 5;
Expand Down Expand Up @@ -429,7 +428,6 @@ export default class MemberList extends React.Component<IProps, IState> {
className="mx_MemberList"
ariaLabelledBy="memberlist-panel-tab"
role="tabpanel"
header={createSpaceScopeHeader(room)}
hideHeaderButtons={this.props.hideHeaderButtons}
footer={footer}
onClose={this.props.onClose}
Expand Down
54 changes: 0 additions & 54 deletions src/components/views/rooms/SpaceScopeHeader.tsx

This file was deleted.

3 changes: 1 addition & 2 deletions src/components/views/rooms/ThirdPartyMemberInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { Action } from "../../../dispatcher/actions";
import ErrorDialog from "../dialogs/ErrorDialog";
import BaseCard from "../right_panel/BaseCard";
import { Flex } from "../../utils/Flex";
import { createSpaceScopeHeader } from "./SpaceScopeHeader";

interface IProps {
event: MatrixEvent;
Expand Down Expand Up @@ -134,7 +133,7 @@ export default class ThirdPartyMemberInfo extends React.Component<IProps, IState
}

return (
<BaseCard header={createSpaceScopeHeader(this.room)} onClose={this.props.onClose}>
<BaseCard onClose={this.props.onClose}>
<Flex className="mx_ThirdPartyMemberInfo" direction="column" gap="var(--cpd-space-4x)">
<Flex direction="column" as="section" justify="start" gap="var(--cpd-space-2x)">
{/* same as userinfo name style */}
Expand Down
9 changes: 0 additions & 9 deletions test/components/views/right_panel/UserInfo-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,6 @@ describe("<UserInfo />", () => {
expect(screen.queryByTestId("space-header")).not.toBeInTheDocument();
});

it("renders space header when room is a space room", () => {
const spaceRoom = {
...mockRoom,
isSpaceRoom: jest.fn().mockReturnValue(true),
};
renderComponent({ room: spaceRoom });
expect(screen.getByTestId("space-header")).toBeInTheDocument();
});

it("renders encryption info panel without pending verification", () => {
renderComponent({ phase: RightPanelPhases.EncryptionPanel, room: mockRoom });
expect(screen.getByRole("heading", { name: /encryption/i })).toBeInTheDocument();
Expand Down
Loading