Add notification and toast#2883
Merged
compulim merged 70 commits intomicrosoft:masterfrom Feb 14, 2020
Merged
Conversation
tdurnford
reviewed
Feb 6, 2020
tdurnford
reviewed
Feb 6, 2020
Contributor
|
@compulim if this PR is including changes to typing indicator and suggested actions, please include the issues linked in the following comment: #2871 (comment) |
5efde46 to
d375cb7
Compare
tdurnford
reviewed
Feb 10, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
tdurnford
approved these changes
Feb 11, 2020
tdurnford
reviewed
Feb 11, 2020
|
|
||
| const internalMarkdownIt = useMemo(() => new MarkdownIt(), []); | ||
|
|
||
| const internalRenderMarkdownInline = useMemo( |
Contributor
There was a problem hiding this comment.
Do we need to sanitize the resulting HTML? Also do we want the internalMarkdownIt to respect the carriage return style option?
Co-Authored-By: TJ Durnford <[email protected]>
d7913fe to
4674793
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Entry
Added
styleOptions.slowConnectionAfter(in milliseconds)Samples
Description
This is feature work for adding a notification bar to Web Chat.
To add/set/replace a notification entry, use the following code.
Design
Markdown support
All notifications message can be enriched by using Markdown. Hyperlinks will have
rel="noopener noreferrer"andtarget="_blank"added for privacy reasons. Internally, it will use a version of Markdown-It renderer bundled with Web Chat. It will not use the version passed by the dev viarenderMarkdownprop.Sorting notifications
Notifications will be sorted with the most recent one on the top. If a notification is updated, they will be moved to the top of the list.
Updating notifications
All notifications are ID-ed using
id. Notifications can be updated by dispatching `WEB_CHAT/SET_NOTIFICATION with the same ID.After the notification is updated, their timestamp will be updated and they will be moved to the top of the list.
Multiple notifications
When more than one notification is visible, they will be collapsed as an accordion. The accordion can be expanded/collapsed through user gesture.
The color and icon of the accordion will be based on the highest level of all visible notifications.
error>warn>info>success.Connectivity status
Connectivity status will become part of notification and stored in Redux store.
The connectivity status visual will be hidden from the notification bar (i.e.
<BasicNotificationBar>). A new component<BasicConnectivityStatus>will render the connectivity status exclusively.Screenshots
Support Markdown
Multiple notifications
Single "success" notifications
Works under IE11
Specific Changes