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

Add Voice and Video call in room header #11444

Merged
merged 13 commits into from
Aug 23, 2023
Merged

Conversation

germain-gg
Copy link
Contributor

@germain-gg germain-gg commented Aug 21, 2023

Screenshot 2023-08-21 at 18 13 33
  • Add Voice and Video call in room header
  • Add thread icon in room header
  • Add room notification icon to room header

Not covered in this pull request

  • Tooltips, they are not built on Compound's side yet
  • The "Element Call or Jitsi" dropdown on video calls. The context menu component does not exist

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

@germain-gg germain-gg added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Aug 21, 2023
Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purely reviewing the package.json change, this looks fine.

Copy link
Contributor

@weeman1337 weeman1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good code wise. Some smaller comments.

Unfortunately my tests weren't successful:

  • If I end a call the buttons don't update and still think there is an ongoing call
  • If people joined the room the buttons won't be enabled

call

image


const hasGroupCall = useCall(room.roomId) !== null;

const functionalMembers = useRoomMembers(room);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does functional mean here? Aren't his just all joined room members?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic is ported over from

const [functionalMembers, mayEditWidgets, mayCreateElementCalls] = useTypedEventEmitterState(

It seems that a functional member is a member that is not a bot according to this JSDoc comment,

all room members that are non-functional (bots etc.).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useRoomMembers does something different here. The legacy code is also annoying, because it assigned the result of getJoinedNonFunctionalMembers to functionalMembers.

→ It should be nonFunctionalMembers (in the old code, out of scope here but also here in the new code)

* @param room the room to track
* @returns the type of notification for this room
*/
export const useRoomThreadNotifications = (room: Room): NotificationColor => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if logic like this (and the call status…) should not better go to a store or something else, that emits events. A hook could then just couple it to the component. If we start using these hooks in many places we will add quite a number of the same event listeners and code execution. This can become heavy, esp. in loops.

Probably not for this PR, but rather for general discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely agree. Maybe worth you adding a discussion point in the web weekly.

Copy link
Contributor

@weeman1337 weeman1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works now. 👍 Still the non-functional room member logic is different than before: #11444 (comment)

Copy link
Contributor

@weeman1337 weeman1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@germain-gg germain-gg enabled auto-merge August 23, 2023 14:00
@germain-gg germain-gg added this pull request to the merge queue Aug 23, 2023
Merged via the queue into develop with commit 3acc905 Aug 23, 2023
@germain-gg germain-gg deleted the germain-gg/room-header-icons branch August 23, 2023 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants