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

Migrate to Slate 0.25 #638

Merged
merged 16 commits into from
Oct 5, 2017
Merged

Migrate to Slate 0.25 #638

merged 16 commits into from
Oct 5, 2017

Conversation

erquhart
Copy link
Contributor

@erquhart erquhart commented Sep 29, 2017

Migrate from Slate 0.21 to 0.25 - related changelog here.

@erquhart erquhart changed the title Slate 0.25 Migrate to Slate 0.25 Sep 29, 2017
@erquhart erquhart force-pushed the slate-0.25 branch 5 times, most recently from 989cd19 to 976d5d1 Compare October 3, 2017 00:24
@tech4him1
Copy link
Contributor

tech4him1 commented Oct 3, 2017

@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",
Copy link
Contributor

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".

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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 [
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@tech4him1 tech4him1 left a 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!

@erquhart erquhart mentioned this pull request Oct 4, 2017
@erquhart erquhart merged commit fd60693 into master Oct 5, 2017
@erquhart erquhart deleted the slate-0.25 branch October 5, 2017 16:33
tech4him1 added a commit that referenced this pull request Jan 17, 2018
originally removed in #640, accidently added as part of #638
tech4him1 added a commit that referenced this pull request Jan 17, 2018
originally removed in #640, accidently added as part of #638
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants