Feat: Display 'Unread Message' Divider Functionality Similar to RC#766
Feat: Display 'Unread Message' Divider Functionality Similar to RC#766dhairyashiil wants to merge 3 commits intoRocketChat:developfrom
Conversation
|
Hi @dhairyashiil , could you modify it with the colors in theme object , so that it looks consistent across different themes ? |
|
Hey @dhairyashiil |
@dhairyashiil pls incorporate this |
Thank you, @Spiral-Memory. Hearing this from you is quite a compliment. Indeed, a Happy New Year! |
Hello Abir, Right now, RC has 3 themes:
Regarding the Embedded Chat, this feature was not present earlier, so now we need to decide which color should be set from the theme. Although I think this red color is suitable for all the themes we currently have, I believe that the 'unread message' should feature an eye-catching color that’s easy to notice. I think the current red handles this well. Abir and @Spiral-Memory, if you still think we should change it according to the theme, please let me know which color to select. |
Hi @dhairyashiil, unlike Rocket Chat, EmbeddedChat is not a standalone chat application. Its primary purpose is to be embedded within any website, allowing external developers to configure and customize it to their preferences. For development purposes, it is presented inside Storybook. You can experiment with passing a theme object through the controls to define your designs. Additionally, you can explore the pre-built themes in the design variants. Instead of hardcoding colors, using colors from the theme object provides external developers with greater flexibility and control over customization.
Maybe you can use theme.colors.destructive or explore other colors in DefaultTheme.js and use lighten or darken to find a suitable shade in default mode and pre defined themes in storybook. |
Thanks for the clarification! I understand that EmbeddedChat is for embedding in websites, not a standalone app like Rocket Chat. I'll explore the theme.colors.destructive, other colors in DefaultTheme.js 👍 |
|
Hello @abirc8010, I tried setting the color from "destructive," but it didn't look good with the dark theme. Later, I explored all the options in I checked it for both light and dark theme variants, and it looks good. |
|
In theme object, there is another key, commonColors or something similar, you can have the required color there.. if that color looks good in all themes provided.. |
|
Hello @Spiral-Memory, I believe that instead of setting it to black or white, setting it to "foreground" is a better option, considering all the different variants and their dark and light themes. Below, I have attached a video where I demonstrate this across different variants and their dark and light themes: unread.message.for.all.variants.in.light.and.dark.theme.2.mp4 |
|
In commonColors, you please add your color as well, if your red color is consistent among all themes |
|
Or go with an error color.. |
|
@Spiral-Memory , Okay, how about this: For all light themes, we will use the 'destructive' color, which is red or sometimes dark red. and |
2ef2985 to
8f3bb40
Compare



Brief Title
Acceptance Criteria fulfillment
Fixes #765
Video/Screenshots:
1.mp4
and
2.mp4
PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-766 after approval. Contributors are requested to replace
<pr_number>with the actual PR number.