Attachment by Prompt
Joule / Patterns / Attachment by Prompt
Intro
The attachment feature allows users to upload various types of documents when prompted by Joule.
Attachment upload on compact (left) and regular (right) screens.
Usage
Do
Use the attachment pattern when the user is prompted by Joule to upload a document
Don't
Don’t use the attachment pattern for user-initiated file upload. Due to technical reasons, only Joule can initiate the attachment flow.
- Avoid using an overlay behind the attachment sheet to ensure that the user can read Joule's message to upload a file.
- Display sent attachments in a user text message bubble-like container.
- Use icons as file thumbnails.
Anatomy
Attachment Sheet
The attachment sheet is displayed over the Joule panel without an overlay and consists of the following component features.
A. Navigation Bar
Contains a label and a “Close” icon button that allows users to dismiss the attachment sheet and cancel the attachment flow.
B. Attachment Form Cell
Allows users to upload files by tapping on the “Add (+)” button.
C. Toolbar Container
The toolbar contains the “Submit” button, which allows users to send attached files. It is disabled by default and only becomes active once a file has been uploaded.
Anatomy of attachment sheet
Sent Attachment Bubble
A. Bubble
Sent attachments are displayed in a text message bubble within the conversation.
B. Attachment Form Cell
Sent attachments are displayed as a list of object cells. Each attachment contains an icon thumbnail, file name, and “Download” icon.
Tapping an attachment cell lets users view the file.
Anatomy of sent attachments bubble
Behavior and Interaction
Uploading Attachments
Uploading attachments
Submitting Attachments
Submitting attachments
Variations
Error States
Joule can encounter various types of errors. The following errors specifically relate to failures in uploading or loading attachments.
Upload Error
The attachment form cell contains in-line error handling if a file type is not supported, or a file size exceeds the 10 MB limit.
Error handling for upload errors
Loading Error
If the attachment flow gets disrupted, or sent attachments fail to load after submitting, the illustrated message displays the error.
Error handling for loading error
Adaptive Design
Attachment Sheet
The attachment sheet adapts to the width of the Joule panel. The height should not exceed the Joule panel height.
Attachment sheet on compact screen (left) and regular screen (right)
Sent Attachment Bubble
The sent attachment bubble follows the same behavior as the user text message bubble. The width of the container is limited to the width of user text messages to ensure consistency and readability.
Sent attachments on compact screen (left) and regular screen (right)
Resources
Joule for Android: Attachment by Prompt
Joule for Web: Joule Web UI Kit Guidelines
Related Components/Patterns: Attachment Form Cell