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

[question] The best practice for loading an asynchronous document into an editor #1177

Open
e-e-e opened this issue Apr 28, 2018 · 0 comments

Comments

@e-e-e
Copy link

e-e-e commented Apr 28, 2018

I am completely new to substance, so please forgive me if this question is completely stupid.

I have a use case where a document that is being edited is loaded asynchronously in parts. For example, we get the root structure of the document but do not necessarily yet have all the children of the node - they are available via another asynchronous call if desired.

We can load all of the structure to begin with and then edit the document, but this is timely and not entirely necessary if the author does not need to edit deeply nested nodes. Ideally we would like to be be able to give the user the option of loading child nodes only when they want to view or edit them.

Is this feasible with substance? If so - is there a best practice approach for loading new data into the document. I was going to instigate this from the component level, but is it better to perhaps do this within a custom substance Document class. Any suggestions on how to approach this would be really appreciated. Thanks for your time.

For some context, we are experimenting with a new form of peer to peer document based on storage in a distributed graph database - https://github.com/e-e-e/hyper-graph-db. Ideally you should be able to edit the graph without having to download the entire thing.

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