Skip to content

fix: Clear all reactions missing - #23307

Merged
antobinary merged 1 commit into
bigbluebutton:v3.0.x-releasefrom
ramonlsouza:issue-23296
Jun 2, 2025
Merged

antobinary merged 1 commit into
bigbluebutton:v3.0.x-releasefrom
ramonlsouza:issue-23296

Conversation

@ramonlsouza

Copy link
Copy Markdown
Member

What does this PR do?

restores "clear all reactions" menu item in userlist dropdown

Closes Issue(s)

Closes #23296

How to test

  1. Start a session.
  2. Join as a moderator.
  3. Hit the Gear ⚙ icon.

@ramonlsouza ramonlsouza added this to the Release 3.0 milestone Jun 2, 2025
@ramonlsouza
ramonlsouza requested a review from gabriellpr June 2, 2025 16:48
@coderabbitai

coderabbitai Bot commented Jun 2, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

The changes introduce a "Clear All Reactions" feature to the user options dropdown in the user list component. This involves importing a new GraphQL mutation, a notification service, and a hook to check if reactions are enabled. A new action is added to the dropdown menu, visible to moderators when reactions are enabled. Selecting this action triggers the mutation to clear all reactions and displays a notification. Additionally, a new English localization string for the notification message is added.

Sequence Diagram(s)

sequenceDiagram
    participant Moderator
    participant UI (User Options Dropdown)
    participant GraphQL API
    participant Notification Service

    Moderator->>UI (User Options Dropdown): Opens dropdown
    UI (User Options Dropdown)->>UI (User Options Dropdown): Checks if reactions are enabled and user is moderator
    alt If enabled and moderator
        Moderator->>UI (User Options Dropdown): Clicks "Clear All Reactions"
        UI (User Options Dropdown)->>GraphQL API: Send CLEAR_ALL_REACTION mutation
        GraphQL API-->>UI (User Options Dropdown): Returns mutation result
        UI (User Options Dropdown)->>Notification Service: Show "Cleared all user reactions" toast
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
Add "Clear all reactions" menu item for moderators in user options (#23296) ✅
Ensure the action is visible regardless of reactions being set (#23296) ✅
Trigger clearing all reactions and notify user (#23296) ✅

Suggested reviewers

  • gabriellpr

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5136aa and b93f250.

📒 Files selected for processing (2)
  • bigbluebutton-html5/imports/ui/components/user-list/user-list-graphql/user-participants-title/user-options-dropdown/component.tsx (5 hunks)
  • bigbluebutton-html5/public/locales/en.json (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
bigbluebutton-html5/imports/ui/components/user-list/user-list-graphql/user-participants-title/user-options-dropdown/component.tsx (2)
bigbluebutton-html5/imports/ui/core/graphql/queries/users.ts (1)
  • GET_USER_NAMES (82-91)
bigbluebutton-html5/imports/ui/services/features/index.js (3)
  • useIsLearningDashboardEnabled (15-17)
  • useIsBreakoutRoomsEnabled (43-45)
  • useIsReactionsEnabled (83-87)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: build-package (others)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (bbb-graphql-server)
  • GitHub Check: build-package (bbb-playback-record)
  • GitHub Check: build-package (bbb-config)
🔇 Additional comments (6)
bigbluebutton-html5/public/locales/en.json (1)

213-213: LGTM: Well-placed localization string

The new localization string follows the established naming convention and is appropriately placed within the user list options section. The message text is clear and concise for a notification context.

bigbluebutton-html5/imports/ui/components/user-list/user-list-graphql/user-participants-title/user-options-dropdown/component.tsx (5)

23-27: LGTM: Clean import additions

The new imports are well-organized and logically placed:

  • useIsReactionsEnabled correctly added to the existing features import
  • GraphQL mutation and notification service imports are appropriate for the new functionality

Also applies to: 30-30, 33-33


116-127: LGTM: Consistent internationalization

The new message definitions follow the established pattern with proper id and description fields. The naming convention is consistent with existing user list options messages.


195-195: LGTM: Proper hook integration

The hooks are correctly implemented following the established patterns:

  • useMutation for the GraphQL operation
  • useIsReactionsEnabled for feature detection

Also applies to: 200-200


249-252: LGTM: Well-implemented action handler

The clearReactions function correctly:

  • Calls the GraphQL mutation
  • Provides user feedback through a notification with appropriate icon
  • Uses internationalized messaging

306-313: LGTM: Properly configured menu action

The new action is well-structured with:

  • Correct conditional visibility (reactions enabled + moderator only)
  • Proper unique key and appropriate icon
  • Complete internationalization
  • Correct event handler binding
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud

sonarqubecloud Bot commented Jun 2, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 2, 2025

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

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.

[3.0] Clear all reactions missing

3 participants