tldraw/packages/editor
Steve Ruiz eb6aa9bbe4
[improvement] More nuanced cursor state (#1682)
This PR adds some more nuance to collaborator cursors.

Rather than being timed out or not timed out, a collaborator can now be
`active`, `idle` or `inactive`.

We calculate this based on the difference between the time that has
elapsed since the user's last activity timestamp.

After 3 seconds of inactivity, they go `idle`.
After sixty seconds of inactivity, they are `inactive`.
After any activity, they become `active` again.

When a user is `active`, we always show their cursor.
When a user is `idle`, we hide their cursor if they're following us,
unless they're highlighted
When a user is `inactive`, we hide their cursor unless they're
highlighted.

### Change Type

- [x] `minor`

### Test Plan

1. Find a friend and experiment with inactive times
2. Join a room that includes an inactive cursors; they should be hidden
on load
3. Have people follow you; do their timeouts feel natural?

### Release Notes

- Improve cursor timeouts and hiding logic.
2023-06-30 12:46:07 +00:00
..
src [improvement] More nuanced cursor state (#1682) 2023-06-30 12:46:07 +00:00
api-extractor.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-report.md [improvement] export scribble manager (#1671) 2023-06-29 14:10:54 +00:00
CHANGELOG.md Update CHANGELOG.md [skip ci] 2023-06-28 11:53:57 +01:00
editor.css [improvement] add box sizing border box (#1674) 2023-06-29 14:23:18 +00:00
LICENSE transfer-out: transfer out 2023-04-25 12:01:25 +01:00
package.json [improvemnet] drop crc, Buffer dependency (#1673) 2023-06-29 14:14:43 +00:00
README.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
setupTests.js Styles API follow-ups (#1636) 2023-06-24 13:46:04 +00:00
tsconfig.json Incorporate signia as @tldraw/state (#1620) 2023-06-20 13:31:26 +00:00

tldraw/tldraw

Benchmark

To run the benchmarks

yarn workspace @tldraw/tldraw benchmark

Or

yarn workspace @tldraw/tldraw benchmark "file_search_string"