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

Improvement: DO-3453 make chat component more flexible and UI updates #344

Conversation

patricia-causalens
Copy link
Contributor

Motivation and Context

Update chat component in order to make it more flexible and with latest design

Implementation Description

  • Updated chat component so that it has a non "popup" version that can be used to embed in other places.
  • Updated so that messages sent by the user now show in a different color.
  • Updated Textarea component so that as you type the are grows for chat component usage
  • Added aria roles etc to improve the component's accessibility

Any new dependencies Introduced

None

How Has This Been Tested?

Locally on storybook and a test app

PR Checklist:

  • I have implemented all requirements? (see JIRA, project documentation).
  • I am not affecting someone else's work, If I am, they are included as a reviewer.
  • I have added relevant tests (unit, integration or regression).
  • I have added comments to all the bits that are hard to follow.
  • I have added/updated Documentation.
  • I have updated the appropriate changelog with a line for my changes.

Screenshots (if appropriate):

chat

Comment on lines +105 to +106
/** Whether the chat is in a popup and should be styled as such */
isPopup?: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be more composable instead if you exposed effectively this component without the wrapper (so 'ChatBody', ReplyWrapper + the logic, intended to be rendered directly) as a 'Chat' component and then a 'ChatPopup' which would wrap the first component? Or are the popup visuals partially in dara-components?
Feels like it could be a nicer pattern than having to do conditional styling, this way the place where we use it can choose to use its own wrapper if need be rather than be stuck with the two provided options.

If it's urgent I'm fine with the current approach but I think it could maybe be improved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is fair. Will make a separate ticket to look into improving this, but given tight timings will merge this one for now

Copy link
Contributor

@tamara-causalens tamara-causalens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@patricia-causalens patricia-causalens merged commit b9e8399 into master Jul 24, 2024
2 checks passed
@patricia-causalens patricia-causalens deleted the DO-3453-make-chat-component-more-flexible-and-ui-updates branch July 24, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants