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

Remove DocState::LocallyCreatedButNotEdited #66

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

alexjg
Copy link
Collaborator

@alexjg alexjg commented Dec 8, 2023

The main reason to remove this is that it's a bit of a footgun. If you don't save or announce documents until some changes have been made then the user has to keep track of whether they have made changes before they know if it's safe to share the document ID with other peers. A concrete example of this which we encountered in the JS implementation was a tab creating a document on startup and putting the ID of the document in the URL. This meant that if you copied the URL to another tab but the first tab hadn't made any changes then the second tab just hung forever.

Empty documents take up a tiny amount of space, it seems worth trading that very small amount of extra space to avoid the user having to keep track of whether they have made changes to a document before they can advertise it's ID.

@alexjg alexjg requested a review from gterzian December 8, 2023 17:21
@alexjg alexjg merged commit 3841505 into main Dec 14, 2023
8 checks passed
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

Successfully merging this pull request may close these issues.

1 participant