Attachment
Joule / Patterns / Attachment
Intro
The attachment feature allows users to upload various types of documents when prompted by Joule.
Attachment upload flow on compact (left) and expanded (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 a scrim behind the attachment bottom sheet to ensure that the user can read Joule's message to upload a file.
- Display sent attachments in a bubble, like user text messages.
- Use icons as file thumbnails.
Anatomy
Attachment Sheet
The attachment sheet is displayed over the Joule panel as a non-modal bottom sheet with the following component features.
A. Drag Handle
Used to collapse the bottom sheet.
B. App Bar
Displays the “Close” icon button and the header label. Tapping the “Close” icon button lets users dismiss the bottom sheet and cancel the attachment flow.
C. Attachment Form Cell
The attachment form cell lets users upload files by tapping the “Add” button.
D. Footer
The footer 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
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, whereas the download icon lets users download it.
Anatomy of sent attachments
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 is in error state if a file type is not supported, or a file size exceeds the upload limit.
Display an instructive global error message above the disabled "Submit” button to let user know that there is an error. Include a file-specific error message in the subtitle line of the attachment so that the user can identify the error file.
Users need to remove files with errors before they can submit attachments. The “Submit” button remains disabled until the errors are resolved.
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
Attachment bottom sheet on compact (left) and expanded (right) screens
Sent Attachment Bubble
Sent attachments on compact (left) and expanded (right) screens
Resources
Joule for iOS: Attachment
Joule for Web: Joule Web UI Kit Guidelines
Related Components/Patterns: Attachment Form Cell