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

Make it possible to display message reactions at the bottom of the message #497

Open
szuperaz opened this issue Nov 3, 2023 · 0 comments

Comments

@szuperaz
Copy link
Contributor

szuperaz commented Nov 3, 2023

Currently, it's only possible with custom CSS code. Example:

@layer defaults {
  @import "stream-chat-angular/src/assets/styles/v2/scss/index.scss";
}

@layer overrides {
  .str-chat__message {
    // Display reactions under the message
    .str-chat__message-inner {
      grid-template-areas:
        "message-bubble options"
        "reactions reactions";
    }
    &.str-chat__message--me {
      .str-chat__message-inner {
        grid-template-areas:
          "options message-bubble"
          "reactions reactions";
      }
    }
  }

  .str-chat__message--with-reactions {
    // Add whitespace after message for separation
    margin-block-end: 0.5rem;

    // Fragile CSS to ensure that avatar is positioned in line with the message bubble
    .str-chat__message-sender-avatar {
      padding-block-end: 32px;
    }
  }
}

The proper solution requires SDK support.

Shortcomings:

  • Fragile CSS
  • Message grouping isn't perfect, see screenshot
Screenshot 2023-11-03 at 13 54 29
@szuperaz szuperaz changed the title Display message reactions at the bottom of the message, not at the top Make it possible to display message reactions at the bottom of the message Nov 3, 2023
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

No branches or pull requests

1 participant