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

How to implement Presence with 'rich-text' as 'json1' subtype? #675

Closed
benjismith opened this issue Aug 15, 2024 · 2 comments
Closed

How to implement Presence with 'rich-text' as 'json1' subtype? #675

benjismith opened this issue Aug 15, 2024 · 2 comments

Comments

@benjismith
Copy link
Contributor

I'm using json1 as the primary type in my application, and I have rich-text objects nested within those records.

I'd like to implement the Presence API, but the ShareDB docs say that Currently, only rich-text supports presence information. There are no examples of creating a rich-text presence on a nested object. Is that a simple straightforward case, or more complicated?

I've been reading through the issue report for Issue #423: transformPresence is not a function so that I can better understand how the Presence API works, and thinking through possible solutions, but I thought I'd ask for advice here first. Do you have any suggestions? If there need to be any changes to the raw json1 type or to the ShareDB presence implementation, I'd be happy to work on it and contribute my code, if you're interested...

@alecgibson
Copy link
Collaborator

I've got a PR open against json0: ottypes/json0#48 (@ericyhwang we should actually get back to looking at that!), so you can probably use that as some vague inspiration/starting point.

The json0 implementation includes handling text transforms, as well as embedded subtypes (which would include rich-text). I'm completely unfamiliar with json1, but I imagine that it should be a similar thing...?

@benjismith
Copy link
Contributor Author

Thank you, that's very helpful!

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

2 participants