-
Notifications
You must be signed in to change notification settings - Fork 236
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 Inconsistencies while quoting messages #605
Conversation
Hey @devanshkansagra, Thanks for the contribution. While quoting messages, there's a sideline that appears and quotes the message. It seems like you simply removed it, which shouldn't be the case. Please also try it in Storybook so that we can see the changes across all design variants. It must work properly in all variants. Additionally, I don't think it's a good idea to show thumbnails in "QuoteBox." Images look fine, but video and audio appear way too big. |
Okay will check that |
Hey maintainers, I have fixed the issue of recursive quoting, but I got stucked at styling of recursive quoting of messages in curved variants, I have explored a lot, but I didn't get any clue. So anyone could please suggest me, what kind of design improvements I need to make to fix this This is the design issue in curved variant It looks proper in other variants (Ex StormySeas) |
Hey @devanshkansagra It looks good ! Let me know the exact problem you are facing in fixing the design in curved variant as well |
Also please update the video with your latest changes |
Most basically the improper alignment in curved variants |
Updated the video |
Checked your video, Great work! Can we fix this as well before fixing for the curved variant, that it should display the actual message here instead of msg link: Also, in recursive quoting, the video / image is not visible, I know you have let me know about it that even with main RC it doesn't work, but it would be great if you find a fix for that as well if possible. Thanks! |
will fix and make the recursive quote preview look like RC |
Hey maintainers, Can you review my pull request? So that I can follow up any changes if needed |
Hey @devanshkansagra I watched your video, it's looking good ! However in recursive quoting, attachment is not getting displayed right ? I'll review the code to see if it's not breaking anything.. Thanks a lot for the contribution ! |
This issue is there with the main RC, hence it is not able to display the attachment while recursive quoting |
Ohh Okay ! Let me see it, I'll let you know |
Sure |
@@ -14,6 +14,8 @@ const Attachment = ({ attachment, host, type, variantStyles = {} }) => { | |||
attachment={attachment} | |||
host={host} | |||
variantStyles={variantStyles} | |||
authorIcon={attachment.author_icon} |
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.
Send only one prop, i.e., author
or authorInfo
, and destructure where required. If possible, try not to send extra props. If required, send author
.
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.
Okay will change this
@@ -44,6 +51,42 @@ const Attachment = ({ attachment, host, type, variantStyles = {} }) => { | |||
/> | |||
); | |||
} | |||
if (attachment && attachment.attachments[0]?.image_url) { |
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.
Why introduce redundant rendering of a component? Instead, you can add the required condition where we are already using ImageAttachment
, AudioAttachment
, and VideoAttachment
.
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.
It was easier for me to implement like this and this is also a conditional based rendering
}) => { | ||
const { RCInstance } = useContext(RCContext); | ||
const { colors } = useTheme(); | ||
const getUserAvatarUrl = (icon) => { |
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.
prop name such as authorUrl here will be better.
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.
Okay will change this
return URL; | ||
}; | ||
const styles = useQuoteMessageStyles(); | ||
const setQuoteMessage = useMessageStore((state) => state.setQuoteMessage); | ||
|
||
const { classNames, styleOverrides } = useComponentOverrides('QuoteMessage'); | ||
|
||
// Function to render the message content or attachment preview | ||
const renderMessageContent = () => { |
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.
Let's not have a function here like this, try using JSX with required conditions
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.
Okay will modify this
… the message is quoted, also implemented the preview of image, audio and video attachment while quoting
…display while quoting
343eb4f
to
3c7c200
Compare
Thank you for contribution @devanshkansagra |
This reverts commit d84157f.
Acceptance Criteria fulfillment
Fixes #563
Video/Screenshots
Screencast.from.2024-07-14.16-41-33.webm