-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[P0] Send attachment on send #5123
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
force-pushed
the
feat-pending-upload-2
branch
from
April 6, 2024 14:45
5248a1e
to
4fb2386
Compare
This was referenced Oct 25, 2024
Open
Open
Open
Open
Open
Open
Open
Open
Open
This was referenced Nov 1, 2024
Open
Open
Open
Open
Open
Open
Open
Open
Open
Open
This was referenced Nov 8, 2024
Open
Open
Open
Open
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
Breaking changes
useSendMessage
hook is updated to support sending attachments with a message. To reduce complexity, theuseSendFiles
hook is being deprecated. The hook will be removed on or after 2026-04-03styleOptions.uploadThumbnailHeight
andstyleOptions.uploadThumbnailWidth
must be anumber
of pixelsAdded
sendAttachmentOn
style option to send attachments and text in a single activity, by @ms-jb and @compulimuseSendMessage
hook is updated to support sending attachments with a messageuseSendBoxAttachments
hook is added to get/set attachments in the send boxDescription
Added a new
styleOption.sendAttachmentOn
that enables attachments and message text to be sent in a single activity. If enabled, uploaded files are retained until the Send button is pressed to allow for message text to be optionally included. Standalone text works as before.Design
useSendFiles
vs.useSendMessage
As
useSendMessage
hook now supports sending attachments in the message, theuseSendFiles
hook can be obsoleted.We choose to add attachments to
useSendMessage
overuseSendFiles
because if we add text message touseSendFiles
, it will become an uber hook and we would need to deprecateuseSendMessage
. This is undesirable.sendBoxAttachments
hookNew
useSendBoxAttachments
to get/set the attachments in the send box before it is being sent. This works nicely with speech recognition.Simplifying attachments
Some philosophies we applied to simply the SDK design:
{ blob: Blob | File, thumbnailURL?: URL }
, as minimal/intuitive as possible{ iconURL?: URL }
botframework-webchat-component
will help making thumbnails when possibleuseSendMessage
will accept userland attachment. When the hook is called, thumbnails will be generated on-the-flyuseSendFiles
will remain the same and acceptBlob | File
. When the hook is called, thumbnails will be generated on-the-flyuseSendBoxAttachments
will accept userland attachment. However, it will not automatically generate thumbnailsSpecific Changes
useSendBoxAttachments
hook to get/set attachments in the send boxuseSendMessage
hook to addattachments
useSendFiles
hook<UploadButton>
to show checkmark when files are attachedstyleOptions.sendAttachmentOn
"attach"
will send the message with attachment when files are attached (legacy)"send"
will send the message with attachment when the send button is tapped (default)CHANGELOG.md
Review Checklist
z-index
)package.json
andpackage-lock.json
reviewed