Update React to 0.14.7 and Immutable to 3.7.6.#12035
Update React to 0.14.7 and Immutable to 3.7.6.#12035MiguelCastillo merged 3 commits intoadobe:masterfrom
Conversation
|
Great to upgrade. Always a lil scary due to tainted historical experience when the tree was first implemented. I will pull down this branch and help you test it. |
|
@MiguelCastillo Yup. Like I said, the this particular update is quite important as 0.13 -> 0.14 did contain tons of breaking changes. However the changes themselves are rather trivial to fix. That said this PR is (again) a bit outdated as React is already on 0.14.7. But as this PR fixes the critical things for an update path, upgrading to 0.14.x or 0.15 should be trivial. I'll update this PR later when I got some spare time. |
|
I am about to pull down your branch. It might be good to update to 0.14.7. :) |
|
@MiguelCastillo Bumped React to 0.14.7, Immutable to 3.7.6. All tests worked fine. |
| var node = this.refs.name; | ||
| node.setSelectionRange(0, _getName(fullname, extension).length); | ||
| ViewUtils.scrollElementIntoView($("#project-files-container"), $(node), true); | ||
| ViewUtils.scrollElementIntoView($("#project-files-container"), $(ReactDOM.findDOMNode(node)), true); |
There was a problem hiding this comment.
New behavior in 0.14 is that this.refs.name is the actual dom node. So ReactDOM.findDOMNode is redundant and no longer needed. Yay :)
There was a problem hiding this comment.
Good catch: this was a brainfart due to it needing being needed @ L365 on componentDidUpdate because it targets this. Fixed.
|
The code is running ok right now. I will continue to run it for the rest of the day to see if I can catch any odd behavior. If all goes well, we can merge soon. |
|
In case there is an interest in changes between .14 and .13. https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html |
|
PR is looking beautiful. Thanks for updating!! |
|
Looks good to me. Merging. |
Update React to 0.14.7 and Immutable to 3.7.6.
|
👍 neat. Thanks Miguel. |
This PR updates React to the newest version of
0.14.5and Immutable to go with it.Updating React at this point is pretty crucial (IMO) if React is continued to be used: in 0.14 there were a lot of breaking changes that are still relatively easy to fix: biggest thing was how DOM-elements are being handled in React. For example: DOM operations like
renderare now being handled byReactDOM-module,getDOMNodehas been deprecated for the components,this.refs.componentrefreturns the DOM node directly instead of the component and so on.This PR also updates the tests involved: it fixes instances where TestUtils were used to find non-component (plain HTML) DOM Nodes and it also fixes all instances where
propswere being accessed instead of the DOM Nodes itself, which caused the following warnings:Warning: ReactDOMComponent: Do not access .props of a DOM node; instead, recreate the props asrenderdid originally or read the DOM properties/attributes directly from this node (e.g., this.refs.box.className).The PR has been done in backwards compatible fashion to the extent it is possible: extensions that are using deprecated methods and features should update themself before React on Brackets is updated to 0.15 some time in the future.