More of a discussion prompt than an actual questio...
# webassembly
k
More of a discussion prompt than an actual question: I was wondering about external links on "regular" html/js/css websites and how when you hover them you actually see the destination of that link on the bottom corner of the browser. Now with Compose Multiplatform Wasm I can have a clickable
Text
that calls a
UriHandler
and this browser link is never previewed on hover. As a user interacting with a website I feel that it could be a sort of a security feature missing here, so I am wondering if there is a way to pass this hint to the browser. But also it seems like it can either way be easy to override by devs to display whatever. Has anyone else had any thoughts about this one? I also realize it is not a Compose Multiplatform issue per se but the fact that we are rendering on a Canvas?
👍 3
I sort of think that the only way to enforce something like this is by changing the UriHandler (its web implementation only) to warn users when they are about to go somewhere externally with like a modal. But it is not the most pleasant UX.
g
One of the possible solutions is to show a tooltip on the level of compose itself (so when user hovers, show a tooltip with URL) It's not so hard to do, but minus that it's not standard of course
Another is more involved, is notifies external js code and just change title of canvas element itself when mouse hovers over an interactive element, I never tried, but I don't see why it wouldn't work
but in general it's indeed something which would be great to have out of the box for wasm compose (just as a modifier which allows to set title data)
🙌 1
k
My problem is if you have something that a developer can set like a modifier or something, they could easily set it to be a malicious thing. So they can notify the browser that we are taking the user to google (to show that bottom corner hint) but in reality they could be taking them to wherever. It does feel like a hard thing to solve
actually there are ways around this behavior even on "regular" websites. So I guess I am overthinking it!
But could be good to have something from compose wasm to allow us to support this functionality if we wanted!
g
I don't think compose can do anything outside of custom tooltip