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

Bot Response messages row #54

Open
tomastiminskas opened this issue Jul 8, 2022 · 1 comment
Open

Bot Response messages row #54

tomastiminskas opened this issue Jul 8, 2022 · 1 comment
Assignees

Comments

@tomastiminskas
Copy link
Collaborator

Screen Shot 2022-07-08 at 15 40 32

  • Message of type 25 (Bot Res) contain HTML code as messageContent. It should be inserted in a webview on the row (right now it's showing as raw html.
  • Bubble should have a fixed width on these cases

Reference:

gitbot

@kngako
Copy link
Collaborator

kngako commented Aug 1, 2022

There's experimental code in the compose-jb repo which uses CEF (Chromium Embedded Framework) to implement a webview. The sample code is stale because it used jcef (java chromium embedded framework).

https://github.com/JetBrains/compose-jb/tree/master/experimental/cef


Luckily the JCEF project has gotten a little more love over the past year and now has a maven dependency one can use.

https://github.com/jcefmaven/jcefmaven

The sample app for this project is also in a healthy state. https://github.com/jcefmaven/jcefsampleapp


The Work In Progress

I'm just replacing the stale patched cef logic from the compose-jb experimental subdirectory and adding the jcefmaven dependency. From which we can have a SphinxWebview that uses the cef browser to render files.

Do note that from my exploration the cef dependency doesn't have a loadContent(htmlTextContent: String) like the Android webView. So we basically have to write the htmlTextContent to a temporary file and load that temporary file like we would load it locally in our browsers (file:///path/to/temp/file/with/html/text/content).

Side note: This is an experimental solution but it would be as full featured as webView on any other platform...

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

4 participants