Hacker News new | past | comments | ask | show | jobs | submit login

There are a lot of live sharing/working/... coming out these days.

FYI: Your cursor examples uses x/y explicit coordinates where as people using different screen sizes and resolutions wouldn't see proper mouse cursor location. Rather it should be x/y relative coordinates.

example x: 35%, y:12% (top left corner to bottom right corner)




From our experience, live cursors positioning depends on the use case and the content behind them.

For a "canvas app" (like Figma), the positioning will be absolute with an offset depending on the panning.

For a responsive website, if it makes sense to add live cursors, it depends on how the content "flows". For example, if your content scrolls vertically and is centered horizontally, you can use percentage on the "x" axis and absolute on the "y" axis. That's what we're doing it in this example: https://liveblocks.io/examples/live-cursors-scrollable-page

Sometimes, cursors are not the best way to show what users are doing on a web page. For a form, displaying an indicator close to the focused input is more valuable.

Because there is no perfect solution, we're not shipping any UI with Liveblocks and only provide guides. In the future, if a common abstraction appears, we will create some package to make the integration easier.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: