Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the elevation of the MessageComposer #5569

Closed
sebastianmarschall opened this issue Jan 20, 2025 · 6 comments · Fixed by #5697
Closed

Remove the elevation of the MessageComposer #5569

sebastianmarschall opened this issue Jan 20, 2025 · 6 comments · Fixed by #5697
Labels

Comments

@sebastianmarschall
Copy link

Is there a specific reason why almost all DefaultXXX composables are private?

Thats a huge pita if one wants to make even the smalles adaptions of any chat element. For example, I want the MessageComposer to not have an elevation of 4.dp. But thats hardcoded, I cant change it by parameters. I now have to copy the whole MessageComposer composable over but not only that I have to go through all default components that are used within MessageComposer and copy them over as well. Thats laborious, error prone and any changes that are made to those elements within the SDK I won't take notice off.

@aleksandar-apostolov
Copy link
Contributor

Hi there,

The reason why most of the DefaultXYZ components are private/internal is because the default implementation is not part of the API and if we expose them it becomes so. Integrations not using the out of the box screens usually implement their own UI.

Lately we've been having more requests for these kind of small customisations that you like to do and for this reason we are working on a way that will allow to replace and modify internal components without the need to rewrite and copy/paste most of the components.

In the meantime we can expose maybe the specific composable that you need? For your specific use-case for the MessageComposer the problematic ones are DefaultMessageComposerTrailingContent and DefaultComposerIntegrations, the others are either public or use a public component in their implementation which you can also use instead of the DefaultXYZ.

Would exposing these two be enough for you for the moment?

Regards,
Alex

@aleksandar-apostolov aleksandar-apostolov added the waiting for response Further information is requested label Jan 21, 2025
@sebastianmarschall
Copy link
Author

Hi @aleksandar-apostolov

Yes if you could make those two public that would help a lot!

Thanks,
Sebastian

@github-actions github-actions bot removed the waiting for response Further information is requested label Jan 24, 2025
@JcMinarro
Copy link
Member

Hello @sebastianmarschall

We have been working on a new way to easily provide custom components that our SDK will use internally.
Here is the documentation for that (We are adding more examples yet).
On #5597 you can find the implementation regarding to the Message Composer.
Would it be enough for you?

@andremion
Copy link
Contributor

Hi @sebastianmarschall ,

Starting from the 6.11.0 release, you can use a custom Component Factory to override the MessageComposer so that any component that uses the default composer will use your custom implementation.

Let us know if you need further guidance.

Thanks,

@andremion andremion added the waiting for response Further information is requested label Mar 19, 2025
@sebastianmarschall
Copy link
Author

Thanks for your effort, really appreciate it! I was able to remove quite some code that I needed to copy over before.

Still, my original example issue of removing the elevation of the composer, requires quite some copy-pasting. For that I need to copy MessageInputValidationError, SnackbarPopup, StreamAboveAnchorPopupPositionProvider

@github-actions github-actions bot removed the waiting for response Further information is requested label Mar 25, 2025
@andremion andremion changed the title Make default components public Remove the elevation of the MessageComposer Apr 1, 2025
@andremion
Copy link
Contributor

Hi @sebastianmarschall
With this ##5697 you can customize it as per your needs.
I hope that helps.
Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants