Skip to content

style: restyle audio devices dropdown - #22094

Merged
ramonlsouza merged 2 commits into
bigbluebutton:v3.0.x-releasefrom
ramonlsouza:issue-22080
Jan 29, 2025
Merged

ramonlsouza merged 2 commits into
bigbluebutton:v3.0.x-releasefrom
ramonlsouza:issue-22080

Conversation

@ramonlsouza

Copy link
Copy Markdown
Member

What does this PR do?

applies the following changes to the audio devices dropdown:

  • adjusts titles ("Microphone" and "Speakers" text) font-weight to bold
  • removes separator (hr element) between titles and devices
  • switch title icon to the left
  • align available devices text with titles
  • adjust current devices font-weight to bold
  • increase the "current device" icon size and change color to green

Closes Issue(s)

Closes #22080

before

audio-before

after

audio-after

How to test

  1. join a meeting
  2. open audio devices dropdown

@ramonlsouza ramonlsouza added this to the Release 3.0 milestone Jan 27, 2025
@coderabbitai

coderabbitai Bot commented Jan 27, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request focuses on enhancing the audio device selection interface in the BigBlueButton HTML5 client. Changes were made across multiple files to improve the styling and interaction of the audio device selection dialog. Modifications include updates to the rendering logic in the LiveSelection component, the introduction of new style objects in the styles.ts file, and adjustments to menu item styling within the BBBMenu component. Additionally, a localization change was made to update the "Microphones" label to "Microphone". These changes aim to refine the visual representation and user experience of the audio device selection interface.

Assessment against linked issues

Objective Addressed Explanation
Restyle audio devices dialog ✅
Clarify microphone and speaker lists ❓ Partial styling changes made, but full list separation not evident
Improve visual clarity of device selection ✅

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 32fc4a5 and 8da8b9f.

📒 Files selected for processing (1)
  • bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx (1)

Line range hint 7-7: Remove unused import MenuSeparatorItemType.

The import is not being used and causes a TypeScript error.

-import { MenuSeparatorItemType, MenuOptionItemType } from '/imports/ui/components/common/menu/menuTypes';
+import { MenuOptionItemType } from '/imports/ui/components/common/menu/menuTypes';
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2183192 and 32fc4a5.

📒 Files selected for processing (5)
  • bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx (4 hunks)
  • bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/styles.ts (4 hunks)
  • bigbluebutton-html5/imports/ui/components/common/menu/component.jsx (2 hunks)
  • bigbluebutton-html5/imports/ui/components/common/menu/styles.js (1 hunks)
  • bigbluebutton-html5/public/locales/en.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • bigbluebutton-html5/public/locales/en.json
🧰 Additional context used
🪛 GitHub Actions: Typescript - compile code
bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx

[error] 7-7: 'MenuSeparatorItemType' is declared but its value is never read.


[error] 319-319: Object literal may only specify known properties, and 'isSeparator' does not exist in type 'MenuOptionItemType'.

⏰ 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: ts-code-validation
🔇 Additional comments (6)
bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/styles.ts (2)

11-11: LGTM: Added colorSuccess import for current device icon.

The import aligns with the PR objective to change the current device icon color to green.


74-74: LGTM: Style changes align with design requirements.

The changes effectively implement the requested styling:

  • Consistent font size for labels
  • Bold font weight for selected items
  • Aligned padding for device labels
  • Green color and increased size for current device icon

Also applies to: 84-86, 88-90, 92-94

bigbluebutton-html5/imports/ui/components/common/menu/styles.js (1)

146-146: LGTM: Added specificity for icon color on hover.

The !important directive ensures consistent icon coloring in hover/focus states across different device selections.

bigbluebutton-html5/imports/ui/components/common/menu/component.jsx (1)

121-129: LGTM: Added support for custom icon styling.

Clean implementation of icon style customization:

  • Initializes empty iconStyles object
  • Merges with provided styles if available
  • Applies styles to IconRight component

Also applies to: 164-164

bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/buttons/LiveSelection.tsx (2)

159-162: LGTM: Updated title icon and interaction.

The changes align with the PR objective to reposition the title icon to the left.


182-183: LGTM: Enhanced device styling logic.

Good implementation of conditional styling for devices:

  • Uses DeviceLabel for non-selected devices
  • Applies SelectedLabel and SelectedLabelIcon for current device

Comment on lines +291 to +294
.concat({
key: 'separator-01',
isSeparator: true,
} as MenuOptionItemType)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Potential issue

isSeparator property missing in MenuOptionItemType interface

The type definition in menuTypes.ts does not include the isSeparator property, making the type assertion unsafe. Add the property to the interface or create a proper type structure for separator items.

  • bigbluebutton-html5/imports/ui/components/common/menu/menuTypes.ts: Add isSeparator?: boolean to MenuOptionItemType
🔗 Analysis chain

Fix TypeScript error in separator implementation.

The isSeparator property is not defined in MenuOptionItemType. This needs to be fixed in the type definition.

Also applies to: 299-299

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Find the MenuOptionItemType definition
ast-grep --pattern 'type MenuOptionItemType = {
  $$$
}'

Length of output: 864

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

@ramonlsouza
ramonlsouza merged commit 2262e2a into bigbluebutton:v3.0.x-release Jan 29, 2025
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.

Restyle the audio devices dialog

2 participants