-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Framework: Upgrade to React 15.1.0 #5116
Conversation
be6d234
to
f95e405
Compare
If SVG changes are an optional enhancement, should we wait and make those changes after bumping the version, so as to reduce the likelihood of breakage? |
Yeah, good idea. I branched off #5164 with the SVG inlining. |
731781d
to
e99f1ec
Compare
0d123da
to
5b3c3fb
Compare
57f1e18
to
e4e6796
Compare
92eb728
to
f71d563
Compare
f71d563
to
9248a63
Compare
I came across that one, and I think that class is probably provided as part of some pre-rendered markup by an endpoint (reader related?). |
Yup, generated by the API / Reader API for reblogs. |
Can we rebase this and re-shrinkwrap it now that immutable has been bumped to match react 15 and interpolate-components@1.0.5 is on react 15 too? I'd just do it but I don't want to break others that might have outstanding work on the branch. |
4794ec7
to
dfebf43
Compare
@blowery Rebased, reshrunk. |
@ockham woo! shinkwrap looks so much better! |
👍 Looking great! |
For React 15 compatibility: * qrcode.react 0.6.1 Changelog: https://github.com/zpao/qrcode.react/blob/master/CHANGELOG.md#061---2016-04-13 * react-tap-event-plugin 1.0.0
Tests relied on React text elements being wrapped in `<span>`s. The React team considers this behavior an implementation detail and thus [removed](https://facebook.github.io/react/blog/2016/04/07/react-v15.html#no-more-extra-ltspangts) it with React 15, replacing them with comments inserted around text nodes. Text nodes, however, obviously don’t have `innerHtml()`, so we need to use `textContent()` instead, dropping all checks that relied on HTML being returned. Also, when checking for suggested matches, e.g. when entering `’t’`, we were previously checking for `[ '', ’t’, 'he‘ ]`. Since there is no text node inserted for the empty string parts, we need to change checks like these to `[ '', ’t’, 'he‘ ]` instead. Note that this can also be considered an implementation detaill that doesn’t affect functionality — the `TokenField` will continue to suggest the right things, as empty strings weren’t displayed or styled before anyway.
…de)Text Since it's really text now that those functions return.
Up to React 15, React text elements were being wrapped in `<span>`s. The React team considered this behavior an implementation detail and thus [removed](https://facebook.github.io/react/blog/2016/04/07/react-v15.html#no-more-extra-ltspangts) it with React 15, replacing them with comments inserted around text nodes. However, some of our styling relied on those spans. This commit seeks to re-add those `span`s manually, or adapt the styling where applicable. Essentially, I looked for SASS selectors like `span {` or `span,` and searched for the corresponding React code.
`commentHref` has been obsolete since #4849.
dfebf43
to
e76e014
Compare
Tested reader, seems to work as expected |
Upgrade Calypso to React 15.1.0, and its peer dependencies to compatible versions (
qrcode.react
to 0.6.1, andreact-tap-event-plugin
to 1.0.0).qrcode.react
0.6.1 Changelog: https://github.com/zpao/qrcode.react/blob/master/CHANGELOG.md#061---2016-04-13react-tap-event-plugin
)This is described as an upgrade with less impact than previous ones (like 0.13 -> 0.14). However, it's quite possible that I've missed subtle bugs, so please be sure to thorougly test the sections you're familiar with.
Most notably, React 15 removes implicit
<span>
s previously inserted around text nodes (considering them an implementation detail). Unfortunately, some of our styling relied on those<span>
s. I tried to track them down (aided by visual regressions thanks to Flow Patrol, see p6jOYE-sc-p2). However, it is quite likely that I missed some of them, so I'd ask reviewers to watch out for styling oddities in those sections you're familiar with.Furthermore, React 15 enables all SVG attributes -- but as with all things React, they're
camelCased
. We do have some inline<svg>
s, but some of them have been using attributes likefill-rule
that have been ignored. We should change those to camelCase. This will be more complicated with generated code (Gridicons
,SocialLogos
). Fortunately, AFAICS this doesn't seem to break any existing functionality, so we tackle this separately (#5950).Deprecations:
LinkedStateMixin
andvalueLink
are now deprecated due to very low popularity, so we should change our components to no longer rely on them (Framework: Don't useLinkedStateMixin
andvalueLink
#5951).<input value={ null }>
and offers you to clarify your intention. To fix the warning, you may explicitly pass an empty string to clear a controlled input, or passundefined
to make the input uncontrolled.Note that the gruntwork for this PR was actually done in a number of separate, preparatory PRs (see linked merged PRs below). Some internal (undocumented) features our tests were relying on (
__reactAutoBindMap
!) were removed, so I fixed them beforehand to no longer rely on those features but only on documented ones.Verified Working
Test live: https://calypso.live/?branch=update/react-15-0-1