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

Implement CollabEditor #539

Merged
merged 15 commits into from
Jun 28, 2023
Merged

Implement CollabEditor #539

merged 15 commits into from
Jun 28, 2023

Conversation

nonumpa
Copy link
Member

@nonumpa nonumpa commented Jun 14, 2023

Text editor

Backend

Screenshots

Before

Article list page

image

Article page

image

Editing

Article page

image
placeholder
image
online user
image

Done

Article list page

image

Article page

image

@nonumpa nonumpa force-pushed the feature/collab branch 2 times, most recently from 51795a7 to 9e7f19f Compare June 25, 2023 13:21
@coveralls
Copy link

coveralls commented Jun 25, 2023

Coverage Status

coverage: 76.218% (+0.03%) from 76.19% when pulling 090b76a on feature/collab into cc7fe81 on master.

});

// TODO: listen textChanged event?
article.text = text;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably try reloading article.text from GraphQL in this case

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I am not sure if client can know when the article.text is updated. Maybe we can try HocuspocusProvider Events.


// TODO: listen textChanged event?
article.text = text;
editorView.destroy();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: do we need to do anything to ensure that changes are all synced to Hocuspocus before destroying the prosemirror instance here?

components/Collaborate/Prosemirror.css Outdated Show resolved Hide resolved
Copy link
Member

@MrOrz MrOrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's test it on staging tonight~

@nonumpa nonumpa merged commit d49aa7d into master Jun 28, 2023
5 checks passed
@nonumpa nonumpa deleted the feature/collab branch June 28, 2023 13:04
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.

None yet

3 participants