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

[studio] Emoji in string field sometimes crashes document #1643

Closed
mrkolby opened this issue Dec 1, 2019 · 5 comments
Closed

[studio] Emoji in string field sometimes crashes document #1643

mrkolby opened this issue Dec 1, 2019 · 5 comments
Labels

Comments

@mrkolby
Copy link

mrkolby commented Dec 1, 2019

Describe the bug

After creating hundreds of documents this week we learned that you need to add emojis after you are done writing in a string field - for example a title - to avoid having the document crashing and producing «We're sorry, but your changes could not be applied».

To Reproduce

  1. Add one or several emojis in a string field and continue writing.
  2. See error: We're sorry, but your changes could not be applied

Expected behavior

Not crash. Show funny emojis.

Screenshots

sanityio-emoji-crash

Which versions of Sanity are you using?

@sanity/cli                0.146.0 (up to date)
@sanity/base               0.146.3 (up to date)
@sanity/components         0.146.3 (up to date)
@sanity/core               0.146.0 (up to date)
@sanity/default-layout     0.146.3 (up to date)
@sanity/default-login      0.146.0 (up to date)
@sanity/desk-tool          0.146.3 (up to date)
@sanity/google-maps-input  0.146.3 (up to date)
@sanity/vision             0.146.3 (up to date)

What operating system are you using?

macOS Catalina 10.15.1

Which versions of Node.js / npm are you running?

6.13.1
v13.2.0

Additional context

Screenshot is from a clean sanity init with the optional Movie project (schema).

@vicmeow
Copy link
Contributor

vicmeow commented Dec 1, 2019

Thanks for reporting! This is bug in diff-match-patch from google reported here google/diff-match-patch#59 and here’s a PR from us to fix it: google/diff-match-patch#69. I’m not sure what the status on this is tho! But will look into it 😊

Edit: looks like there’s a new PR: google/diff-match-patch#80

@dmsnell
Copy link

dmsnell commented Dec 5, 2019

For what it's worth we have updated Simplenote to use the patch in google/diff-match-patch#80 and it seems to working just fine for us. That's an incomplete patch because some language environments aren't fixed and there is one lingering big issue (diff-match-patch doesn't specify an encoding or guarantee that a library in Lua will work with a library in JS)

I'd be happy to have y'all test it out and let me know if something unexpectedly breaks with it. Hopefully we can get this merged into the library but I don't know when the maintainers will have a chance to interact with it.

@dmsnell
Copy link

dmsnell commented Dec 13, 2019

Just an update, in case you end up using google/diff-match-patch#80 - we found some breaking cases and I'm in the process of handling them. please follow the discussion in that PR before merging into your project 😉

@MikeCastillo1
Copy link

This issue is still happening at the latest version

@sanity/cli version 1.150.7
"@sanity/base": "^1.150.8",

Also this happens with text type.

@kmelve
Copy link
Member

kmelve commented Jan 11, 2023

Hi!

We are currently working on improving our workflows and follow-up on our open GitHub repository. In that work, we have decided to close most issues older than the release of Sanity Studio v3.

We value your feedback, so if this issue is still important to you and relevant for Sanity Studio v3, please search for relevant open issues. If you can’t find any, open a new one and link to relevant comments in this thread. For questions about how to do something, please post them in the slack community.

@kmelve kmelve closed this as completed Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants