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

Release video rooms as a beta feature #8431

Merged
merged 28 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ddcbbfd
Remove blank header from video room view frame
robintown Apr 27, 2022
bd066a6
Add a beta card for video rooms
robintown Apr 27, 2022
7b07716
Rename the 'disclaimer' on beta cards to 'FAQ'
robintown Apr 27, 2022
fb7b486
Add beta pills to video room creation buttons
robintown Apr 27, 2022
c99792d
Remove duplicate tooltips from face piles
robintown Apr 27, 2022
7f44269
Merge branch 'develop' into video-rooms-beta
robintown May 2, 2022
50bd2cd
Add beta pill to headers of video rooms
robintown May 2, 2022
59703c0
Factor RoomInfoLine out of SpaceRoomView
robintown May 2, 2022
08db726
Factor RoomPreviewCard out of SpaceRoomView
robintown May 2, 2022
c3079e1
Adapt RoomPreviewCard for video rooms
robintown May 2, 2022
45d48e8
Merge branch 'develop' into video-rooms-beta
robintown May 2, 2022
fe83642
"New video room" → "Video room"
robintown May 2, 2022
d44b85a
Merge branch 'develop' into video-rooms-beta
robintown May 3, 2022
3c17f22
Add comment about unused cases in RoomPreviewCard
robintown May 3, 2022
7db10bc
Add types
robintown May 3, 2022
6ee692c
Clarify !important comments
robintown May 3, 2022
c4ace54
Add a reload warning
robintown May 3, 2022
78ecca0
Fix the reload warning being the wrong way around
robintown May 3, 2022
a5476ab
Fix lints
robintown May 3, 2022
0a71a80
Merge branch 'develop' into video-rooms-beta
robintown May 4, 2022
d294866
Make widgets in video rooms mutable again to de-risk future upgrades
robintown May 4, 2022
9e914c1
Ensure that the video channel exists when mounting VideoRoomView
robintown May 4, 2022
4dc7c06
Fix lint
robintown May 4, 2022
2190ffd
Iterate beta reload warning
robintown May 4, 2022
315ed63
Merge branch 'develop' into video-rooms-beta
robintown May 4, 2022
6dc1afd
Merge branch 'develop' into video-rooms-beta
robintown May 6, 2022
ca262d0
Merge branch 'develop' into video-rooms-beta
robintown May 6, 2022
5fcbf71
Merge branch 'develop' into video-rooms-beta
robintown Jun 9, 2022
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
3 changes: 1 addition & 2 deletions res/css/structures/_VideoRoomView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ limitations under the License.
margin-right: calc($container-gap-width / 2);

background-color: $header-panel-bg-color;
padding-top: 33px; // to match the right panel chat heading
border: 8px solid $header-panel-bg-color;
padding: 8px;
border-radius: 8px;

.mx_AppTile {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/beta/_BetaCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ limitations under the License.
}
}

.mx_BetaCard_disclaimer {
.mx_BetaCard_faq {
font-size: $font-12px;
line-height: $font-15px;
color: $secondary-content;
Expand Down
Binary file added res/img/betas/video_rooms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 17 additions & 13 deletions src/components/structures/SpaceRoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,19 +339,23 @@ const SpaceLandingAddButton = ({ space }) => {
}
}}
/>
{ videoRoomsEnabled && <IconizedContextMenuOption
label={_t("New video room")}
iconClassName="mx_RoomList_iconNewVideoRoom"
onClick={async (e) => {
e.preventDefault();
e.stopPropagation();
closeMenu();

if (await showCreateNewRoom(space, RoomType.ElementVideo)) {
defaultDispatcher.fire(Action.UpdateSpaceHierarchy);
}
}}
/> }
{ videoRoomsEnabled && (
<IconizedContextMenuOption
label={_t("New video room")}
iconClassName="mx_RoomList_iconPlus"
onClick={async (e) => {
e.preventDefault();
e.stopPropagation();
closeMenu();

if (await showCreateNewRoom(space, RoomType.ElementVideo)) {
defaultDispatcher.fire(Action.UpdateSpaceHierarchy);
}
}}
>
<BetaPill />
</IconizedContextMenuOption>
) }
</> }
<IconizedContextMenuOption
label={_t("Add existing room")}
Expand Down
6 changes: 3 additions & 3 deletions src/components/views/beta/BetaCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const BetaCard = ({ title: titleOverride, featureId }: IProps) => {
const {
title,
caption,
disclaimer,
faq,
image,
feedbackLabel,
feedbackSubheading,
Expand Down Expand Up @@ -138,8 +138,8 @@ const BetaCard = ({ title: titleOverride, featureId }: IProps) => {
{ content }
</AccessibleButton>
</div>
{ disclaimer && <div className="mx_BetaCard_disclaimer">
{ disclaimer(value) }
{ faq && <div className="mx_BetaCard_faq">
{ faq(value) }
</div> }
</div>
<div className="mx_BetaCard_columns_image_wrapper">
Expand Down
21 changes: 20 additions & 1 deletion src/components/views/context_menus/SpaceContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

import React, { useContext } from "react";
import { Room } from "matrix-js-sdk/src/models/room";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { EventType, RoomType } from "matrix-js-sdk/src/@types/event";

import { IProps as IContextMenuProps } from "../../structures/ContextMenu";
import IconizedContextMenu, { IconizedContextMenuOption, IconizedContextMenuOptionList } from "./IconizedContextMenu";
Expand Down Expand Up @@ -136,6 +136,7 @@ const SpaceContextMenu = ({ space, hideHeader, onFinished, ...props }: IProps) =

const hasPermissionToAddSpaceChild = space.currentState.maySendStateEvent(EventType.SpaceChild, userId);
const canAddRooms = hasPermissionToAddSpaceChild && shouldShowComponent(UIComponent.CreateRooms);
const canAddVideoRooms = canAddRooms && SettingsStore.getValue("feature_video_rooms");
const canAddSubSpaces = hasPermissionToAddSpaceChild && shouldShowComponent(UIComponent.CreateSpaces);

let newRoomSection: JSX.Element;
Expand All @@ -149,6 +150,14 @@ const SpaceContextMenu = ({ space, hideHeader, onFinished, ...props }: IProps) =
onFinished();
};

const onNewVideoRoomClick = (ev: ButtonEvent) => {
ev.preventDefault();
ev.stopPropagation();

showCreateNewRoom(space, RoomType.ElementVideo);
onFinished();
};

const onNewSubspaceClick = (ev: ButtonEvent) => {
ev.preventDefault();
ev.stopPropagation();
Expand All @@ -169,6 +178,16 @@ const SpaceContextMenu = ({ space, hideHeader, onFinished, ...props }: IProps) =
onClick={onNewRoomClick}
/>
}
{ canAddVideoRooms &&
<IconizedContextMenuOption
data-test-id='new-video-room-option'
iconClassName="mx_SpacePanel_iconPlus"
label={_t("Video room")}
onClick={onNewVideoRoomClick}
>
<BetaPill />
</IconizedContextMenuOption>
}
{ canAddSubSpaces &&
<IconizedContextMenuOption
data-test-id='new-subspace-option'
Expand Down
14 changes: 10 additions & 4 deletions src/components/views/elements/FacePile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ interface IProps extends HTMLAttributes<HTMLSpanElement> {

const FacePile: FC<IProps> = ({ members, faceSize, overflow, tooltip, children, ...props }) => {
const faces = members.map(
tooltip ?
m => <MemberAvatar key={m.userId} member={m} width={faceSize} height={faceSize} /> :
m => <TooltipTarget key={m.userId} label={m.name}>
<MemberAvatar member={m} width={faceSize} height={faceSize} viewUserOnClick={!props.onClick} />
tooltip
? m => <MemberAvatar key={m.userId} member={m} width={faceSize} height={faceSize} hideTitle />
: m => <TooltipTarget key={m.userId} label={m.name}>
<MemberAvatar
member={m}
width={faceSize}
height={faceSize}
viewUserOnClick={!props.onClick}
hideTitle
/>
</TooltipTarget>,
);

Expand Down
61 changes: 35 additions & 26 deletions src/components/views/rooms/RoomList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import IconizedContextMenu, {
IconizedContextMenuOptionList,
} from "../context_menus/IconizedContextMenu";
import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
import { BetaPill } from "../beta/BetaCard";
import SpaceStore from "../../../stores/spaces/SpaceStore";
import {
isMetaSpace,
Expand Down Expand Up @@ -239,19 +240,23 @@ const UntaggedAuxButton = ({ tabIndex }: IAuxButtonProps) => {
tooltip={canAddRooms ? undefined
: _t("You do not have permissions to create new rooms in this space")}
/>
{ SettingsStore.getValue("feature_video_rooms") && <IconizedContextMenuOption
label={_t("New video room")}
iconClassName="mx_RoomList_iconNewVideoRoom"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
closeMenu();
showCreateNewRoom(activeSpace, RoomType.ElementVideo);
}}
disabled={!canAddRooms}
tooltip={canAddRooms ? undefined
: _t("You do not have permissions to create new rooms in this space")}
/> }
{ SettingsStore.getValue("feature_video_rooms") && (
<IconizedContextMenuOption
label={_t("New video room")}
iconClassName="mx_RoomList_iconNewVideoRoom"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
closeMenu();
showCreateNewRoom(activeSpace, RoomType.ElementVideo);
}}
disabled={!canAddRooms}
tooltip={canAddRooms ? undefined
: _t("You do not have permissions to create new rooms in this space")}
>
<BetaPill />
</IconizedContextMenuOption>
) }
<IconizedContextMenuOption
label={_t("Add existing room")}
iconClassName="mx_RoomList_iconAddExistingRoom"
Expand Down Expand Up @@ -283,19 +288,23 @@ const UntaggedAuxButton = ({ tabIndex }: IAuxButtonProps) => {
PosthogTrackers.trackInteraction("WebRoomListRoomsSublistPlusMenuCreateRoomItem", e);
}}
/>
{ SettingsStore.getValue("feature_video_rooms") && <IconizedContextMenuOption
label={_t("New video room")}
iconClassName="mx_RoomList_iconNewVideoRoom"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
closeMenu();
defaultDispatcher.dispatch({
action: "view_create_room",
type: RoomType.ElementVideo,
});
}}
/> }
{ SettingsStore.getValue("feature_video_rooms") && (
<IconizedContextMenuOption
label={_t("New video room")}
iconClassName="mx_RoomList_iconNewVideoRoom"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
closeMenu();
defaultDispatcher.dispatch({
action: "view_create_room",
type: RoomType.ElementVideo,
});
}}
>
<BetaPill />
</IconizedContextMenuOption>
) }
</> }
<IconizedContextMenuOption
label={_t("Explore public rooms")}
Expand Down
54 changes: 31 additions & 23 deletions src/components/views/rooms/RoomListHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,20 @@ const RoomListHeader = ({ onVisibilityChange }: IProps) => {
closePlusMenu();
}}
/>
{ videoRoomsEnabled && <IconizedContextMenuOption
iconClassName="mx_RoomListHeader_iconNewVideoRoom"
label={_t("New video room")}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
showCreateNewRoom(activeSpace, RoomType.ElementVideo);
closePlusMenu();
}}
/> }
{ videoRoomsEnabled && (
<IconizedContextMenuOption
iconClassName="mx_RoomListHeader_iconNewVideoRoom"
label={_t("New video room")}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
showCreateNewRoom(activeSpace, RoomType.ElementVideo);
closePlusMenu();
}}
>
<BetaPill />
</IconizedContextMenuOption>
) }
</>;
}

Expand Down Expand Up @@ -312,19 +316,23 @@ const RoomListHeader = ({ onVisibilityChange }: IProps) => {
closePlusMenu();
}}
/>
{ videoRoomsEnabled && <IconizedContextMenuOption
label={_t("New video room")}
iconClassName="mx_RoomListHeader_iconNewVideoRoom"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
defaultDispatcher.dispatch({
action: "view_create_room",
type: RoomType.ElementVideo,
});
closePlusMenu();
}}
/> }
{ videoRoomsEnabled && (
<IconizedContextMenuOption
label={_t("New video room")}
iconClassName="mx_RoomListHeader_iconNewVideoRoom"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
defaultDispatcher.dispatch({
action: "view_create_room",
type: RoomType.ElementVideo,
});
closePlusMenu();
}}
>
<BetaPill />
</IconizedContextMenuOption>
) }
</>;
}
if (canExploreRooms) {
Expand Down
11 changes: 9 additions & 2 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,14 @@
"Encryption": "Encryption",
"Experimental": "Experimental",
"Developer": "Developer",
"Video rooms": "Video rooms",
"A new way to chat over voice and video in Element.": "A new way to chat over voice and video in Element.",
"Video rooms are always-on VoIP channels embedded within a room in Element.": "Video rooms are always-on VoIP channels embedded within a room in Element.",
"How can I create a video room?": "How can I create a video room?",
"Use the “+” button in the room section of the left panel.": "Use the “+” button in the room section of the left panel.",
"Can I use text chat alongside the video call?": "Can I use text chat alongside the video call?",
"Yes, the chat timeline is displayed alongside the video.": "Yes, the chat timeline is displayed alongside the video.",
"Thank you for trying the beta, please go into as much detail as you can so we can improve it.": "Thank you for trying the beta, please go into as much detail as you can so we can improve it.",
"Let moderators hide messages pending moderation.": "Let moderators hide messages pending moderation.",
"Report to moderators prototype. In rooms that support moderation, the `report` button will let you report abuse to room moderators": "Report to moderators prototype. In rooms that support moderation, the `report` button will let you report abuse to room moderators",
"Show options to enable 'Do not disturb' mode": "Show options to enable 'Do not disturb' mode",
Expand All @@ -882,9 +890,7 @@
"How can I leave the beta?": "How can I leave the beta?",
"To leave, return to this page and use the “%(leaveTheBeta)s” button.": "To leave, return to this page and use the “%(leaveTheBeta)s” button.",
"Leave the beta": "Leave the beta",
"Thank you for trying the beta, please go into as much detail as you can so we can improve it.": "Thank you for trying the beta, please go into as much detail as you can so we can improve it.",
"Custom user status messages": "Custom user status messages",
"Video rooms (under active development)": "Video rooms (under active development)",
"Render simple counters in room header": "Render simple counters in room header",
"Multiple integration managers (requires manual setup)": "Multiple integration managers (requires manual setup)",
"Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)",
Expand Down Expand Up @@ -2917,6 +2923,7 @@
"Forget": "Forget",
"Mentions only": "Mentions only",
"See room timeline (devtools)": "See room timeline (devtools)",
"Video room": "Video room",
"Space": "Space",
"Space home": "Space home",
"Manage & explore rooms": "Manage & explore rooms",
Expand Down
Loading