RocketChat / EmbeddedChat

An easy to use full-stack component (ReactJS) embedding Rocket.Chat into your webapp
https://rocketchat.github.io/EmbeddedChat/docs
113 stars 228 forks source link

add the modal to confirm pinning message #451

Closed Akshun-01 closed 7 months ago

Akshun-01 commented 7 months ago

Implement Confirmation before Pinning Message feature

Acceptance Criteria fulfillment

Fixes #450

Video/Screenshots

https://github.com/RocketChat/EmbeddedChat/assets/93793691/6aba3367-b9f0-4706-a27d-abf84223fc47

Akshun-01 commented 7 months ago

Hey @abhinavkrin, I wanted to add the current message instead of the quoted text. Just like here to maintain consistency. image

Do you know if there is any pre-existing component for it in the Modal? Or should I make one myself?

Could you please review the changes and provide feedback. Thanks! ^^

Spiral-Memory commented 7 months ago

You can use the code similar to this to achieve it with some tweaks:

 <MessageAvatarContainer
    message={message}
    sequential={false}
    isStarred={false}
/>
<MessageBodyContainer>
    {<MessageHeader message={message} isTimeStamped={false} />}
    <MessageBody>
        {message.attachments && message.attachments.length > 0 ? (
            message.file.name
        ) : (
            message.msg
        )}
    </MessageBody>
    <MessageMetrics
        message={message}
        isReplyButton={false}
    />
</MessageBodyContainer>
Akshun-01 commented 7 months ago

I made the changes! This is the current status, and I would love to hear about any feedback or changes required.

https://github.com/RocketChat/EmbeddedChat/assets/93793691/87288b3e-e3b5-4e40-a723-22dee4241a01

Akshun-01 commented 7 months ago

These have conflicts in files, that I didn't change. So I will open a new PR for this with the latest branch and these changes.

Closing this one!