tldraw/packages
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
..
assets Update CHANGELOG.md [skip ci] 2023-06-28 11:53:57 +01:00
editor [improvement] More nuanced cursor state (#1682) 2023-06-30 12:46:07 +00:00
file-format [feature] add meta property to records (#1627) 2023-06-28 14:24:05 +00:00
indices Update CHANGELOG.md [skip ci] 2023-06-28 11:53:57 +01:00
polyfills Update CHANGELOG.md [skip ci] 2023-06-28 11:53:57 +01:00
primitives Update CHANGELOG.md [skip ci] 2023-06-28 11:53:57 +01:00
state [fix] rename global in @tldraw/state to avoid collissions (#1672) 2023-06-29 12:57:55 +00:00
store [fix] mutating snapshot in migrateStoreSnapshot (#1663) 2023-06-28 14:23:56 +00:00
tldraw Update CHANGELOG.md [skip ci] 2023-06-28 11:53:57 +01:00
tlschema [feature] add meta property to records (#1627) 2023-06-28 14:24:05 +00:00
ui [fix] Lock shortcut (#1677) 2023-06-29 21:43:28 +00:00
utils [feature] add meta property to records (#1627) 2023-06-28 14:24:05 +00:00
validate [feature] add meta property to records (#1627) 2023-06-28 14:24:05 +00:00