Open Not-Jayden opened 3 weeks ago
Latest commit: 21e6e822c20b348f145a98c3f10f432fd00aa82f
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Name | Status | Preview | Last Commit |
---|---|---|---|
runed | ✅ Ready (View Log) | Visit Preview | 21e6e822c20b348f145a98c3f10f432fd00aa82f |
Thanks for kicking this off!
One thing I think we should handle before merging this is ensuring that emulated mouse events on mobile are ignored. One of the pain points of the :hover
pseudo selector is with mobile devices.
Thanks for kicking this off!
One thing I think we should handle before merging this is ensuring that emulated mouse events on mobile are ignored. One of the pain points of the
:hover
pseudo selector is with mobile devices.
@huntabyte Thanks. I've pushed a quick attempt at detecting hover capability, but based on your comment I'm thinking it's probably not your desired approach. Feel free to revert and/or change as desired if so, as I'm not super across the problem.
Self-review - if this is along the lines of what you had in mind, maybe any-hover
and any-pointer
would be a better choice to better cover edge cases of mixed inputs (e.g. phone with a mouse)
Note to self - I've done something similar with https://github.com/svecosystem/svelte-interactions - specifically the createHover
function. Perhaps we could bring that logic in here?
Note to self - I've done something similar with svecosystem/svelte-interactions - specifically the
createHover
function. Perhaps we could bring that logic in here?
Oh, I had no idea that existed, nice! I actually prefer actions for this kind of stuff usually anyway, this just felt like a low hanging fruit while I was looking at the repo and comparing to other hook libraries.
I wonder if we can create a more generic adapter to rune-ify all those actions and re-use them rather than duplicating the logic in both places. Just comes with the consideration of whether it's worth making it a dependency 🤷♂️
https://not-jayden-is-hovered.runed.pages.dev/docs/utilities/is-hovered