Skip to content

feat : Tiptap integration - #1832

Merged
sriramveeraghanta merged 47 commits into
developfrom
tip-tap-integration
Aug 15, 2023
Merged

feat : Tiptap integration#1832
sriramveeraghanta merged 47 commits into
developfrom
tip-tap-integration

Conversation

@sriramveeraghanta

@sriramveeraghanta sriramveeraghanta commented Aug 10, 2023

Copy link
Copy Markdown
Member

Summary

This PR focuses on transitioning from Remirror to Tiptap, implementing new features, and fixing bugs. It includes the addition of bubble menu support, slash command support, improved file structure with prosemirror plugins, image upload functionality, and integration of Tiptap with all Remirror instances.

Tiptap.basic.demo.mov

Changes in Detail

Remirror to Tiptap Transition

The transition from Remirror to Tiptap involved

  • Migrating styles and Ref behaviours to play well with react-hook-form
  • Fixing underlying prosemirror state to avoid conflicts
  • Migration wasn't painful for existing data as we now use html instead of Prosemirror JSON!

Bubble Menu Support

Allowing users to access various formatting options easily with:

  1. Changing list behaviour between todos(tasklists) /numbered/bullet lists
image
  1. Toggle code blocks with syntax highlighting
  2. Add hyper links
image
  1. Basic marks bold, italic, underline, strikethrough

Slash Command Support

Enabling users to quickly insert nodes like:

  1. Creating Headings and text (h1,h2,h3,p)
  2. Different types of lists (todo, bullet, ordered, unordered)
  3. Divider
  4. Add code snippets with syntax highlighting
  5. Upload Images from their File system

Saving with Debounce Logic

Debounce logic was added to save user input after a 500ms delay when the user stops typing. This change improved the saving process, which previously relied on the editor's blur state that could be very unreliable.

tiptap.debounce.logic.mov

Image Uploads and File Structure Improvements

  1. Image upload functionality was implemented, allowing users to upload and reorder images within the editor.
  2. Code structure was improved by using native Prosemirror Plugin to implement image uploads.
  3. Delete Image function was implemented to clear clutter in backend S3 file storage like so:
    • keep track of “previous state” of the editor and the “current state”
    • Traverse through both states and compare changes
    • Assign unique ids to all necessary nodes to compare changes while traversing in successive edits
    • Check the node type being undefined and being an image so that I can trigger a function to delete it on the backend as well
Screen.Recording.2023-08-08.at.6.23.01.PM.mov

Tiptap Integration with Various Components

  • Issue Description
  • Comments
  • User Activity Feeds
  • GPT Assistant Modals
  • Plane Pages

Additional Context

The PR also includes various improvements and bug fixes, such as resolving conflicting keyboard shortcuts supporting markdown shortcuts, and implementing a "Saved" state for image uploads with placeholder while uploading..

Palanikannan1437 and others added 28 commits August 2, 2023 23:00
@vercel

vercel Bot commented Aug 10, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plane ❌ Failed (Inspect) Aug 15, 2023 9:36am
plane-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 15, 2023 9:36am
plane-space-dev ❌ Failed (Inspect) Aug 15, 2023 9:36am
plane-space-stage 🛑 Canceled (Inspect) Aug 15, 2023 9:36am
plane-staging 🛑 Canceled (Inspect) Aug 15, 2023 9:36am

@sriramveeraghanta sriramveeraghanta changed the title Tip tap integration feat : Tiptap integration Aug 10, 2023
@sriramveeraghanta
sriramveeraghanta merged commit e1ae0d3 into develop Aug 15, 2023
@sriramveeraghanta
sriramveeraghanta deleted the tip-tap-integration branch August 15, 2023 09:34
DoctorFogarty pushed a commit to DoctorFogarty/plane that referenced this pull request Aug 7, 2026
* remirror instances commented out to avoid prosemirror conflicts

* styles migrated for remirror to tiptap transition

* added bubblemenu support with extensions

* fixed css for task lists and code with syntax highlighting

* added support for slash command

* fixed bubble menu to match styles and added better seperation in UI

* saving with debounce logic added and it's stored in backend

* added migration support by updating to html

* Image uploads done

* improved file structure and delete image function implemented

* Integrated tiptap with Issue Modal

* added additional props and Tiptap Integration with Comments

* added tiptap integration with user activity feeds

* added ref control support and bubble menu support for readonly editor

* added tiptap support for plane pages

* added tiptap support to gpt assistant modal (yet to be tested)

* removed remirror instances and cleaned up code

* improved code structure for extracting props in Tiptap

* fixing ts errors for next build

* fixing node ts error for Horizontal Rule

* added ts fix for node types

* temp fix

* temp fix

* added min height for issue description in modal

* added resolutions to prosemirror-model version

* trying pnpm overrides

* explicitly added prosemirror deps

* bugfixes

* removed extra gap at the top and moved saved indicator to the bottom

* fix: slash command scroll position

* chore: update custom css variables

* matched theme colours

* fixed gpt-assistant modal

* updated yarn lock

* added debounced updates for the title and removed saved state after timeout

* added css animations for saved state

* build fixes and remove remirror instances

* minor commenting fixes

---------

Co-authored-by: Palanikannan1437 <73993394+Palanikannan1437@users.noreply.github.com>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants