Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presence #5

Open
curran opened this issue Jul 2, 2020 · 0 comments
Open

Presence #5

curran opened this issue Jul 2, 2020 · 0 comments

Comments

@curran
Copy link

curran commented Jul 2, 2020

There's been a new presence implementation added in ShareDB.

Here's an example of an OT type extended to support presence, compatible with ShareDB: ottypes/rich-text@ce14c8f#diff-4e2abe5a12642efc78b26087a61a8e9f

The task at hand with this issue is to come up with a transformPresence function for text-unicode, and also design the presence object shape.

Strawman proposal for presence object shape (inspired by that of rich-text):

{
  selections: [ // Let's say we support multiple selections in text-unicode
    {
      index: 4, // The index in the string where the start of the selection is.
      length: 3 // The length of the selection (number of characters long).
    },
    { start: 9, length: 2 }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant