Giter Club home page Giter Club logo

Comments (12)

enzoferey avatar enzoferey commented on July 23, 2024 3

This is important for me ;)

I can indeed reproduce the error, I will keep you updated. Probably related to an update of Slate.

from slate-instant-replace.

enzoferey avatar enzoferey commented on July 23, 2024 2

Located the error, not sure how to fix it yet. I developed the plugin with slate 0.34.2 (working example here https://codesandbox.io/s/322jv8rxkp) and when using newer version it crashes.

If this is urgent for you, downgrade to 0.34.2 and luckily you won't have other issues with other libs you are using. I will work on a fix asap.

EDIT: the critical upgrade was between Slate 0.34.7 and Slate 0.35.0

EDIT 2: Found a fix, testing it properly and creating a new version 🙌

from slate-instant-replace.

enzoferey avatar enzoferey commented on July 23, 2024 1

Hello @fwirtz ! Thanks for the kind words, glad the plugin is useful to you 👍

The error isn't related to the fragment thing you mentioned, fragment is taken from internal Slate data, not the value object.

Could you tell me which version of Slate are you using ?

from slate-instant-replace.

enzoferey avatar enzoferey commented on July 23, 2024 1

Thanks @fwirtz, I was finishing some stuff IRL, I'm looking at it right now.

from slate-instant-replace.

enzoferey avatar enzoferey commented on July 23, 2024 1

Good morning @fwirtz !

Slate upgraded to 0.37.0 since last night, bringing those deprecated messages hahaha

There is also:

The `Change.extend` method is deprecated, please use `Change.moveFocusForward` instead.

It seems that decision is here to stay, but I will wait a little bit before upgrading the references so I can fix any new possible API introduced in their next commits, they have backwards compability right now ;)

Closing the issue. Thanks !

from slate-instant-replace.

flowirtz avatar flowirtz commented on July 23, 2024

edit. hm nvm doesn't seem to be it

from slate-instant-replace.

flowirtz avatar flowirtz commented on July 23, 2024

hey @enzoferey thanks for the fast reply! still stuck with that and trying to debug your sourcecode haha

running

slate:0.36.1
slate-react:0.14.2
slate-instant-replace:0.1.7

Can you reproduce the error?

If not, I attached my setup in the commit below - ignore the removeMe.js it's just my poor attempt to debug your code and try to find out where the error comes from.

from slate-instant-replace.

flowirtz avatar flowirtz commented on July 23, 2024

wow cool thanks so much! esp. given the fact that it's 11pm on a Friday night in madrid as well haha ❤️

from slate-instant-replace.

flowirtz avatar flowirtz commented on July 23, 2024

awesome thank you SO SO SO much!
I've spent all my afternoon trying to figure that out and really started to loose faith in my react skills <.<

from slate-instant-replace.

enzoferey avatar enzoferey commented on July 23, 2024

v0.1.8 published fe04a9b

By the way I had a peerDependency on ^0.34.2 set up, and 0.35.0 was marked as a breaking upgrade by the Slate guys, so it makes a lot of sense 😄

Thank you for pointing it out, I'll close the issue whenever you confirm everything is working. Good night !

from slate-instant-replace.

flowirtz avatar flowirtz commented on July 23, 2024

@enzoferey AWESOME! Just tested it, works like a charm.

Just fyi the slate logger says:

The `value.focusOffset` property is deprecated, please use `selection.focus.offset` instead.

probably because of this:

const offsetCurrentWord = change.value.focusOffset;

you might want to change that as well.
but a warning is not an error, so major win here! 👍

Thanks again!

from slate-instant-replace.

flowirtz avatar flowirtz commented on July 23, 2024

hahaha no way sorry didn't notice that.
No worries, lgtm so far! Thanks for fixing it!

from slate-instant-replace.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.