-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix(rich-text-editor): DP-116205 fix line break related issues #573
Conversation
}; | ||
}, | ||
}); | ||
if (!this.allowLineBreaks) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, if allowLineBreaks
was true
, shift + enter
would still work to generate a soft break, now it doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks 👍. fixed
Good find. I have re-included the "HardBreak" extension but am no longer triggering it when pressing enter so we should still be able to support pasted hard breaks. |
This could be an improvement of editor but does not fix the issue. |
Hmm yeah as soon as I added the hardbreak extension back in the problem came up again... Will look into more tomorrow. |
Seems like the developers of the extension are fixing this: ueberdosis/tiptap#5679 (comment) |
oh nice.. yeah I was trying to find a workaround but sounds like they are on top of it. |
I've implemented the fix they put up in this PR into our own component. This can be removed once the new link-extension release is out but I'm putting it in here right now just for the purposes of fixing this in a timely manner. Should work correctly now, contains hardbreak extension and allows for pasting links with hardbreaks. |
hmm looks like they have already merged the fix and are preparing a release. I'll just wait for the fix. |
e8d77dd
to
36ef498
Compare
The fix hasn't been released with extension-link yet, however it was released in linkifyjs. Just adding the correct version of that dependency has fixed the issue |
To be clear on the new behaviour: when allowLineBreaks is true:
when allowLineBreaks is false:
|
Ready for review. |
✔️ Deploy previews ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
@@ -124,6 +124,7 @@ | |||
"date-fns": "2.30.0", | |||
"docopt": "0.6.2", | |||
"emoji-toolkit": "9.0.1", | |||
"linkifyjs": "4.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a temp solution while they release the proper fix, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah basically, they just need to update linkifyjs in extension-link and release it, then we can remove this.
# [9.87.0](dialtone/v9.86.2...dialtone/v9.87.0) (2024-12-12) ### Bug Fixes * recipes css cleanup ([#581](#581)) ([ba85404](ba85404)) * **Rich Text Editor:** DP-116205 fix line break related issues ([#573](#573)) ([a204fd4](a204fd4)) ### Features * **Callbar Button:** DLT-2211 add passthrough tooltip props ([#578](#578)) ([66cf439](66cf439)) * **Emoji:** NO-JIRA update emoji-toolkit to 9.0 ([#587](#587)) ([9684377](9684377)) * **Rich Text Editor:** DLT-2237 add image extension to editor ([#589](#589)) ([72cff78](72cff78))
# [2.168.0](dialtone-vue2/v2.167.1...dialtone-vue2/v2.168.0) (2024-12-12) ### Bug Fixes * recipes css cleanup ([#581](#581)) ([ba85404](ba85404)) * **Rich Text Editor:** DP-116205 fix line break related issues ([#573](#573)) ([a204fd4](a204fd4)) ### Features * **Callbar Button:** DLT-2211 add passthrough tooltip props ([#578](#578)) ([66cf439](66cf439)) * **Emoji:** NO-JIRA update emoji-toolkit to 9.0 ([#587](#587)) ([9684377](9684377)) * **Rich Text Editor:** DLT-2237 add image extension to editor ([#589](#589)) ([72cff78](72cff78))
# [3.161.0](dialtone-vue3/v3.160.1...dialtone-vue3/v3.161.0) (2024-12-12) ### Bug Fixes * recipes css cleanup ([#581](#581)) ([ba85404](ba85404)) * **Rich Text Editor:** DP-116205 fix line break related issues ([#573](#573)) ([a204fd4](a204fd4)) ### Features * **Callbar Button:** DLT-2211 add passthrough tooltip props ([#578](#578)) ([66cf439](66cf439)) * **Emoji:** NO-JIRA update emoji-toolkit to 9.0 ([#587](#587)) ([9684377](9684377)) * **Rich Text Editor:** DLT-2237 add image extension to editor ([#589](#589)) ([72cff78](72cff78))
hey @braddialpad i'm having some issues when using shift + enter on the message input on beta Screen.Recording.2024-12-17.at.12.41.32.PM.mov
is there something we need to add on firespotter side to make it work? |
@bianca-artola-dialpad strangely I'm not getting this at all when I try. Are you still getting it on beta? |
Not reproducible now on beta but I think is because of the new release process for beta in which we rollbacked to the previous release on Tuesday (so no front-end changes will be displayed for some hours). I'm having this issue when running it locally, but we can wait some hours after beta has the latest front-end changes |
Ah yeah that must be it.. I'll try locally. |
Found the problem, fix coming shortly. |
fix(rich-text-editor): DP-116205 fix line break related issues
Obligatory GIF (super important!)
🛠️ Type Of Change
These types will increment the version number on release:
📖 Jira Ticket
https://dialpad.atlassian.net/browse/DP-116205
📖 Description
Changed to a different method to submit line breaks using shift + enter in rich-text-editor
💡 Context
We've been having various issues with the way enter / new lines are handled within rich-text-editor and have to keep putting in workaround hacks to get it to work how we want. (see jira ticket for latest weird issue). HardBreak extension seems to cause various unwanted issues and after browsing around stack overflow it seems the best solution may be to remove it entirely.
I had to fix this already as part of my hackathon project, so I'm moving the code from my hackathon project to the actual component. Appears to work much more reliably as it is using built in tiptap/prosemirror commands. Could be some unknown regression here so I'm going to check with the product teams before merging to ubervoice, and also do more testing on my own.
📝 Checklist
For all PRs:
For all Vue changes:
./scripts/dialtone-vue-sync.sh
script. Read docs here: Dialtone Vue Sync Script🔮 Next Steps
update in ubervoice, confirm the problems are fixed.
🔗 Sources
ueberdosis/tiptap#2755