@id === '', the empty string indicates the object is about the message itself
@type === 'Message'
keywords[] contains "PreChatMessage"
Design
The pre-chat message activity leverage Schema.org/Message/keywords to tag the message itself as a "PreChatMessage".
We also want to reuse the suggested actions messageBack actions for starter prompts (image, title, text, and optionally display text). Thus, we need to hide the suggested actions in the send box. This also pave the road for the inline suggested actions feature.
Specific Changes
Added new PreChatMessageActivity to activity middleware of Fluent skin pack
Currently, the pre-chat message activity only supports card action (a.k.a. starter prompts)
Starter prompts are defined by the activity.suggestedActions, they must be messageBack card action
Updated useSuggestedActions to return the activity the suggested actions originated from
Hid suggested actions in the send box if they are inline-d in the activity
Handled styleOptions.maxMessageLength === Infinity' should treat the style option as disabled
[x] I have added tests and executed them locally
[x] I have updated CHANGELOG.md
[x] I have updated documentation
Review Checklist
This section is for contributors to review your work.
[x] Accessibility reviewed (tab order, content readability, alt text, color contrast)
[x] Browser and platform compatibilities reviewed
[x] CSS styles reviewed (minimal rules, no z-index)
[x] ~Documents reviewed (docs, samples, live demo)~
[x] ~Internationalization reviewed (strings, unit formatting)~
[x] package.json and package-lock.json reviewed
[x] ~Security reviewed (no data URIs, check for nonce leak)~
Changelog Entry
Added
Changed
useSuggestedActions
to return the activity the suggested actions originated from, in PR #5255, by @compulimFixed
styleOptions.maxMessageLength
should support any JavaScript number value includingInfinity
, by @compulim, in PR #5255Description
Adding experimental pre-chat message with starter prompts in Fluent skin pack.
Pre-chat message activity is defined as:
type === 'message'
entities[]
contains a https://schema.org/Message object which fulfill the following criteriatype === 'https://schema.org/Message'
@context === 'https://schema.org'
@id === ''
, the empty string indicates the object is about the message itself@type === 'Message'
keywords[]
contains"PreChatMessage"
Design
The pre-chat message activity leverage Schema.org/Message/keywords to tag the message itself as a
"PreChatMessage"
.We also want to reuse the suggested actions
messageBack
actions for starter prompts (image, title, text, and optionally display text). Thus, we need to hide the suggested actions in the send box. This also pave the road for the inline suggested actions feature.Specific Changes
PreChatMessageActivity
to activity middleware of Fluent skin packactivity.suggestedActions
, they must bemessageBack
card actionuseSuggestedActions
to return the activity the suggested actions originated fromstyleOptions.maxMessageLength === Infinity'
should treat the style option as disabledCHANGELOG.md
Review Checklist
z-index
)package.json
andpackage-lock.json
reviewed