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

Adding Quote feature in EmbeddedChat #172

Open
2 tasks
KOMALDEWNANI opened this issue Mar 4, 2023 · 12 comments
Open
2 tasks

Adding Quote feature in EmbeddedChat #172

KOMALDEWNANI opened this issue Mar 4, 2023 · 12 comments
Labels
enhancement New feature or request

Comments

@KOMALDEWNANI
Copy link
Contributor

As an EmbeddedChat developer

I need to:
Add a Quote Functionality
So That:
users would be able to easily reference and respond to specific messages by simply selecting the quote option and selecting the message they want to reference. This would make conversations more organized and efficient, as users would no longer need to manually copy and paste previous messages in order to reference them.
Acceptance Criteria

  • Design the user interface for the quote feature, including how users will select messages to quote and how the quoted messages will be displayed.
  • Develop the code for the quote feature, integrating it into the existing chat system.
@KOMALDEWNANI KOMALDEWNANI added the enhancement New feature or request label Mar 4, 2023
@KOMALDEWNANI
Copy link
Contributor Author

Hey @sidmohanty11, I would like to work on this issue. Please assign it to me. Thanks!

@YashTote
Copy link

YashTote commented Jul 6, 2023

@sidmohanty11 Is this issue assigned to someone? I would like to work on this and submit the PR ASAP.

@sidmohanty11
Copy link
Collaborator

Hey, @YashTote thanks a lot for showing interest in this feature. We are currently in the mid of a major refactoring spree and any feature addition is actually put on hold for a bit. But still, if you want to contribute feel free to take a pull from the develop branch, get in touch with @abhinavkrin regarding the development steps on https://open.rocket.chat and create a PR to that branch. Thanks!

@umangutkarsh
Copy link
Contributor

Hey @sidmohanty11 . Is this feature required?

@umangutkarsh
Copy link
Contributor

Hey @sidmohanty11 . Is this feature required?

If required, I'm working on this one.

@sidmohanty11
Copy link
Collaborator

Hey @umangutkarsh sorry for the late response! Go ahead!

@umangutkarsh
Copy link
Contributor

umangutkarsh commented Dec 31, 2023

Hey @sidmohanty11 . No worries. I am currently working on this.

This is the solution I've come up with and the approach I'm following:

  1. Create a quote UI button to add messages to be quoted above the text-area of ChatInput component
  2. When clicking the button, adding the messsage to an array.
  3. The state of this array and the methods to make changes to it's state (i.e., addQuoteMessage(), removeQuoteMessage, clearQuoteMessage) will be managed by a context API from which the methods and states can be used anywhere in any component.
  4. Context API is used to avoid having to pass the data as a prop at every level of the component tree.
  5. The UI of the current QuotedMessage will be rendered by a QuoteAttachment component, this component will have an attachment prop, and an onCancel prop to remove the message from the array of quotedMessages.
  6. When the message is sent, then if there are quotedMessages in the array, will be sent as an attachment with the current sent message.

The code is almost ready, just the rendering of the quotedMessages as an attachment is left.

Please review this if I should work further on this.

@umangutkarsh
Copy link
Contributor

umangutkarsh commented Jan 2, 2024

Hi @sidmohanty11 . Please let me know whenever you are available.
Thanks

@umangutkarsh
Copy link
Contributor

umangutkarsh commented Jan 6, 2024

Hey @sidmohanty11 . No worries. I am currently working on this.

This is the solution I've come up with and the approach I'm following:

  1. Create a quote UI button to add messages to be quoted above the text-area of ChatInput component
  2. When clicking the button, adding the messsage to an array.
  3. The state of this array and the methods to make changes to it's state (i.e., addQuoteMessage(), removeQuoteMessage, clearQuoteMessage) will be managed by a context API from which the methods and states can be used anywhere in any component.
  4. Context API is used to avoid having to pass the data as a prop at every level of the component tree.
  5. The UI of the current QuotedMessage will be rendered by a QuoteAttachment component, this component will have an attachment prop, and an onCancel prop to remove the message from the array of quotedMessages.
  6. When the message is sent, then if there are quotedMessages in the array, will be sent as an attachment with the current sent message.

The code is almost ready, just the rendering of the quotedMessages as an attachment is left.

Please review this if I should work further on this.

Hi @sidmohanty11 @abhinavkrin . I've almost integrated the 'Quote-Message feature' for embeddedChat, except for some issues which I'm currently facing. Anything else should I consider? Please let me know
Thanks.

quote.webm

@umangutkarsh
Copy link
Contributor

umangutkarsh commented Jan 21, 2024

Hey @sidmohanty11 . No worries. I am currently working on this.
This is the solution I've come up with and the approach I'm following:

  1. Create a quote UI button to add messages to be quoted above the text-area of ChatInput component
  2. When clicking the button, adding the messsage to an array.
  3. The state of this array and the methods to make changes to it's state (i.e., addQuoteMessage(), removeQuoteMessage, clearQuoteMessage) will be managed by a context API from which the methods and states can be used anywhere in any component.
  4. Context API is used to avoid having to pass the data as a prop at every level of the component tree.
  5. The UI of the current QuotedMessage will be rendered by a QuoteAttachment component, this component will have an attachment prop, and an onCancel prop to remove the message from the array of quotedMessages.
  6. When the message is sent, then if there are quotedMessages in the array, will be sent as an attachment with the current sent message.

The code is almost ready, just the rendering of the quotedMessages as an attachment is left.
Please review this if I should work further on this.

Hi @sidmohanty11 @abhinavkrin . I've almost integrated the 'Quote-Message feature' for embeddedChat, except for some issues which I'm currently facing. Anything else should I consider? Please let me know Thanks.

quote.webm

Hi @abhinavkrin @sidmohanty11 . Should I create a draft PR for this? So that it is easy to review the approach I have followed?
Please let me know. I have spent quite some time to integrate this, except for a few issues which are left to be resolved.

Thanks.

@abhinavkrin
Copy link
Member

Sure @umangutkarsh you can create a draft pr.

@umangutkarsh
Copy link
Contributor

Sure @umangutkarsh you can create a draft pr.

Hi @abhinavkrin . I've created a draft pr, please review it.
I think the issues which are there in this pr, are some backend related issues since the quotedMessages are not rendered as an attachment in the rocket-chat hosted server. Also when the page is reloaded, the quoted-messages are not displayed with the message that is sent.
Is it related to the EmbeddedChatApi.ts file?

Also about the 'Invalid time value' error, I'll look into it.

Please let me know. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants