-
Notifications
You must be signed in to change notification settings - Fork 1.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
React Native 0.46 #7759
React Native 0.46 #7759
Conversation
node: | ||
version: 5.7.0 | ||
version: 6 |
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.
new rn tooling requires some things not in 5
@@ -18,6 +18,7 @@ general: | |||
build_dir: shared | |||
dependencies: | |||
pre: | |||
- nvm ls-remote |
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.
just so we can see available versions
@@ -7,6 +7,7 @@ | |||
.*/node_modules/fbjs/.* | |||
.*/node_modules/is-my-json-valid/.* | |||
.*/node_modules/json5/.* | |||
.*/node_modules/metro-bundler/.* |
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.
the rn packager got moved here and has a lot of errors
}) | ||
.filter(i => !!i) | ||
// Must do this else we get weird errors from redux-saga, see https://github.com/redux-saga/redux-saga/issues/1000#issuecomment-315180255 | ||
yield Promise.resolve( |
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.
have to wrap this in Promise else redux-saga thinks we're returning other generators and gives us yellow boxes
@@ -137,7 +137,7 @@ function* navBasedOnLoginState() { | |||
} | |||
} else if (registered) { | |||
// relogging in | |||
yield [put.resolve(getExtendedStatus()), put.resolve(getAccounts())] | |||
yield all([put.resolve(getExtendedStatus()), put.resolve(getAccounts())]) |
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.
redux-saga wants arrays to be wrapped in 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's another spot that causes this warning. I have a fix in a perf commit
@@ -184,6 +185,10 @@ function registerIdentifyUi(): TrackerActionCreator { | |||
let trackerTimeoutError = 0 | |||
|
|||
const onStart = username => { | |||
// Don't do this on mobile |
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.
Android complains about long timeouts (over 1m) and likely this doesn't make sense in the mobile context anyways. its not a tracker card that hangs out on the side, it'd be your whole screen. no one is waiting 5 minutes...
@@ -1,7 +1,7 @@ | |||
// @flow | |||
import {connector, Main} from './main-shared.native' | |||
import {compose, lifecycle, withProps} from 'recompose' | |||
import {NativeBackAndroid} from '../common-adapters/index.native' | |||
import {NativeBackHandler} from '../common-adapters/index.native' |
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 got renamed
shared/app/nav.native.js
Outdated
@@ -109,45 +114,20 @@ const barStyle = ({showStatusBarDarkContent, underStatusBar}) => { | |||
|
|||
function renderStackRoute(route) { | |||
const {underStatusBar, hideStatusBar, showStatusBarDarkContent} = route.tags | |||
// Skip extra view if no statusbar |
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.
we actually do need to show it as it's used to tell the native side to hide
shared/app/nav.native.js
Outdated
/> | ||
{route.component} | ||
</Box> | ||
) | ||
} | ||
|
||
const forIOS = ({hideNav, shim, tabBar}) => ( |
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.
We now have a single implementation using the KeyboardAvoidingView (with some different params). We listen for keyboard showing/hiding and hide our tabBar ourselves.
@@ -1,6 +1,6 @@ | |||
// @flow | |||
import {RouteDefNode} from '../route-tree' | |||
import ConvListOrSearch from './conversation-list-or-search' | |||
import ConvListOrSearch from './conversation-list-or-search.native' |
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 is only used by native, so lets mark it as such
@@ -147,7 +147,7 @@ class AvatarRender extends PureComponent<void, Props, State> { | |||
return ( | |||
<ClickableBox onClick={onClick} feedback={false}> | |||
<Box style={boxStyle(size, style)}> | |||
{skipBackground && | |||
{!skipBackground && |
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 flag was actually the inverse!
@@ -222,7 +222,7 @@ class Input extends Component<void, Props, State> { | |||
returnKeyType: this.props.returnKeyType, | |||
value: this.state.value, | |||
secureTextEntry: this.props.type === 'password', | |||
underlineColorAndroid: globalColors.transparent, | |||
underlineColorAndroid: 'transparent', |
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.
suggested by the docs. doesn't seem different but might as well leave it
@@ -88,10 +87,6 @@ function messageCreateComponent(type, key, children, options) { | |||
} | |||
|
|||
class Markdown extends PureComponent<void, Props, void> { | |||
shouldComponentUpdate(nextProps: Props): boolean { |
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 is likely a leftover, PureComponent does this and new RN complains
@@ -56,7 +56,6 @@ const Render = ({platform, overlay, overlayColor, style}: Props) => { | |||
<Icon | |||
type={overlay} | |||
style={{ | |||
color: overlayColor, |
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 is an image now
@@ -1,7 +1,7 @@ | |||
// @flow | |||
import * as shared from './user-bio.shared' | |||
import React, {Component} from 'react' | |||
import ReactCSSTransitionGroup from 'react-addons-css-transition-group' | |||
import {CSSTransitionGroup} from 'react-transition-group' |
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 got pulled out of addons and into its own project
@@ -55,15 +54,6 @@ function render() { | |||
} | |||
|
|||
function load() { | |||
// Used by material-ui widgets. |
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.
going to entirely kill material-ui after this. doesn't work with react 16
|
||
const other = 'Someone else...' | ||
|
||
const UserRow = ({user, onClick}) => ( |
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.
simple replacement for dropdown. this whole screen should be redone, its very old
@@ -57,7 +52,7 @@ class PrivateEnterUsernameRender extends Component<void, Props, State> { | |||
? {notification: {type: 'error', message: customError(this.props.errorText, this.props.errorCode)}} | |||
: {} | |||
return ( | |||
<StandardScreen {...notification}> | |||
<StandardScreen {...notification} onCancel={this.props.onCancel}> |
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.
standard screen has a headerhoc in it
@@ -160,7 +160,8 @@ dependencies { | |||
// Manually include GIF support for Fresco b/c it was removed from | |||
// core library and RN doesn't auto add it back yet (RN 0.30.0) | |||
// @see DESKTOP-1703 | |||
compile 'com.facebook.fresco:animated-gif:0.11.0' | |||
compile 'com.facebook.fresco:animated-base-support:0.14.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.
need to update this dep else gifs crash rn 0.46
The commits 27fa9c1...3b73cee introduce visual changes on linux. 🔎 3 removed, 3 changed
|
@keybase/react-hackers |
* remove material-ui/menu * lint * remove material ui entirely! (#7762) * remove material ui! * WIP
The commits 27fa9c1...6c2e63e introduce visual changes on linux. 🔎 3 removed, 207 changed
|
|
The commits ef8f072...3ef0f53 introduce visual changes on linux. 🔎 3 removed, 207 changed
|
@keybase/react-hackers this is ready to look at again. it's been master merged and includes the branches that remove material-ui |
The commits 617b2c3...2401d42 introduce visual changes on linux. 🔎 3 removed, 207 changed
|
This PR updates our RN to 0.46. This also means our react dependency got updated to 16 alpha which affects desktop also.
Additionally the update to 0.46 updates some tooling which allows us to see the dimensions of views in the react devtools which led me to discover some high level layout problems. This PR also addresses this. Before we had flex:1 screens which (depending on the contents) push the screens below the fold. This lead to bugs about things being cut off.
This is split into several commits:
notes:
Plan for Addons in React 16 facebook/react#9207
No react-perf on desktop :(