Skip to content

Allow selecting the portal where to open the AttachmentSelector dialog (getDialogDestination) #2862

@andreaSimonePorceddu

Description

@andreaSimonePorceddu

Motivation
In our app, we are using multiple chat channels at the same time. We have something similar to Facebook floating channels. It means we also have different Channel providers.

We have noticed that with our architecture, the AttachmentSelector, when pressed, it performs with a bad behaviour.

It seems all AttachmentSelector dialogs are opening in the same container for all Chats(usually in the overlay of the first chat opened). For example, if I press first the Attachment of the chat A, the dialog for selecting the type of attachment would be rendered in the chat A overlay (str-chat__dialog-overlay). Then if I press the AttachmentSelector plus icon for other chats they will open all in chat A overlay(str-chat__dialog-overlay).

It would be great if, as for the modal portal through the getModalPortalDestination prop, we could have a also a getDialogDestination to open the dialog in a specific/custom overlay

Kapture.2025-10-14.at.15.33.38.mp4

Basically, after the first opening of the dialog

Proposed solution

  • SOLUTION 1 - Add getDialogDestination to the AttachmentSelector to be able to select where to open the dialog for selecting the attachment type
  • SOLUTION 2 - Refine the way the dialog is opened in order to open in the suitable overlay (the one of the chat where the AttachmentSelector have been pressed

Acceptance Criteria
A set of predefined requirements that must be met to mark a user story complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased on @lateststatus:confirmedDescribed issue has been reproduced by the repo maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions