Skip to content

refactor: Introduces user.raiseHand and user.away flags - #18121

Merged
gustavotrott merged 4 commits into
bigbluebutton:v2.7.x-releasefrom
gustavotrott:user-raiseHand-away-flags
Jun 22, 2023
Merged

gustavotrott merged 4 commits into
bigbluebutton:v2.7.x-releasefrom
gustavotrott:user-raiseHand-away-flags

Conversation

@gustavotrott

Copy link
Copy Markdown
Contributor

Add new props user.raiseHand and user.away to the User collection:

{
    "_id" : "oBDopzCswyag7PaFS",
    "name" : "student 1",
    "emoji" : "happy",
    "emojiTime" : 1686228378070.0,
    "raiseHand" : false,
    "raiseHandTime" : 0,
    "away" : true,
    "awayTime" : 1686228378089.0
}

Both props used to be stored within user.emoji prop, but it became confusing (in special with the introduction of the feature Reactions).

This PR also:

  • Add reactions to Learning Dashboard json (TODO: missing UI changes to make use of it)
  • Handle user-notification differently when set or remove away status (instead of treating it as an Emoji)
  • Include Reactions to the Userlist sorting
  • Improve code of Reactions applying Lint rules and removing unnecessary imports

Closes (and motivation description): #18053

@github-actions

github-actions Bot commented Jun 8, 2023

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@antobinary antobinary added this to the Release 2.7 milestone Jun 8, 2023
@Scroody

Scroody commented Jun 8, 2023

Copy link
Copy Markdown
Contributor

If you don't mind I would like to add an extra emoji to the list of reactions, I think this one will be very useful for the community and also completes the columns, because depending on the resolution the list lacks and emoji at the end making it un-aesthetic. The emoji would be the: '1F920'.

@antobinary

Copy link
Copy Markdown
Member

'1F920'

https://emojipedia.org/cowboy-hat-face/
Totally unexpected @Scroody

@gustavotrott
gustavotrott requested a review from lfzawacki June 12, 2023 11:36
@lfzawacki

Copy link
Copy Markdown
Contributor

In general I think these are good changes. Away/raiseHand should be stored as separate data fields since they're already treated as separate entities by the code. What I'm not sure is if we need a new reactionEmoji field. If I got this right when we use the old status system it would use the old 'emoji' field and when we use the new reactions system it would use 'reactionEmoji' but the two are never used at the same time right?

Maybe we could use the same field for both since there's so much code overhead on akka / bbb-messages and html5 for adding a new field. But I'm ok if you guys think it's a good idea to keep it as two separate fields.

@gustavotrott

gustavotrott commented Jun 14, 2023 •

Copy link
Copy Markdown
Contributor Author

Maybe we could use the same field for both since there's so much code overhead on akka / bbb-messages and html5 for adding a new field. But I'm ok if you guys think it's a good idea to keep it as two separate fields.

Hey, thanks for the review!
Yes, I understand your concern and I agree.
On the other hand, I created two different props in order to facilitate future maintenances (by developers that doesn't know it's used by two different things).
Each feature has a different behavior and store different type of data in user.emoji.
Reactions expire after 60 seconds.. EmojiStatus is handled depending of its content whereas EmojiReaction just show it's content.

I think separating things we will avoid problems!
For example, Reactions expire after 60 seconds.. let's say in the future we will move this "expire-process" to akka-apps, and the developer doesn't know about the existence of the legacy emojiStatus... and will make BBB always clear the user.emoji after 60 seconds.
Then we would have a bug!

To ensure clarity, I think it's worth maintaining two separate properties even if it costs us two extra fields.

@lfzawacki

Copy link
Copy Markdown
Contributor

Another thing about the current behavior. The raiseHand and away status do actually obscure the reaction emoji and this was by design, if the user is away or with a raised hand this should be shown instead of the emoji. We could change this but I think we might need a little redesign

@gustavotrott

Copy link
Copy Markdown
Contributor Author

Another thing about the current behavior. The raiseHand and away status do actually obscure the reaction emoji and this was by design, if the user is away or with a raised hand this should be shown instead of the emoji. We could change this but I think we might need a little redesign

Yes! The refactor keep this behavior!
But now it is a design option and not a technical limitation anymore... so it is an option to change it soon!

@gustavotrott

Copy link
Copy Markdown
Contributor Author

Can we merge it @lfzawacki ?
Just checking if you are done with the review

@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@lfzawacki

Copy link
Copy Markdown
Contributor

Merge away

@gustavotrott
gustavotrott merged commit 019cba3 into bigbluebutton:v2.7.x-release Jun 22, 2023
@gustavotrott
gustavotrott deleted the user-raiseHand-away-flags branch March 11, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants