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

Creating an additional span #7

Closed
sunnykeerthi opened this issue Oct 24, 2017 · 2 comments
Closed

Creating an additional span #7

sunnykeerthi opened this issue Oct 24, 2017 · 2 comments

Comments

@sunnykeerthi
Copy link

Hi,

The UI that was provided is really beautiful and awesome. Here on top of what ever was provided, I was trying to do the below tasks.

  1. Insert an image just next to the chat bubble.
  2. Add date and time nearby that chat bubble.

But I'm really sorry to say that the code is quite confusing (That's my bad, I've no idea about the Vue.js), I've deployed the files to my S3 and running them.
Please let me know how can I add my own html entities like buttons/span/div etc...

Thanks

@atoa
Copy link
Contributor

atoa commented Oct 25, 2017

Hello,

Thanks for the feedback. Theses are valid features that we may tackle in the future but can't commit resources to it right now. In the mean time, here are some notes for future reference or if you/someone wants to to take a stab at it:

  1. The chat bubble responses from the bot are implemented in the Message.vue file. It uses a Chip component from the Vuetify library. The chip component supports adding avatars/pictures
  2. Similar to the previous item, this could be displayed by the Message.vue component. The Vuex store keeps all the messages in the messages object which is updated using the pushMessage action. This would require adding a date field to the message object in the various places where the pushMessage action is called.
  3. [Please let me know how can I add my own html entities like buttons/span/div etc...] Not sure where you would like to add html entities. As you have seen, this project uses Vue.js. It also uses the awesome Vuetify component framework for the UI widgets. The Vue components implemented by this project can be found under the lex-web-ui/src/components directory. At this point, the chat bubbles do not support raw HTML in bot responses. The chatbot responses are deliberately inserted as text to prevent injection issues (i.e. XSS. In some cases, HTML is stripped or encoded in the responses. This logic is found in the MessageText.vue component. There is an opportunity here to add a new feature to accept/sanitize HTML from a whitelist of tags or to use a simple markup (e.g. markdown). There is a challenge of handling these tags in voice responses.

I'll keep this issue open as a feature request.

@atoa
Copy link
Contributor

atoa commented Jan 12, 2018

The latest release (https://github.com/awslabs/aws-lex-web-ui/releases/tag/0.12.0) added support for Bot avatars and message dates. That takes care of item 1) and 2) in the list above.

The feature are controlled by the avatarImageUrl and showMessageDate config fields under the ui key:

https://github.com/awslabs/aws-lex-web-ui/blob/bd9e9f32fbb25ec8658bb3d1775a5ba735f59fbc/lex-web-ui/src/config/index.js#L159-L163

marsiwala pushed a commit that referenced this issue May 12, 2022
…the simplified UI screens from Wongdoody

Description: The tease bubble should reflect the UI example screens.

Changes:

- Change #1: lex-web-ui/src/components/LexWeb.vue, Line 709
  Set the visibility for the .message-list-wrapper component to 'hidden' so that its container would
  no longer be rendered

- Change #2: lex-web-ui/src/components/LexWeb.vue b/lex-web-ui/src/components/LexWeb.vue - Lines 720-729
  Modified border-radius values in order to make the 'point' on the bottom-right of the tease bubble.
  Added a 'visibility: visible' so that this child container would now be visible after the above change;
  removed the 'margin-right' so that the tease bubble would appear closer to the Hope logo; added a small
  border to the top of the tease bubble to help it stand out against the white input field above it.

- Change #3: lex-web-ui/src/components/LexWeb.vue b/lex-web-ui/src/components/LexWeb.vue - Lines 731-745
  Removed the padding on the dismiss icon; moved the icon to the top-left of the tease bubble; made the
  icon visible for the same reason as above; set a lightgrey background color; made the icon have a
  circular background

- Change #4: src/lex-web-ui-loader/css/lex-web-ui-iframe.css - Lines 24, 43, 88, 111
  Increased height of the tease bubble container and decreased the width; removed the border-radius.

- Change #5: src/lex-web-ui-loader/css/lex-web-ui-iframe.css - Line 71
  Removed the 'display: none' that was making the tease bubble disappear

- Change #6: src/website/custom-chatbot-style.css - Line 26
  Added height and width values to the gutter mode Hope logo as it was appearing off of the page

- Change #7: src/website/custom-chatbot-style.css - Lines 44-59
  Decreased the height and width of the logo container
marsiwala pushed a commit that referenced this issue May 12, 2022
…the simplified UI screens from Wongdoody

Description: The tease bubble should reflect the UI example screens.

Changes:

- Change #1: lex-web-ui/src/components/LexWeb.vue, Line 709
  Set the visibility for the .message-list-wrapper component to 'hidden' so that its container would
  no longer be rendered

- Change #2: lex-web-ui/src/components/LexWeb.vue b/lex-web-ui/src/components/LexWeb.vue - Lines 720-729
  Modified border-radius values in order to make the 'point' on the bottom-right of the tease bubble.
  Added a 'visibility: visible' so that this child container would now be visible after the above change;
  removed the 'margin-right' so that the tease bubble would appear closer to the Hope logo; added a small
  border to the top of the tease bubble to help it stand out against the white input field above it.

- Change #3: lex-web-ui/src/components/LexWeb.vue b/lex-web-ui/src/components/LexWeb.vue - Lines 731-745
  Removed the padding on the dismiss icon; moved the icon to the top-left of the tease bubble; made the
  icon visible for the same reason as above; set a lightgrey background color; made the icon have a
  circular background

- Change #4: src/lex-web-ui-loader/css/lex-web-ui-iframe.css - Lines 24, 43, 88, 111
  Increased height of the tease bubble container and decreased the width; removed the border-radius.

- Change #5: src/lex-web-ui-loader/css/lex-web-ui-iframe.css - Line 71
  Removed the 'display: none' that was making the tease bubble disappear

- Change #6: src/website/custom-chatbot-style.css - Line 26
  Added height and width values to the gutter mode Hope logo as it was appearing off of the page

- Change #7: src/website/custom-chatbot-style.css - Lines 44-59
  Decreased the height and width of the logo container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants