Skip to content

fix(chat): Slightly tweak message time label position - #21725

Merged
ramonlsouza merged 1 commit into
bigbluebutton:v3.0.x-releasefrom
JoVictorNunes:chat-message-time-label-1121
Nov 25, 2024
Merged

ramonlsouza merged 1 commit into
bigbluebutton:v3.0.x-releasefrom
JoVictorNunes:chat-message-time-label-1121

Conversation

@JoVictorNunes

@JoVictorNunes JoVictorNunes commented Nov 21, 2024 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Does a small change to the position of the message time label, preventing it from both overlapping the message text and being overlapped by the toolbar.

Before

Screenshot from 2024-11-21 11-01-47

Now

Screenshot from 2024-11-21 10-51-01

Screenshot from 2024-11-21 10-50-48

Closes Issue(s)

n/a

@coderabbitai

coderabbitai Bot commented Nov 21, 2024 •

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request introduces modifications to the styled components in the chat-message/styles.ts file within the chat module of the application. The changes include the removal of the smPadding variable, indicating its redundancy in the styling. The ChatContentFooter component has been significantly updated, with its padding and bottom properties changed to fixed values of 0.25rem. Additionally, the line-height and font-size properties have been added to enhance the component's styling. The left and right properties for ChatContentFooter have also been simplified, moving from variable padding to a fixed value. The ChatHeader component now conditionally applies padding based on the isRTL prop, ensuring responsiveness to text direction. Minor adjustments have been made to the ChatAvatar component, particularly in how the moderator prop affects its border-radius. Overall, the changes reflect a move towards fixed values for certain properties, aiming for greater layout consistency.

Possibly related PRs

Suggested reviewers

  • ramonlsouza

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 46fda48 and fbabec2.

📒 Files selected for processing (1)
  • bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/styles.ts (1 hunks)
🔇 Additional comments (2)
bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/styles.ts (2)

115-117: LGTM! The time label positioning looks good.

The changes to bottom spacing and text properties should effectively prevent the time label from overlapping with the message content. The fixed values and controlled line height provide better consistency.

Let's verify there are no regressions in other chat message variations:

✅ Verification successful

The time label positioning changes look safe to apply

Since we cannot find any other chat message components that override or depend on the ChatContentFooter styling, the changes to fix the time label positioning with fixed values appear safe. The modifications provide better consistency by using fixed rem units and controlled line height.

The changes are isolated to this specific component's styling and don't risk affecting other parts of the chat interface. The values chosen (0.25rem bottom, line-height 1, and 95% font-size) are reasonable for maintaining proper spacing and readability of the time label.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for different chat message variations that might be affected
rg -l "ChatContentFooter|chat.*message" --type ts --type tsx

# Look for any custom styling overrides
rg "bottom:.*(rem|px)" --type css --type scss

Length of output: 167


Script:

#!/bin/bash
# Search for different chat message variations that might be affected
rg -l "ChatContentFooter|chat.*message"

# Look for any custom styling overrides for bottom positioning
rg "bottom:\s*[0-9.]+(rem|px)"

Length of output: 125508


Script:

#!/bin/bash
# Search for chat message styling files and their content
fd -e ts -e tsx -e css "chat.*message" --type f --exec rg -l "bottom:"

# Look for any related chat message components that might be affected
fd -e ts -e tsx "chat.*message" --type f --exec rg -l "ChatContentFooter"

Length of output: 144


123-123: Verify the reduced horizontal spacing with different message types.

The change from $3xlPadding to 0.25rem significantly reduces the horizontal spacing. While this keeps the time label closer to the message, let's verify it works well with:

  • Long messages
  • Messages with reactions
  • System messages
  • Custom plugin messages

Let's check for any special message type handling:

Also applies to: 127-127

✅ Verification successful

Reduced spacing works well with all message types

The change from $3xlPadding to 0.25rem for the time label positioning is safe because:

  1. The time label has a dedicated styling block with proper RTL/LTR support
  2. The time label is positioned absolutely with respect to its container
  3. Special message types (system, presentation upload, custom plugin) have their own styling that doesn't interfere with the time label positioning:
    • System messages have background and border styling
    • Presentation uploads have left border and padding
    • Custom plugin messages have margin/padding resets
  4. The time label has proper spacing from the message content with:
    • Bottom spacing: bottom: 0.25rem
    • Left/right spacing: left/right: 0.25rem
    • Background and border-radius for visibility
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Look for special message type definitions and styling
rg "isSystemSender|isPresentationUpload|isCustomPluginMessage" --type ts --type tsx

# Check for reaction-related styling that might conflict
rg "reaction.*style|emoji.*style" --type ts --type tsx

Length of output: 198


Script:

#!/bin/bash
# Look for special message type definitions and styling without file type restrictions
rg "isSystemSender|isPresentationUpload|isCustomPluginMessage"

# Check for reaction-related styling that might conflict
rg "reaction.*style|emoji.*style"

# Look for message type definitions and related styles
rg "messageType|MessageType" -A 3

# Check the specific style file for context around the changed positioning
rg -A 5 -B 5 "\$3xlPadding" bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/styles.ts

Length of output: 107794


Script:

#!/bin/bash
# Look for the specific style file and its context around the changed positioning
rg -C 10 "left: 0\.25rem" bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/styles.ts

# Look for any special message styling in the same file
rg -C 5 "isSystemSender|isPresentationUpload|isCustomPluginMessage" bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/styles.ts

# Check for reaction-related styling in the same file
rg -C 5 "reaction|emoji" bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/styles.ts

Length of output: 3204


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 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.

@github-actions

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

@antobinary antobinary added this to the Release 3.0 milestone Nov 21, 2024
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 participants