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

PF-1391 - Adding breakout room example app #226

Merged
merged 36 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5de2644
PF-1391 - Adding breakout room example app
fredcido Nov 15, 2023
147a0a9
PF-1391 - Creating breakout rooms
fredcido Nov 15, 2023
4218f51
PF-1391 - Initiate timer feature in breakout room
fredcido Nov 16, 2023
0eac2b6
PF-1391 - Timer UI
fredcido Nov 16, 2023
dfae4d3
PF-1391 - Adding TODO in styles
fredcido Nov 16, 2023
c80949c
PF-1391 - Implementing ticking time
fredcido Nov 17, 2023
fa90c8e
PF-1391 - Small adjustments in hooks
fredcido Nov 17, 2023
c297e7b
PF-1391 - Fixing session end hooks
fredcido Nov 20, 2023
248219b
Adding demo video
fredcido Nov 20, 2023
70d4831
PF-1391 - Iterating on README with folder structure
fredcido Nov 20, 2023
67b4d48
Remove video from selfie
fredcido Nov 20, 2023
8e2e56d
PF-1391 - Bumping @mirohq/[email protected]
fredcido Nov 20, 2023
815f67e
PF-1391 - Using multiple sessions
fredcido Nov 22, 2023
b3ccb05
UX iterations
fredcido Nov 27, 2023
f4b81e7
Adjusting styles
fredcido Nov 27, 2023
d056eb6
Use avatars
fredcido Nov 27, 2023
5e7a5db
Minor fixes
fredcido Nov 27, 2023
f177fc1
Update README.md
fredcido Nov 27, 2023
0483b91
Remove notes
fredcido Nov 27, 2023
8acd535
Merge branch 'PF-1391' of github.com:miroapp/app-examples into PF-1391
fredcido Nov 27, 2023
1faecbc
Update README.md
fredcido Nov 27, 2023
383c5b4
Update sdk types package
fredcido Nov 27, 2023
3c98937
PF-1391 - Update README with new folder structured
fredcido Nov 28, 2023
9bdd709
PF-1391 - Adding real-time events doc links
fredcido Nov 28, 2023
8369b71
Merge branch 'main' of github.com:miroapp/app-examples into PF-1391
fredcido Nov 28, 2023
8bff2dc
PF-1391 - Bumping @mirohq/sdk-types package to 2.9.10
fredcido Nov 28, 2023
efe1e9a
Update examples/breakout-rooms/src/components/BreakoutManager/Breakou…
fredcido Nov 29, 2023
52d38d6
PF-1391 - Styling using class names
fredcido Nov 29, 2023
b8f5c4f
PF-1391 - Reorganizing styles
fredcido Nov 29, 2023
6d9b63a
PF-1391 - Cleaning up imports
fredcido Nov 29, 2023
eb56091
PF-1391 - Treat facilitator differently
fredcido Nov 29, 2023
75caf1e
Update README.md with video and note about DS
fredcido Nov 29, 2023
8deaf27
PF-1391 - Bump SDK version
fredcido Nov 29, 2023
ad5aa1e
Merge branch 'PF-1391' of github.com:miroapp/app-examples into PF-1391
fredcido Nov 29, 2023
8bfb7bd
PF-1391 - Runs prettier
fredcido Nov 29, 2023
e2b1502
PF-1391 - Bump package
fredcido Nov 29, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@
gap: 1em;
}

.container {
display: flex;
flex-direction: column;
gap: 1em;
align-items: center;
flex: 1;
}

.breakout-controls {
display: flex;
justify-content: space-between;
align-items: center;
}

.validation-messages {
background: #f5f5f3;
padding: 1em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,16 @@ import {
useSelectedItems,
useTimer,
} from "../../hooks";
import { convertTime, formatDisplayTime, isUser } from "../../utils";
import { RoomConfig } from "../RoomConfig/RoomConfig";
import { DEFAULT_TIME, Timer } from "../Timer/Timer";
import {
DropdownMenu,
IconButton,
IconPlus,
IconHandFilled,
IconDotsThreeVertical,
Button,
} from "@mirohq/design-system";
import { formatDisplayTime, isUser } from "../../utils";
import { DEFAULT_TIME } from "../Timer/Timer";
import { Button } from "@mirohq/design-system";

import "./BreakoutManager.css";
import { BreakoutStarter } from "../BreakoutStarter";
import { WaitingList } from "../WaitingList";
import { RoomsManager } from "../RoomsManager";
fredcido marked this conversation as resolved.
Show resolved Hide resolved

import "./BreakoutManager.css";

export const BreakoutManager: React.FC = () => {
const { breakout, rooms, isFacilitator, ...service } = useBreakout();
const onlineUsers = useOnlineUsers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
width: 100%;
}

.starter-action h5 {
.starter-action .starter-action-title {
fredcido marked this conversation as resolved.
Show resolved Hide resolved
font-size: 1em;
font-weight: 600;
line-height: 1.5em;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { IconButton, IconPlus } from "@mirohq/design-system";
import React from "react";

import "./BreakoutStarter.css";
import { WaitingIcon } from "../WaitingIcon";

import "./BreakoutStarter.css";

type Props = {
onAddGroup: () => void;
};
Expand All @@ -20,7 +21,7 @@ export const BreakoutStarter: React.FC<Props> = ({ onAddGroup }) => {
>
<IconPlus />
</IconButton>
<h5>Create a room to get started</h5>
<h5 className="starter-action-title">Create a room to get started</h5>
</div>

<WaitingIcon />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
.rooms-container {
display: flex;
flex-direction: column;
max-height: 25em;
min-height: 10em;
gap: 0.5em;
overflow: auto;
width: 100%;
height: 100%;
}

.rooms-container > p {
text-align: center;
}

.room-container {
.room {
display: flex;
flex-direction: column;
justify-content: center;
Expand All @@ -31,7 +16,7 @@
align-items: center;
}

.room-container h3 {
.room .room-controls-title {
margin: 0;
fredcido marked this conversation as resolved.
Show resolved Hide resolved
margin-right: auto;
white-space: nowrap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
import { OnlineUserInfo } from "@mirohq/websdk-types";

import type { Participant, Room } from "../../types";
import { Avatar } from "../Avatar";

import "./RoomConfig.css";
import { Avatar } from "../Avatar";

export type Props = {
room: Room;
Expand All @@ -36,9 +36,11 @@ export const RoomConfig: React.FunctionComponent<Props> = ({
onRemoveParticipant,
}) => {
return (
<div key={room.id} className="room-container">
<div key={room.id} className="room">
<div className="room-controls">
<h3 title={room.name}>{room.name}</h3>
<h3 className="room-controls-title" title={room.name}>
{room.name}
</h3>
<IconButton
label="Select frame"
variant="ghost"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.container {
display: flex;
flex-direction: column;
gap: 1em;
align-items: center;
flex: 1;
}

.rooms-container {
display: flex;
flex-direction: column;
max-height: 24em;
min-height: 10em;
gap: 0.5em;
overflow: auto;
width: 100%;
}

.breakout-controls {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ import {
IconHandFilled,
IconPlus,
} from "@mirohq/design-system";

import { Timer } from "../Timer";
import { Room } from "../../types";

import "./RoomsManager.css";

export type Props = {
rooms: Room[];
selectedRoom?: Room;
Expand Down Expand Up @@ -59,42 +62,42 @@ export const RoomsManager: React.FC<Props> = ({
onRemoveParticipant={onRemoveParticipant}
/>
))}
<div className="breakout-controls">
<IconButton
label="Add a room"
variant="solid-prominent"
css={{ borderRadius: "100%" }}
onClick={onAddGroup}
>
<IconPlus />
</IconButton>
</section>
<div className="breakout-controls">
<IconButton
label="Add a room"
variant="solid-prominent"
css={{ borderRadius: "100%" }}
onClick={onAddGroup}
>
<IconPlus />
</IconButton>

{canUseTimer && (
<Timer
onSet={onSetTime}
step={convertTime(1, "milliseconds", "minutes")}
/>
)}
{canUseTimer && (
<Timer
onSet={onSetTime}
step={convertTime(1, "milliseconds", "minutes")}
/>
)}

{isFacilitator && (
<DropdownMenu>
<DropdownMenu.Trigger asChild>
<IconDotsThreeVertical />
</DropdownMenu.Trigger>
<DropdownMenu.Content>
<>
<DropdownMenu.Item onClick={() => onReleaseFacilitator()}>
<DropdownMenu.IconSlot>
<IconHandFilled />
</DropdownMenu.IconSlot>
Release facilitator role
</DropdownMenu.Item>
</>
</DropdownMenu.Content>
</DropdownMenu>
)}
</div>
</section>
{isFacilitator && (
<DropdownMenu>
<DropdownMenu.Trigger asChild>
<IconDotsThreeVertical />
</DropdownMenu.Trigger>
<DropdownMenu.Content>
<>
<DropdownMenu.Item onClick={() => onReleaseFacilitator()}>
<DropdownMenu.IconSlot>
<IconHandFilled />
</DropdownMenu.IconSlot>
Release facilitator role
</DropdownMenu.Item>
</>
</DropdownMenu.Content>
</DropdownMenu>
)}
</div>
</div>
);
};
Loading