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

Provide factory API for drawing a bubble #6

Open
arthef opened this issue Apr 16, 2020 · 3 comments
Open

Provide factory API for drawing a bubble #6

arthef opened this issue Apr 16, 2020 · 3 comments

Comments

@arthef
Copy link

arthef commented Apr 16, 2020

I had some suggestions in issues: #4 #5 However, the more I dig into the code the more different ideas I have. It seems the best solution would be to provide an API to create some sort of a factory to draw a buble and include all the information in the chat message that is needed.

Of course, I can write my own version of ChatBubbleView but it would be a waste of a very good piece of code which for the most part is perfectly fine. I suppose you plan to further work on it so more stuff would be coming in the future.

So, ways to inject customizations would be the best approach.

@arthef
Copy link
Author

arthef commented Apr 16, 2020

I could potentially prepare a pull request when I am more familiar with the code but it would be very useful to have some instructions on how to build the library under IDE (IntelliJ ideally).

@shannah
Copy link
Owner

shannah commented Apr 16, 2020

I think a sufficiently flexible approach would be to allow for overriding the border of the bubble in CSS. You could then use a 9-piece image border (e.g. border-image, border-image-slice directive) to use any image as the background. I'm working on a proof-of concept for this now.

The factory API is also possible, but should be resorted to after simpler CSS solutions.

@arthef
Copy link
Author

arthef commented Apr 16, 2020

Yes, CSS for drawing the bubble would be ideal as then it could be easily customized or we could have a few different "skins".

But factory would be very useful as well to allow for inclusion of custom information. Like, now I would like to have an avatar and user name for own messages as well. Also, I have in mind even more functionality to be added. This would be especially important to implement a good group chat app.

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

No branches or pull requests

2 participants