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

feat(next speaker notification) #14904

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

liumengyuan1997
Copy link
Contributor

Hi reviewer,

This pull request added the next speaker notification feature to the web application. However, the variable naming is a problem. If you have good ideas about the naming, please let me know.

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@mihhu mihhu added the gsoc Appropriate for GSoC students to tackle label Jul 9, 2024
@liumengyuan1997 liumengyuan1997 force-pushed the next-speaker-notification branch 3 times, most recently from 8a74a71 to 0fd660f Compare July 16, 2024 05:27
lang/main.json Outdated Show resolved Hide resolved
@liumengyuan1997
Copy link
Contributor Author

Hi Saghul and Mihaela @saghul @mihhu, hope you are doing well! I finished editing this PR. Please review it if you have time. Thanks!

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

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

One minor comment about always returning a boolean and we are good to go!

react/features/base/config/functions.any.ts Outdated Show resolved Hide resolved
react/features/base/config/functions.any.ts Outdated Show resolved Hide resolved
case NOTIFIED_TO_SPEAK: {
return {
...state,
raisedHandsQueue: state.raisedHandsQueue.map((item, index) => {
Copy link
Member

Choose a reason for hiding this comment

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

Great work!

...state,
raisedHandsQueue: state.raisedHandsQueue.map((item, index) => {
if (index === 0) {
return { ...item,
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to clone the item entirely, since we only depend on the queue being unique, but it won't hurt either.

@liumengyuan1997
Copy link
Contributor Author

Hi Saghul @saghul, I have completed the code updates. Please let me know if any further actions are required. Thanks!

export function hasBeenNotified(state: IReduxState): boolean {
const raisedHandsQueue = state['features/base/participants'].raisedHandsQueue;

return Boolean(raisedHandsQueue[0].hasBeenNotified);
Copy link
Member

Choose a reason for hiding this comment

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

I would check here if the first element exists, like you did above with the optional chaining operator, otherwise it would throw an error

Copy link
Member

@mihhu mihhu left a comment

Choose a reason for hiding this comment

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

🔥

@mihhu mihhu merged commit c04000e into jitsi:master Jul 31, 2024
8 checks passed
@liumengyuan1997 liumengyuan1997 deleted the next-speaker-notification branch July 31, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc Appropriate for GSoC students to tackle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants