Skip to content

Commit

Permalink
Rich text editor | Update dependency on Tiptap (#1818)
Browse files Browse the repository at this point in the history
# Pull Request

## 🤨 Rationale

1. Update all the Tiptap extensions to the latest version and fixes the
build error from #1771
2. [Bug
2651659](https://dev.azure.com/ni/DevCentral/_workitems/edit/2651659):
Comments acceptance tests failing in latest nimble/sl-comments-lib
update
The linked tests might fail because of the package update with the
[deprecated
method](https://github.com/ueberdosis/tiptap/blob/3e440c2f96cd56683d3d7eb3c0e6cea83f7a31b7/packages/extension-mention/src/mention.ts#L8C3-L9C86)
used here for the mention-extesion. Here is the error from the console
log: `ERROR TypeError: this.options.renderLabel is not a function
    at Object.renderHTML (create-tiptap-editor.ts:213:30)`. 

## 👩‍💻 Implementation

1. Bump all the Tiptap versions to the latest `2.2.2`
2. Replaced the deprecated `renderLabel` method with the recommended
`renderText` method for mention support.

## 🧪 Testing

Manually verified the mention node rendering and other basic flows like
adding an @mention and setting it via setMarkdown etc.,

## ✅ Checklist

<!--- Review the list and put an x in the boxes that apply or ~~strike
through~~ around items that don't (along with an explanation). -->

- [x] I have updated the project documentation to reflect my changes or
determined no changes are needed.
  • Loading branch information
vivinkrishna-ni authored Feb 13, 2024
1 parent 01ca7e5 commit 34efe55
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 127 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Update dependency on Tiptap extensions to fix mention issue in rich text editor",
"packageName": "@ni/nimble-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Loading

0 comments on commit 34efe55

Please sign in to comment.