Skip to content

Commit

Permalink
Fix test tchap-external-room-style
Browse files Browse the repository at this point in the history
  • Loading branch information
estellecomment committed Jan 22, 2024
1 parent aab0f47 commit 675dca1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/tchap-external-room-style.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("Style of external rooms", () => {
//open room
cy.get('[aria-label="' + roomName + '"]').click();

cy.get(".mx_LegacyRoomHeader").within(() => {
cy.get(".mx_RoomHeader").within(() => {
cy.get(".tc_RoomHeader_external"); // "ouvert aux externes"
cy.get(".mx_DecoratedRoomAvatar_icon_external"); // lock icon on room avatar
});
Expand Down
23 changes: 13 additions & 10 deletions patches/customize-room-header-bar/matrix-react-sdk+3.81.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,33 @@ index 2614e17..79fe37e 100644
+ display: -webkit-box;
+}
diff --git a/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx b/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx
index bb8dd49..df46713 100644
index bb8dd49..13ba615 100644
--- a/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/rooms/RoomHeader.tsx
@@ -48,6 +48,9 @@ import RoomAvatar from "../avatars/RoomAvatar";
@@ -48,6 +48,10 @@ import RoomAvatar from "../avatars/RoomAvatar";
import { formatCount } from "../../../utils/FormattingUtils";
import RightPanelStore from "../../../stores/right-panel/RightPanelStore";

+import TchapUIFeature from "../../../../../../src/tchap/util/TchapUIFeature";
+import TchapExternalRoomHeader from "../../../../../../src/tchap/components/views/rooms/TchapExternalRoomHeader";
+import DecoratedRoomAvatar from "../avatars/DecoratedRoomAvatar"; // :TCHAP:
+
/**
* A helper to transform a notification color to the what the Compound Icon Button
* expects
@@ -111,6 +114,9 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
@@ -110,7 +114,10 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
RightPanelStore.instance.showOrHidePanel(RightPanelPhases.RoomSummary);
}}
>
<RoomAvatar room={room} size="40px" />
- <RoomAvatar room={room} size="40px" />
+ <DecoratedRoomAvatar room={room} size="40px" />
+ {/* :tchap: Add external caption when room is open to external */}
+ <TchapExternalRoomHeader room={room}></TchapExternalRoomHeader>
+ {/* :tchap: end */}
<Box flex="1" className="mx_RoomHeader_info">
<BodyText
as="div"
@@ -124,7 +130,8 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
@@ -124,7 +131,8 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
>
{roomName}

Expand All @@ -54,7 +57,7 @@ index bb8dd49..df46713 100644
<Tooltip label={_t("Public room")}>
<PublicIcon
width="16px"
@@ -135,7 +142,8 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
@@ -135,7 +143,8 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
</Tooltip>
)}

Expand All @@ -64,7 +67,7 @@ index bb8dd49..df46713 100644
<Tooltip label={_t("common|verified")}>
<VerifiedIcon
width="16px"
@@ -146,7 +154,8 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
@@ -146,7 +155,8 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
</Tooltip>
)}

Expand All @@ -74,7 +77,7 @@ index bb8dd49..df46713 100644
<Tooltip label={_t("Untrusted")}>
<ErrorIcon
width="16px"
@@ -164,7 +173,10 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
@@ -164,7 +174,10 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
)}
</Box>
<Flex as="nav" align="center" gap="var(--cpd-space-2x)">
Expand All @@ -86,7 +89,7 @@ index bb8dd49..df46713 100644
<Tooltip label={!voiceCallDisabledReason ? _t("voip|voice_call") : voiceCallDisabledReason!}>
<IconButton
disabled={!!voiceCallDisabledReason}
@@ -175,6 +187,10 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
@@ -175,6 +188,10 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
</IconButton>
</Tooltip>
)}
Expand All @@ -97,7 +100,7 @@ index bb8dd49..df46713 100644
<Tooltip label={!videoCallDisabledReason ? _t("voip|video_call") : videoCallDisabledReason!}>
<IconButton
disabled={!!videoCallDisabledReason}
@@ -183,7 +199,7 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
@@ -183,7 +200,7 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element {
>
<VideoCallIcon />
</IconButton>
Expand Down

0 comments on commit 675dca1

Please sign in to comment.