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

Migrate to tiptap v2 #1906

Closed
Tracked by #5
juliusknorr opened this issue Oct 21, 2021 · 2 comments · Fixed by #1981
Closed
Tracked by #5

Migrate to tiptap v2 #1906

juliusknorr opened this issue Oct 21, 2021 · 2 comments · Fixed by #1981
Assignees
Labels
1. to develop dependencies: javascript dependencies Pull requests that update a dependency file enhancement New feature or request technical debt

Comments

@juliusknorr
Copy link
Member

Might need some additional evaluation to see what we actually need to change, especially with the custom marks/blocks and the collaboration/annotation plugins, but i think we should at some point consider an upgrade.

https://tiptap.dev/overview/upgrade-guide

@juliusknorr juliusknorr added enhancement New feature or request 1. to develop technical debt dependencies Pull requests that update a dependency file dependencies: javascript labels Oct 21, 2021
@hanspagel
Copy link

Tiptap co-creator here, if someone needs help evaluating: Hit me up here or via email: [email protected] ✌️

@azul
Copy link
Contributor

azul commented Nov 30, 2021

As a start i will summarize considerations from the last time we talked about this.

Why upgrade:

  • stay up to date with our dependencies
  • new, cleaner codebase
  • benefit from new features and plugins
  • longer term compatibility for things we develop ourselves
  • Collaborative editing is fairly slow right now. Faster sync times of doc status would be nice.

Challanges with the Collaboration plugin

  • We need a way to sync clients that can be deployed on a plain LAMP stack.
  • WebRTC might not work because of lack of turn server in certain network setups
  • We need to save the state of the document to the file storage
  • Optionally improve performance with non LAMP addition

Possible approaches

Forward port the old collaboration plugin to tiptap2

There's the collaboration plugin for tiptap1 based on prosemirror - forward port it to tiptap2.
Following the suggestion in the tiptap2 migration guide
Would be the closest to what we have so far.

pros:

  • no need to change server code
  • should be pretty straight forward - it's actually very little code
  • maybe reusible for other projects in a similar situation
  • known to work on LAMP stack
  • Would work in all deployments
  • Could be used as a fallback

cons:

  • cannot use tiptap2 plugin as is
  • not possible to combine with webRTC
  • no performance improvements
  • no Y.js merges

PHP implementation of Y.js server side

pros:

  • easy to integrate with nextcloud file storage
  • Would work in all deployments

cons:

  • websockets still seem to be quite a bit of a pain in php
  • I did not find any php websocket code in nextcloud this far
  • Might be cumbersome to write performant async code in php

Rust implementation of Y.js as part of the notify_push app

pros:

  • Rust (type safety, high performance, async primitives)
  • Rust implementation of Y.js is on the way
  • push_notify is already written in rust and promoted as "high performance backend"

cons:

  • Requires fallback for LAMP deployment
  • Maybe harder to integrate with storage (but notify_push already connects to the storage)

Deploy Y.js server

pros:

cons:

  • Requires fallback for LAMP deployment
  • We'd still need a way to store state to the files backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop dependencies: javascript dependencies Pull requests that update a dependency file enhancement New feature or request technical debt
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants