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
Fixes #23690 - update react to 16.3 #5651
Conversation
Issues: #23690 |
@@ -9,10 +9,10 @@ import BreadcrumbSwitcherPopover from './BreadcrumbSwitcherPopover'; | |||
import BreadcrumbSwitcherToggler from './BreadcrumbSwitcherToggler'; | |||
|
|||
class BreadcrumbSwitcher extends React.Component { | |||
componentWillReceiveProps(nextProps) { |
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.
componentWillReceiveProps is depracted, according to react documentations:
...This (componentDidUpdate) is also a good place to do network requests as long as you compare the current props to previous props
I believe we need this for 1.18 and will also need the relevant packages built. |
Why? |
Because it fixes an issue in katello which is dependent on the version defined here. @amirfefer please correct me if I'm wrong. |
@waldenraines |
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.
LGTM 👍
We have multiple libraries that are used which have a peerDependency that isn't satisfied or worse: an actual dependency on react that wouldn't be satisfied. It'd be nice if we also looked into that and provided upstream patches where needed. |
[test foreman] |
[test katello] |
@ekohl do you have that list handy? I tried running it myself:
and as you can see I didn't get any warning? IMHO regardless, we should merge this. |
Not at the moment. I'll have a look later. I should note that I had some issues with packaging this. npm2rpm didn't understand the dependencies of d3 and I haven't had time to look into why. For some reason it can't figure out what the correct URL to download the tarballs from. There's probably some library that could do a better job than our manual way. |
@ekohl I'm not sure I understand exactly the issue you are facing? I can't imagine that react y upgrade would relate to d3? |
@ohadlevy it looks like I wasn't quite awake and mixing up react and patternfly. Apologies. |
@ekohl mind approving then? :) |
Or @tstrachota? Would like to get this merged soon so I can merge the associated katello PR Katello/katello#7429. |
@@ -75,10 +75,10 @@ | |||
"patternfly": "^3.42.0", | |||
"patternfly-react": "^2.3.3", | |||
"prop-types": "^15.6.0", | |||
"react": "^16.2.0", | |||
"react": "^16.3.1", |
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.
This also allows react 16.4.0
which has been released. Should I package that or did you intend ~16.3.1
?
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 intended 16.3.1, but I don't mind to package 16.4.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.
If it stays ^16.3.1
then I'll package 16.4.0 since that's what Travis will also install while testing.
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.
theforeman/foreman-packaging#2649 is for react. react-dom is already 16.4.0.
if we need this in 1.18-stable please open a CP PR |
@amirfefer do you mind handling this? |
React 16.3 updates its lifecycle methods, and deprecated
Katello uses the new
getDerivedStateFromProps
lifecycle method.Also,
react-patternfly
2.5.1 uses react 16.3.1 as a peer dependency