-
Notifications
You must be signed in to change notification settings - Fork 249
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
Fixed UI issues for Sidebar #634
base: develop
Are you sure you want to change the base?
Conversation
@Spiral-Memory do I need to test it on some more cases ? |
Really loved the thorough testing done by you in the attached video, I'll review the PR and test myself once and let you know. Thank you so much for your contribution ❤️ |
Once go to design variants, modern design and check if popup mode is working fine after this change and attach a video |
I've attached the popup mode video , |
Hey @Spiral-Memory , are any more tests required ? |
I haven't tested it yet, let the pr preview auto deployment feature get implemented, afterwards, I'll test and let you know if any changes are required |
775f8fd
to
4bd0e53
Compare
Hey @abirc8010, I noticed two issues. Please fix them:
|
To fix this issue, I have to add resize event listener , will that be ok ? |
But why do we need listeners ? Why can't we use media queries to handle it properly ? |
The Sidebar component accepts a style prop in the form of a css object, which makes it difficult to implement media queries effectively. That's why I am considering using a resize event listener instead . |
It is not recommended to use event listeners in this use case. Try using only media queries. You can still write the CSS in the style.js file and pass it. Try to figure out a solution using media queries. |
@Spiral-Memory , I have fixed the issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach seems fine; you are trying to add it to the global styles. However, why can't we add similar media queries and pass them directly to the sidebars, without overriding class styles globally?
As far as I'm aware, you can set media queries in a style object as well, or try using the css attribute with Emotion/React. I'll have to look into it to confirm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to test !
Could you please check, if we can use media queries in style object ?. |
Hey @Spiral-Memory , I fixed the issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to test !
@Spiral-Memory do I need to make any changes? |
I have tested this myself, and it looks good to me. @devanshkansagra @smritidoneria , could you please review and test this PR as well at the following link? Let me know if you have any feedback or concerns: https://rocketchat.github.io/EmbeddedChat/pulls/pr-634 |
hey @Spiral-Memory , @abirc8010 , I noticed one issue I noticed an issue with the thread messages sidebar. When we open the sidebar and click on "Reply to Thread," the user should be redirected to the thread-related chat section. However, this redirection isn’t happening as expected. It works correctly on a tablet viewport but fails on larger and smaller mobile viewports. |
Nice catch, @smritidoneria ! Really appreciate it. @abirc8010, please take a look. I have one concern: if anyone could test this, it would be great. Since it's a global css change, I'm a bit unsure how it will behave when embedded in a website @smritidoneria , if you know how to embed the chat in a website and test it, please try in the right corner with height set to 70% and width set to 40% or something around that. Otherwise, @devanshkansagra , please handle the testing. |
Hey @Spiral-Memory I fixed the issue , now the sidebar will close on clicking reply in thread |
Can you please test this after integrating it to some page and let me know if things are working fine Thanks |
hey @Spiral-Memory , I am not able to publish it to npm to test, and also the official npm package of embeddedChat is not yet updated |
Ok @devanshkansagra |
@@ -1,6 +1,6 @@ | |||
import React, { memo, useContext } from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import { format } from 'date-fns'; | |||
import { format, set } from 'date-fns'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
importing set ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was automatically imported by vs code . It doesn't have a use case in this context, I'll remove it.
@@ -75,7 +75,7 @@ export const getMessageDividerStyles = (theme) => { | |||
line-height: 1rem; | |||
position: relative; | |||
display: flex; | |||
z-index: 1000; | |||
z-index: 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little afraid about z-index changes. It might disturb the existing flow in some situation. Is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Spiral-Memory , actually due to a high value of z-index, the message divider was appearing on top of the sidebar like the image shown , so I had to decrease the value.
Brief Title
This PR fixes UI issues for Sidebar making it responsive
Acceptance Criteria fulfillment
Fixes # (issue)
#629
Video/Screenshots
Screencast.from.2024-10-02.02-07-54.webm
Popup Mode:
popup.webm
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-634 after approval.