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
Livestreaming typing animation #5141
Merged
Merged
Conversation
This file contains 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
compulim
changed the title
Livestreaming typing animation
[DRAFT] Livestreaming typing animation
Apr 20, 2024
OEvgeny
reviewed
Apr 23, 2024
compulim
changed the title
[DRAFT] Livestreaming typing animation
Livestreaming typing animation
May 15, 2024
compulim
requested review from
a-b-r-o-w-n,
cwhitten,
srinaath,
tdurnford and
beyackle2
as code owners
May 15, 2024 07:06
tdurnford
previously approved these changes
May 15, 2024
OEvgeny
reviewed
May 15, 2024
OEvgeny
previously approved these changes
May 15, 2024
OEvgeny
approved these changes
May 15, 2024
Awesome. Can't wait to t try this out👍👍👍 |
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
channelData.webChat.styleOptions.typingIndicatorDuration
to override the default typing indicator duration on a per-activity basis, by @compulim, in PR #5141Description
Added livestreaming support and per-activity typing indicator duration.
Currently, we only support streaming contents. In future, we will support informative message indicating streaming status.
Design
Livestreaming
Add livestreaming support via "typing" activity with "text" field.
The following JSONs are not strictly enforced in Web Chat. However, for best compatibility across clients, bot authors are expected to follow the format.
Support of attachments and other features varies across clients. Bot authors should test their bot on individual clients.
Multiple simultaneous livestream session is supported. Make sure each session has its own unique ID.
First chunk
The first chunk indicates start of a livestream session.
Subsequent chunks
Final chunk
The final chunk will "close" the livestreaming session with a finalized message.
Per-activity typing indicator duration
Bot author can specify how long a typing indicator should show up for a specific activity via
channelData.webChat.styleOptions.typingIndicatorDuration
.Currently, the
channelData.webChat.styleOptions
only supportstypingIndicatorDuration
. The broader support ofstyleOptions
is being tracked by #5185.Specific Changes
useGetActivitiesByKey
to support "multiple activity revisions"WebChatActivity.channelData.webChat.styleOptions.typingIndicatorDuration
propertystyleOptions.typingIndicatorDuration
for the specific activityWebChatActivity.channelData.webChat.receivedAt
property to indicate when the activity is received by Web ChatHOOKS.md
to include theuseGetActivitiesByKey
and some missing hooksCHANGELOG.md
Review Checklist
Accessibility reviewed (tab order, content readability, alt text, color contrast)Browser and platform compatibilities reviewedz-index
)Internationalization reviewed (strings, unit formatting)package.json
andpackage-lock.json
reviewedSecurity reviewed (no data URIs, check for nonce leak)