-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Bug]: 2.1.15 and up breaks dozens of our tests #4862
Comments
Possible reasons the breaking effects are so wide ranging:
|
Could you give me an example on what kind of content you're setting that leads to the wrong output and what the output should actually look like so I can do local tests and fix them? |
@bdbch the trouble is I'm not really sure what information I can share to help you reproduce this given that I can't understand the relation between the documented change and the broken tests. Is there any reason to believe the I'll share examples shortly but fear they won't be much help. |
I should mention that I can't guarantee I'm still at a loss as far as what to share but for now I've noticed that our
|
@bdbch it appears that at least some of our tests (I think all) are failing because Input HTML of one of our tests sets this content using
But you can see our editor content doesn't reflect the whitespace at all. Output HTML of
Incorrect input result: Expected input result: |
Friendly bump. I'd hate to let this go on until it becomes more difficult to fix. I still don't understand the root cause of how the listed changes could cause these effects. |
Sorry for the late answer. I was already taking a look into this but didn't had time to get finished. I'll get back at this ASAP as the changes I made should not lead to such issues and were not intended. I'll add tests for the usecases you specified as we lack tests currently that try to add this type of content into the editor currently. |
Also do you know which version was the last version that was working? Then I could compare the versions up to the point this test would break and figure out where the root cause comes from. I guess 2.1.14? |
@bdbch thanks so much for your reply! Yes But, our tests rely on So for example, to setup our test's initial state, we'll run:
Indeed, that's the intention. Because I'm deep in the weeds at the moment I can't readily test what effect changing that to Does your test's result change if you use |
I'll try your case with a set content test |
Yeah I'm running into the same problem. I'll check out what's happening. |
For your case I created a fix at #4895 which would reuse the same logic insertContent is using. In theory that should help. |
Thanks very much for your attention on this @bdbch! |
@bdbch did you have any thoughts on how this might be integrated? Are we going to have to wait for 2.3.0? We're already facing other breaking changes in I still think reverting Complicated... I wonder if you have any thoughts? |
Any update here? We could really use some clarity about what our upgrade path is, or if we're ever even going to have one. |
@svenadlung @bdbch I do apologize for being a pain on this. Could either of you provide any update here? I've managed to fix many of our tests to work around this, but some simply cannot be fixed and so this remains a complete blocker for us for all upgrades; patch, minor, or major. |
Should be resolved with the latest beta, let us know: v2.5.0-beta.5 |
Looks good! Thanks @nperez0111 and to everyone on the Tiptap team for their hard work! |
Which packages did you experience the bug in?
core
What Tiptap version are you using?
2.1.15
What’s the bug you are facing?
This version and 2.1.16 break a dozen of our tests which seemingly have nothing to do with the only documented change:
The tests that are broken are as diverse as special modes of splitting list items to handling pasted links to inserting lines above the current line.
Even tests which don't seem to use
insertContentAt
in any way are broken.What browser are you using?
Chrome
Code example
No response
What did you expect to happen?
Patch versions should never break tests.
Anything to add? (optional)
I really don't want to be needing to rethink complex logic all over our app because of this change caused by an issue that originated almost 2 years ago (#2720)
I tried updating our
insertContentAt
calls to usepreserveWhitespace
with'full'
,true
andfalse
- all result in still broken tests.Do we have any remedy here besides just not upgrading until we find spare weeks for this? We're never going to have time to fix all of the problems that change caused.
Example of broken output:
@svenadlung @bdbch
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: