Skip to content

feat: attachment customization and handle unsupported attachments#3477

Merged
khushal87 merged 1 commit intodevelopfrom
feat/attachment-customizations
Mar 12, 2026
Merged

feat: attachment customization and handle unsupported attachments#3477
khushal87 merged 1 commit intodevelopfrom
feat/attachment-customizations

Conversation

@khushal87
Copy link
Member

This pull request introduces support for handling unsupported attachments and adds flexibility in rendering URL previews. The main changes include the addition of a new UnsupportedAttachment component, updates to context and prop handling for attachments, and improved extensibility for file and URL preview components.

Attachment Handling Enhancements

  • Added a new UnsupportedAttachment component to gracefully render unsupported attachment types, with context and prop integration throughout the codebase. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] Ff5a4848L111R111, Ff5a4848L235R235)
  • Updated tests and usages to utilize UnsupportedAttachment instead of UrlPreview for custom/unsupported types.

URL Preview Improvements

  • Added support for a compact URL preview (URLPreviewCompact) and a new urlPreviewType prop/context, allowing selection between full and compact previews. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] Ff5a4848L111R111, Ff5a4848L235R235)

File Attachment Extensibility

  • Introduced context and prop support for a customizable FilePreview component, allowing easier overrides and improved testability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
  • Updated tests to provide FilePreview via context for consistent rendering. [1] [2]

Context Propagation and Integration

  • Extended context propagation in Channel, Attachment, and related hooks to include new components and props (UnsupportedAttachment, FilePreview, URLPreviewCompact, urlPreviewType). [1] [2] [3] [4] [5] [6] [7] [8] Ff5a4848L111R111, [9] [10]

Theming and Localization

  • The new UnsupportedAttachment component uses theme and translation context for styling and localization, ensuring consistent appearance and messaging.

These changes collectively improve the robustness and flexibility of attachment handling, making it easier to support new attachment types and customize their rendering.

@Stream-SDK-Bot
Copy link
Contributor

SDK Size

title develop branch diff status
js_bundle_size 373 KB 373 KB 0 B 🟢

@khushal87 khushal87 changed the title feat: attachmet customization and handle unsupported attachments feat: attachment customization and handle unsupported attachments Mar 12, 2026
@khushal87 khushal87 merged commit 7a3c572 into develop Mar 12, 2026
6 of 7 checks passed
@khushal87 khushal87 deleted the feat/attachment-customizations branch March 12, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants