Skip to content

feat: native image picker rework#3398

Merged
isekovanic merged 9 commits intodevelopfrom
feat/native-picker-impl
Feb 12, 2026
Merged

feat: native image picker rework#3398
isekovanic merged 9 commits intodevelopfrom
feat/native-picker-impl

Conversation

@isekovanic
Copy link
Contributor

@isekovanic isekovanic commented Feb 12, 2026

This pull request introduces extensive updates to the attachment picker functionality, focusing on adding a new disableAttachmentPicker mode. When enabled, this mode bypasses the custom attachment picker UI and instead uses native pickers or alternate flows for attachments and commands. The changes also include several refactorings to ensure that button behavior, UI rendering, and command handling adapt correctly to this new mode, as well as minor improvements to styles and performance.

Attachment Picker Disable Mode and UI Adaptation:

  • Added disableAttachmentPicker support throughout the attachment picker and its context, defaulting to true if the image media library is unavailable. This flag is now used to conditionally render the custom picker UI and to switch to native pickers or alternate flows for attachments, commands, and polls. (package/src/components/Channel/Channel.tsx [1] [2] [3]; package/src/components/AttachmentPicker/AttachmentPicker.tsx [4] [5]; package/src/components/AttachmentPicker/components/AttachmentTypePickerButton.tsx [6] [7] [8] [9] [10] [11] [12]

  • Refactored all attachment picker buttons (MediaPickerButton, CameraPickerButton, FilePickerButton, PollPickerButton, CommandsPickerButton) to respect the disableAttachmentPicker flag, invoking native pickers or alternate flows as appropriate. (package/src/components/AttachmentPicker/components/AttachmentTypePickerButton.tsx [1] [2] [3] [4] [5]

Command Picker and Sheet Handling:

  • Updated the command picker logic to provide a bottom sheet modal for commands when the attachment picker is disabled, and adjusted command item press handling to close the sheet and focus the input. (package/src/components/AttachmentPicker/components/AttachmentTypePickerButton.tsx [1]; package/src/components/AttachmentPicker/components/AttachmentPickerContent.tsx [2]

  • Refactored command picker item components to separate UI and logic, allowing for different behaviors based on the attachment picker mode. (package/src/components/AttachmentPicker/components/AttachmentPickerContent.tsx package/src/components/AttachmentPicker/components/AttachmentPickerContent.tsxL103-R164)

Component and Style Improvements:

  • Replaced usage of BottomSheetFlatList with FlatList in the command picker for improved compatibility and performance. (package/src/components/AttachmentPicker/components/AttachmentPickerContent.tsx [1] [2]

  • Improved style definitions for better readability and maintainability, including minor fixes in selection bar and video attachment preview styles. (examples/SampleApp/src/components/AttachmentPickerSelectionBar.tsx [1]; package/src/components/MessageInput/components/AttachmentPreview/VideoAttachmentUploadPreview.tsx [2] [3]

Other Notable Changes:

  • Increased the number of columns in the emoji reaction picker and disabled virtualization to improve animation performance. (package/src/components/MessageMenu/MessageReactionPicker.tsx package/src/components/MessageMenu/MessageReactionPicker.tsxL164-R171)

  • Cleaned up redundant code related to the attachment picker toggle and context usage. (package/src/components/MessageInput/components/InputButtons/AttachButton.tsx [1] [2]

@isekovanic isekovanic requested a review from khushal87 February 12, 2026 13:42
@Stream-SDK-Bot
Copy link
Contributor

Stream-SDK-Bot commented Feb 12, 2026

SDK Size

title develop branch diff status
js_bundle_size 387 KB 388 KB +1116 B 🔴

@isekovanic isekovanic merged commit e61c05c into develop Feb 12, 2026
4 of 5 checks passed
@isekovanic isekovanic deleted the feat/native-picker-impl branch February 12, 2026 13:58
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