amazon-connect / amazon-connect-chat-interface

Amazon Connect Chat Interface - a browser-based customer chat widget for your website integrating with Amazon Connect ChatJS
https://docs.aws.amazon.com/connect/latest/adminguide/what-is-amazon-connect.html
MIT No Attribution
36 stars 39 forks source link

Remove rest of localization code and FormattedMessage components #20

Closed johnmryan closed 3 years ago

johnmryan commented 3 years ago

Issue #, if available: https://github.com/amazon-connect/amazon-connect-chat-interface/issues/16

Description of changes: The commit that removed localization didn't fully remove it. We still had a few instances of the FormattedMessage component, which relies on an IntlProvider existing in your component ancestry.

It doesn't have any visible effect but it does throw console errors saying that it is falling back to a default message type.

The fix: I removed the localization code and re-ran the snapshot tests. Saw that the snapshots end up expecting a <span> there in HTML so I replaced the FormattedMessage elements with spans.

Testing: Tested the UI components of each message changed (I don't think the Header file is actually used anywhere right now, but didn't remove it as part of this PR).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

johnmryan commented 3 years ago

I just realized that the husky hook does a git add -A .. Will push a revision with the unwanted files removed from this PR, and updating the husky pre-commit hook.