-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Migrate to Slate 0.25 #638
Conversation
989cd19
to
976d5d1
Compare
@erquhart This is weird -- it looks like the commits are out of order (upgrade to 0.25 comes before 0.22), but when I look at each diff, they are valid, but not in order? If I look at the branch diff it is correct, though. |
"slate-edit-table": "^0.10.1", | ||
"slate-soft-break": "^0.3.0", | ||
"slate": "^0.25.0", | ||
"slate-edit-list": "^0.8.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.
warning "slate-edit-list@0.8.0" has incorrect peer dependency "slate@^0.23.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.
Yeah, I think that's just where slate-edit-list
is at, it's the latest version.
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.
They do use Block.create()
here: https://github.com/GitbookIO/slate-edit-list/tree/master/lib/changes, in decreaseItemDepth.js
and increaseItemDepth.js
, I don't know if that could present a problem at all.
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.
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.
They're manually inserting chlidren, so those created blocks will never have no children. Not an issue. Thanks for checking their source!
@@ -10,7 +10,11 @@ Object { | |||
Object { | |||
"data": undefined, | |||
"kind": "text", | |||
"text": "H1", | |||
"ranges": Array [ |
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.
I didn't see in the changelog exactly why this was needed, could you explain?
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.
It's actually not in the changelog, but Slate text nodes used to come in two flavors, either they'd have a simple "text" property with the value, or else a "ranges" property having an array of objects representing text with associated marks. They quietly switched to using "ranges" only.
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.
As an upgrade (without wanting to change anything), this looks perfect. Thanks!
Migrate from Slate 0.21 to 0.25 - related changelog here.