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

Quick Replies for Chat Plugin #1004

Closed
lizhutter opened this issue Feb 16, 2021 · 7 comments · Fixed by #1478
Closed

Quick Replies for Chat Plugin #1004

lizhutter opened this issue Feb 16, 2021 · 7 comments · Fixed by #1478
Assignees

Comments

@lizhutter
Copy link
Contributor

lizhutter commented Feb 16, 2021

Text + Suggestions (buttons) currently don’t create buttons in neither the chat plugin nor messaging UI.

As an example, it would be a good idea render a button below “some text” here:
screenshot_2021-02-16_at_18 14 54

Suggestion Requirements

  • A row of suggested replies that appear as a row of suggestion chips following the associated message. Maximum 13 suggestions, with a maximum of 25 characters each.

  • The chips only display when the associated message is the most recent message within the conversation (including both system user and contact messages). The contact can tap a suggested reply to send the text reply to the system user.

  • The chips will disappear when one has been clicked, so it is an ephemeral element of a conversation.

  • These suggestions (buttons) should be displayed horizontally below the plain text that prompts them.

Note: Chips are compact elements that represent an input, attribute, or action. Chips allow users to enter information, make selections, filter content, or trigger actions.

Inspiration:

image

Payload

{
   "conversation_id": "<CONVERSATION_ID>",
   "message": {
       "text": "Pick a color:",
       "quick_replies":[
          {
           "content_type":"text",
           "title":"Red",
           "payload":"<POSTBACK_PAYLOAD>"
          },{
           "content_type":"text",
           "title":"Green",
           "payload":"<POSTBACK_PAYLOAD>"
          }    
       ]
   }
}
@lucapette
Copy link
Contributor

this is currently not supported by the live chat plugin and it's unclear if this is a request to support the feature (it reads more like a bug report... so I'm just trying to clarify)

@lizhutter
Copy link
Contributor Author

if I'm not mistaken, @steffh and I discussed it as a feature similar to what facebook calls "quick replies" - so plain text with a button below it... I think it fits more as a request to support the feature; that was a mistake on my end!

@lizhutter lizhutter changed the title Bug: Text + Suggestions Not Rendering Buttons (Rich Cards) Text + Suggestions: Rendering Buttons (Rich Cards) Feb 24, 2021
@steffh
Copy link
Collaborator

steffh commented Feb 24, 2021

this seems to be a duplicate to this ticket #862 and be also part of that ticket: #1072

i think we can close it as this is already being worked on. (unless it is not obvious that it should render both in the messaging ui and in the chat plugin - or is that a given since it uses the same library?)

@lucapette
Copy link
Contributor

@steffh how can it be a duplicate if we're talking about different sources? The ability to render structured data is source dependent so, say you want to render "suggestions from google" like we did in #862 for the chat plugin as a source (basically using their payloads in our own source), we have to implement the feature.

I believe the source of confusion here is around the fact we add rendering capabilities to core via a TypeScript library. While that's true, it doesn't solve the problem that each source must have their own definitions/ability to render specific payloads. The library solves a different problem (which is only organizational so to speak), it's because we'd have to duplicate the code of the rendering for the chat plugin both in the plugin itself and in the UI.

So if this is the problem, then this is not a duplicate nor a bug report. It's "multiple features" requests in one ticket (which is totally understandable)

@steffh
Copy link
Collaborator

steffh commented Feb 26, 2021

@lucapette okay, got it. if that's the case, we maybe just need to change the title of this ticket here because it currently doesn't say "chat plugin" as the source it is related to.

i just was under the impression we use the same code, because we follow the google standard in the payload, but as i can see you seem to duplicate that and treat it per source even if you copy code, but that's most likely a smart choice as sources can indeed take different directions.

@lizhutter lizhutter changed the title Text + Suggestions: Rendering Buttons (Rich Cards) Chat Plugin: Text + Suggestions - Rendering Buttons (Rich Cards) Feb 26, 2021
@lizhutter lizhutter changed the title Chat Plugin: Text + Suggestions - Rendering Buttons (Rich Cards) Chat Plugin: Text + Suggestions - Support Rendering Buttons (Rich Cards) Mar 16, 2021
@lizhutter lizhutter changed the title Chat Plugin: Text + Suggestions - Support Rendering Buttons (Rich Cards) Chat Plugin: Text + Suggestions - Support Rendering Buttons Mar 16, 2021
@bitboxer
Copy link
Contributor

Sorry, but from reading this I am still not clear where the data is coming from that will be displayed here.

@AitorAlgorta
Copy link
Contributor

Since this is in the chatplugin source we define the data we want to send, like we do with the RichCards. We can follow the same payload structure as the RichCards, and adapt it.

@AitorAlgorta AitorAlgorta changed the title Chat Plugin: Text + Suggestions - Support Rendering Buttons Quick Replies for Chat Plugin Mar 25, 2021
@stayprodio stayprodio self-assigned this Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants