From 56124cadaf7e0ce3a256aaa3e5e00c1bf8d4699d Mon Sep 17 00:00:00 2001 From: Paul Trudel Date: Fri, 20 Oct 2023 15:27:40 +0000 Subject: [PATCH 01/10] Set current time when timer reset --- .../src/main/scala/org/bigbluebutton/core/apps/TimerModel.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/TimerModel.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/TimerModel.scala index e5f62d29ae..555721d9ba 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/TimerModel.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/TimerModel.scala @@ -16,7 +16,7 @@ object TimerModel { def reset(model: TimerModel) : Unit = { model.accumulated = 0 - model.startedAt = 0 + model.startedAt = System.currentTimeMillis() model.endedAt = 0 } From 610c1cb417d1176fd7edc13088b30846af4bb3d1 Mon Sep 17 00:00:00 2001 From: Paul Trudel Date: Fri, 20 Oct 2023 15:35:54 +0000 Subject: [PATCH 02/10] Reset started at to 0 if timer not running --- .../main/scala/org/bigbluebutton/core/apps/TimerModel.scala | 4 ++-- .../src/main/scala/org/bigbluebutton/core/db/TimerDAO.scala | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/TimerModel.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/TimerModel.scala index 555721d9ba..2d5d4663ef 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/TimerModel.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/TimerModel.scala @@ -16,7 +16,7 @@ object TimerModel { def reset(model: TimerModel) : Unit = { model.accumulated = 0 - model.startedAt = System.currentTimeMillis() + model.startedAt = if (model.running) System.currentTimeMillis() else 0 model.endedAt = 0 } @@ -24,7 +24,7 @@ object TimerModel { model.isActive = active } - def getIsACtive(model: TimerModel): Boolean = { + def getIsActive(model: TimerModel): Boolean = { model.isActive } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/TimerDAO.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/TimerDAO.scala index 2737f2c50f..d458b5d3a9 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/TimerDAO.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/TimerDAO.scala @@ -1,7 +1,7 @@ package org.bigbluebutton.core.db import org.bigbluebutton.core.apps.TimerModel -import org.bigbluebutton.core.apps.TimerModel.{getAccumulated, getEndedAt, getIsACtive, getRunning, getStartedAt, getStopwatch, getTime, getTrack} +import org.bigbluebutton.core.apps.TimerModel.{getAccumulated, getEndedAt, getIsActive, getRunning, getStartedAt, getStopwatch, getTime, getTrack} import slick.jdbc.PostgresProfile.api._ import scala.util.{Failure, Success} @@ -59,7 +59,7 @@ object TimerDAO { TableQuery[TimerDbTableDef] .filter(_.meetingId === meetingId) .map(t => (t.stopwatch, t.running, t.active, t.time, t.accumulated, t.startedAt, t.endedAt, t.songTrack)) - .update((getStopwatch(timerModel), getRunning(timerModel), getIsACtive(timerModel), getTime(timerModel), getAccumulated(timerModel), getStartedAt(timerModel), getEndedAt(timerModel), getTrack(timerModel)) + .update((getStopwatch(timerModel), getRunning(timerModel), getIsActive(timerModel), getTime(timerModel), getAccumulated(timerModel), getStartedAt(timerModel), getEndedAt(timerModel), getTrack(timerModel)) ) ).onComplete { case Success(rowsAffected) => DatabaseConnection.logger.debug(s"$rowsAffected row(s) updated on Timer table!") From bbbf6f73bcab3a4a8e5ad4c720d2a3f7eb26e0ff Mon Sep 17 00:00:00 2001 From: Guilherme Pereira Leme <69865537+GuiLeme@users.noreply.github.com> Date: Fri, 27 Oct 2023 13:54:00 -0300 Subject: [PATCH 03/10] [plugin-sdk-fix-data-channel-dispatcher] - fix dispatcher (#19015) --- .../plugins-engine/plugin-data-channel/container.tsx | 1 + .../dataChannelItemManager/container.tsx | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-data-channel/container.tsx b/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-data-channel/container.tsx index 125181c3d2..4472e8aabe 100644 --- a/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-data-channel/container.tsx +++ b/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-data-channel/container.tsx @@ -70,6 +70,7 @@ const PluginDataChannelManagerContainer: React.ElementType )) diff --git a/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-data-channel/dataChannelItemManager/container.tsx b/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-data-channel/dataChannelItemManager/container.tsx index 90879f2db8..468ef3b027 100644 --- a/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-data-channel/dataChannelItemManager/container.tsx +++ b/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-data-channel/dataChannelItemManager/container.tsx @@ -7,6 +7,7 @@ import { PLUGIN_DATA_CHANNEL_DISPATCH_QUERY, PLUGIN_DATA_CHANNEL_FETCH_QUERY } f export interface DataChannelItemManagerProps { pluginName: string; channelName: string; + pluginApi: PluginSdk.PluginApi } export interface MutationVariables { @@ -23,6 +24,7 @@ export const DataChannelItemManager: React.ElementType { window.dispatchEvent( From 8648a4cc7e217736a8bb4709561738afeb6a05c2 Mon Sep 17 00:00:00 2001 From: Guilherme Pereira Leme <69865537+GuiLeme@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:27:32 -0300 Subject: [PATCH 04/10] feat(plugin): use latest plugin SDK version (#19016) --- bigbluebutton-html5/package-lock.json | 6 +++--- bigbluebutton-html5/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bigbluebutton-html5/package-lock.json b/bigbluebutton-html5/package-lock.json index 2d737c23b6..431ce19e06 100644 --- a/bigbluebutton-html5/package-lock.json +++ b/bigbluebutton-html5/package-lock.json @@ -3754,9 +3754,9 @@ "dev": true }, "bigbluebutton-html-plugin-sdk": { - "version": "0.0.20", - "resolved": "https://registry.npmjs.org/bigbluebutton-html-plugin-sdk/-/bigbluebutton-html-plugin-sdk-0.0.20.tgz", - "integrity": "sha512-JJqKLcdKA6FR8gK+QYkL0MAbTpDR/Xug4/9Rm6WVTEi3nKREx+MJAUr5ayb4MFVSKT3vl5M2MPmVrdt9fRgSqg==" + "version": "0.0.21", + "resolved": "https://registry.npmjs.org/bigbluebutton-html-plugin-sdk/-/bigbluebutton-html-plugin-sdk-0.0.21.tgz", + "integrity": "sha512-qxh2hWhDXm6gTyQ6AzCZc+Phr6z1Do14WnAuWJZYx5u2hk36EcMRNrWiF+pJqwqftOhIadUOKPcKyy3GI9Zw9g==" }, "bintrees": { "version": "1.0.2", diff --git a/bigbluebutton-html5/package.json b/bigbluebutton-html5/package.json index 5465772f1b..7b76899404 100644 --- a/bigbluebutton-html5/package.json +++ b/bigbluebutton-html5/package.json @@ -45,7 +45,7 @@ "autoprefixer": "^10.4.4", "axios": "^0.21.3", "babel-runtime": "~6.26.0", - "bigbluebutton-html-plugin-sdk": "0.0.20", + "bigbluebutton-html-plugin-sdk": "0.0.21", "bowser": "^2.11.0", "browser-bunyan": "^1.8.0", "classnames": "^2.2.6", From ddc16279f7ebda73912481c89dce72b60d942bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Mon, 30 Oct 2023 10:33:01 -0300 Subject: [PATCH 05/10] fix keyboard access on chat list --- .../user-messages/chat-list/component.tsx | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-messages/chat-list/component.tsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-messages/chat-list/component.tsx index 6dfd23dce1..2cc57282c9 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-messages/chat-list/component.tsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-messages/chat-list/component.tsx @@ -43,28 +43,12 @@ const ChatList: React.FC = ({ chats }) => { const [selectedChat, setSelectedChat] = React.useState(); const { roving } = Service; - React.useEffect(() => { - messageListRef.current?.addEventListener( - 'keydown', - rove, - true, - ); - - return () => { - messageListRef.current?.removeEventListener( - 'keydown', - rove, - true, - ); - }; - }, [messageListRef]); - React.useEffect(() => { const firstChild = (selectedChat as HTMLElement)?.firstChild; if (firstChild && firstChild instanceof HTMLElement) firstChild.focus(); }, [selectedChat]); - const rove = (event: KeyboardEvent) => { + const rove = (event: React.KeyboardEvent) => { // eslint-disable-next-line react/no-find-dom-node const msgItemsRef = findDOMNode(messageItemsRef.current); const msgItemsRefChild = msgItemsRef?.firstChild; @@ -84,6 +68,7 @@ const ChatList: React.FC = ({ chats }) => { role="tabpanel" tabIndex={0} ref={messageListRef} + onKeyDown={rove} > From f6babd558c6784b64ab8a8376d581079c5136c15 Mon Sep 17 00:00:00 2001 From: Guilherme Pereira Leme <69865537+GuiLeme@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:05:45 -0300 Subject: [PATCH 06/10] feat(plugin): New Hook useUsersOverview (#19028) * bump sdk * [plugin-sdk-issue-45] - useUsersOverview implementation * [plugin-sdk-issue-45 ] - bump version --- .../plugin-hooks-handler/container.tsx | 2 + .../use-users-overview/container.tsx | 41 +++++++++++++++++++ .../imports/ui/core/graphql/queries/users.ts | 10 +++++ bigbluebutton-html5/package-lock.json | 6 +-- bigbluebutton-html5/package.json | 2 +- 5 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-hooks-handler/use-users-overview/container.tsx diff --git a/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-hooks-handler/container.tsx b/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-hooks-handler/container.tsx index 731c1b261a..a09fd08d50 100644 --- a/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-hooks-handler/container.tsx +++ b/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-hooks-handler/container.tsx @@ -4,6 +4,7 @@ import React, { useEffect, useState } from 'react'; import * as PluginSdk from 'bigbluebutton-html-plugin-sdk'; import CurrentPresentationHookContainer from './use-current-presentation/container'; import LoadedUserListHookContainer from './use-loaded-user-list/container'; +import UsersOverviewHookContainer from './use-users-overview/container'; import CurrentUserHookContainer from './use-current-user/container'; const hooksMap:{ @@ -12,6 +13,7 @@ const hooksMap:{ [PluginSdk.Internal.BbbHooks.UseCurrentPresentation]: CurrentPresentationHookContainer, [PluginSdk.Internal.BbbHooks.UseLoadedUserList]: LoadedUserListHookContainer, [PluginSdk.Internal.BbbHooks.UseCurrentUser]: CurrentUserHookContainer, + [PluginSdk.Internal.BbbHooks.UseUsersOverview]: UsersOverviewHookContainer, }; const PluginHooksHandlerContainer: React.FC = () => { diff --git a/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-hooks-handler/use-users-overview/container.tsx b/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-hooks-handler/use-users-overview/container.tsx new file mode 100644 index 0000000000..e7b0cb1a45 --- /dev/null +++ b/bigbluebutton-html5/imports/ui/components/plugins-engine/plugin-hooks-handler/use-users-overview/container.tsx @@ -0,0 +1,41 @@ +import { useEffect, useState } from 'react'; +import { useSubscription } from '@apollo/client'; +import * as PluginSdk from 'bigbluebutton-html-plugin-sdk'; +import { USERS_OVERVIEW } from '/imports/ui/core/graphql/queries/users'; + +const UsersOverviewHookContainer = () => { + const [sendSignal, setSendSignal] = useState(false); + + const { data: usersData } = useSubscription(USERS_OVERVIEW); + + const updateUsersOverviewForPlugin = () => { + window.dispatchEvent(new CustomEvent(PluginSdk.Internal.BbbHookEvents.Update, { + detail: { + data: usersData?.user, + hook: PluginSdk.Internal.BbbHooks.UseUsersOverview, + }, + })); + }; + + useEffect(() => { + updateUsersOverviewForPlugin(); + }, [usersData, sendSignal]); + + useEffect(() => { + const updateHookUseUsersOverview = () => { + setSendSignal(!sendSignal); + }; + window.addEventListener( + PluginSdk.Internal.BbbHookEvents.Subscribe, updateHookUseUsersOverview, + ); + return () => { + window.removeEventListener( + PluginSdk.Internal.BbbHookEvents.Subscribe, updateHookUseUsersOverview, + ); + }; + }, []); + + return null; +}; + +export default UsersOverviewHookContainer; diff --git a/bigbluebutton-html5/imports/ui/core/graphql/queries/users.ts b/bigbluebutton-html5/imports/ui/core/graphql/queries/users.ts index f0d634d393..d44b8898d3 100644 --- a/bigbluebutton-html5/imports/ui/core/graphql/queries/users.ts +++ b/bigbluebutton-html5/imports/ui/core/graphql/queries/users.ts @@ -69,7 +69,17 @@ export const USER_AGGREGATE_COUNT_SUBSCRIPTION = gql` } `; +export const USERS_OVERVIEW = gql` +subscription Users { + user { + userId + name + role + } +}`; + export default { USER_LIST_SUBSCRIPTION, USER_AGGREGATE_COUNT_SUBSCRIPTION, + USERS_OVERVIEW, }; diff --git a/bigbluebutton-html5/package-lock.json b/bigbluebutton-html5/package-lock.json index 431ce19e06..c5caec6a6a 100644 --- a/bigbluebutton-html5/package-lock.json +++ b/bigbluebutton-html5/package-lock.json @@ -3754,9 +3754,9 @@ "dev": true }, "bigbluebutton-html-plugin-sdk": { - "version": "0.0.21", - "resolved": "https://registry.npmjs.org/bigbluebutton-html-plugin-sdk/-/bigbluebutton-html-plugin-sdk-0.0.21.tgz", - "integrity": "sha512-qxh2hWhDXm6gTyQ6AzCZc+Phr6z1Do14WnAuWJZYx5u2hk36EcMRNrWiF+pJqwqftOhIadUOKPcKyy3GI9Zw9g==" + "version": "0.0.22", + "resolved": "https://registry.npmjs.org/bigbluebutton-html-plugin-sdk/-/bigbluebutton-html-plugin-sdk-0.0.22.tgz", + "integrity": "sha512-CyULo4yKPjnwPTnD2bX86WUl/6aja+cOMOpaOwecK5ojqogIt03ZptbF1S5tawgmEJEC/5D4I0+m8aLNSpryhQ==" }, "bintrees": { "version": "1.0.2", diff --git a/bigbluebutton-html5/package.json b/bigbluebutton-html5/package.json index 7b76899404..4fe90dda6e 100644 --- a/bigbluebutton-html5/package.json +++ b/bigbluebutton-html5/package.json @@ -45,7 +45,7 @@ "autoprefixer": "^10.4.4", "axios": "^0.21.3", "babel-runtime": "~6.26.0", - "bigbluebutton-html-plugin-sdk": "0.0.21", + "bigbluebutton-html-plugin-sdk": "0.0.22", "bowser": "^2.11.0", "browser-bunyan": "^1.8.0", "classnames": "^2.2.6", From aa051fc72c83a592a3ebfcab3100f955da59c54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Mon, 30 Oct 2023 15:22:48 -0300 Subject: [PATCH 07/10] Fix: Chat poll results --- .../chat-message/message-content/poll-content/component.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/message-content/poll-content/component.tsx b/bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/message-content/poll-content/component.tsx index 9743ceceb8..291c102e39 100644 --- a/bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/message-content/poll-content/component.tsx +++ b/bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/message-content/poll-content/component.tsx @@ -61,13 +61,13 @@ const ChatPollContent: React.FC = ({ {pollData.questionText} - + - + From 2d6da1212d206ba865990d4ea169c3351f65c444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Mon, 30 Oct 2023 15:50:32 -0300 Subject: [PATCH 08/10] Client: Multi user white board number clickable --- .../presentation/presentation-toolbar/component.jsx | 6 +++++- .../components/presentation/presentation-toolbar/styles.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx index f9522716a3..805ed5971f 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx @@ -461,7 +461,11 @@ class PresentationToolbar extends PureComponent { hideLabel /> {multiUser ? ( - {multiUserSize} + this.handleSwitchWhiteboardMode(!multiUser)} + > + {multiUserSize} + ) : ( )} diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js index 21b52c0767..8320d8ee3b 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js @@ -225,6 +225,7 @@ const MultiUserTool = styled.span` align-items: center; box-shadow: 1px 1px ${borderSizeLarge} ${colorGrayDark}; font-size: ${smPaddingX}; + user-select: none; [dir="ltr"] & { right: 1rem; From bc5ac506107b12ef5ec203c7d8038bb8da9d3226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Mon, 30 Oct 2023 16:00:12 -0300 Subject: [PATCH 09/10] Fix: Talking indicador too close from user list button --- .../nav-bar/nav-bar-graphql/talking-indicator/styles.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/talking-indicator/styles.ts b/bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/talking-indicator/styles.ts index 79baa94e5e..49defcbfb9 100644 --- a/bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/talking-indicator/styles.ts +++ b/bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/talking-indicator/styles.ts @@ -143,6 +143,7 @@ const IsTalkingWrapper = styled.div` flex-direction: row; position: relative; overflow: hidden; + margin-top: 0.5rem; `; const Speaking = styled.div` From 2c850ca49f01369b40241a9c6328867b390902b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Tue, 31 Oct 2023 09:10:03 -0300 Subject: [PATCH 10/10] Update bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js --- .../ui/components/presentation/presentation-toolbar/styles.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js index 8320d8ee3b..6c9ece64b4 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js @@ -226,6 +226,7 @@ const MultiUserTool = styled.span` box-shadow: 1px 1px ${borderSizeLarge} ${colorGrayDark}; font-size: ${smPaddingX}; user-select: none; + cursor: pointer; [dir="ltr"] & { right: 1rem;