Anyone using HTML views and has a solution on how ...
# compose-web
r
Anyone using HTML views and has a solution on how to handle compose content overlaid over it? I.e. a dialog showing on top. Currently impossible because the html view is on top of the canvas. Is there some way to calculate the mask of all composables at a certain z index?
a
what are u trying to achieve?
r
Using HTML wrapped composables like used in the workaround mentioned here has a problem anytime you overlay something on top, i.e. dialog, bottomsheet, side drawer. Because the HTML view sits on top of the compose canvas. For example, I cannot do a HTML google map + a bottomsheet (a very common way to display map stuff) because the bottomsheet simply isn't visible. So I'm thinking of somehow calculating a mask of the bottomsheet and manually clipping out the HTML view. But I may be overextending myself here.
a
that sounds painful to do and not worth it if i were you i would hide the map completely when the sheet is visible and call it a day
馃憤 1
if u do achieve it, let me know how tho 馃槃
r
I think for now I will also do like this, or just do the ugly thing and calculate the bottom sheet offset and offset/shrink the map corresponidngly
a
u could, but in the end of the day u are spending time fighting the current limitations of compose web instead of improving ur product imho any code u write that is not about your product, it's a waste of time (time to figure out workaround + time to impl workaround + maintainance etc)
u
There is https://github.com/Hamamas/Kotlin-Wasm-Html-Interop/tree/master I used it personally to try to adapt my media player with compose web https://kdroidfilter.github.io/ComposeMediaPlayer/sample/
The problem is that it is completely impossible to overlay an element on the player