News for hackers. Stuff that matters.
Re:Liveblocks: Add real‑time collaboration to your product i... by bamazizi on Thursday July 29, 2021 @10:00AM (#27996633)
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)

Re:Liveblocks: Add real‑time collaboration to your product i... by guillaumesalles on Thursday July 29, 2021 @11:18AM (#27997553)
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.