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

Updates react native to 0.34 and cleans up the dev menu #4453

Merged
merged 13 commits into from
Oct 3, 2016

Conversation

chrisnojima
Copy link
Contributor

  • qr code scanning is busted on ios 10. This happens on master. They've fixed some stuff but its still flakey. See Crash on second invocation react-native-camera/react-native-camera#426
  • android works
  • removed some unneeded android overlay intent stuff
  • iOS works
  • iOS changed all the swift code to objc so its closer to its RN counterpart. Also used some new RN helpers to cleanup the bundle location code. Removed the bridging test code and also the native devmenu stuff (we haven't used that in awhile)

@@ -33,11 +33,6 @@
@TargetApi(Build.VERSION_CODES.KITKAT)
protected void onCreate(Bundle savedInstanceState) {
logFile = this.getFileStreamPath("android.log");
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M && !Settings.canDrawOverlays(this) && this.getUseDeveloperSupport()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

seemingly works fine without this. This is setup in other RN code so i think we don't need to do this ourselves anymore

@@ -1,42 +0,0 @@
import Foundation
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🔥

@@ -1,30 +0,0 @@
import Foundation
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🔥


NSURL *jsCodeLocation;

jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

way simpler

@@ -58,5 +58,7 @@
<string>63ff6926-88f0-4db0-8886-a4bb56bd4ad5</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSCameraUsageDescription</key>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needed on ios 10

// Copyright © 2016 Keybase. All rights reserved.
//

#import "KeyListener.h"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is split out from the app delegate code

@@ -1,67 +0,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.

👊

@@ -11,6 +11,7 @@ class QR extends Component<void, Props, void> {
return (
<Camera
style={{...cameraStyle, ...this.props.style}}
captureAudio={false}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this should have always been set. in ios 10 you get extra microphone popups w/o this

@chrisnojima
Copy link
Contributor Author

@keybase/react-hackers

Copy link
Contributor

@chromakode chromakode left a comment

Choose a reason for hiding this comment

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

Was npm-shrinkwrap removed intentionally? I think this needs a re-shrinkwrap.

}

- (void)goBackInTime:(UIKeyCommand *)sender {
[self.bridge.eventDispatcher sendAppEventWithName:@"backInTime"
Copy link
Contributor

Choose a reason for hiding this comment

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

I see references to these events in shared/index.native.js. Can they be removed now?

@chromakode
Copy link
Contributor

Looks good other than the two comments above!

@chrisnojima
Copy link
Contributor Author

Shrink wrap was a mistake. I'll fix that tomorrow.
The key listener events still exist (just moved) so the code in js should
stay. We could remove the native dev settings from the code base. I'll
investigate that also.

On Wednesday, September 28, 2016, Max Goodman notifications@github.com
wrote:

Looks good other than the two comments above!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4453 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAfhU-qXHGytPc3SfHGV6NfMshJqSj4Gks5quu_JgaJpZM4KJXcy
.

@chrisnojima
Copy link
Contributor Author

ok so i cleaned up the dev menu up a bunch. did more stuff in the store. removed items we don't really use anymore. also removed the stylesheet and ported that over to the dumbsheet so we just have one thing now.

@@ -24,11 +24,7 @@ module.exports = {
loader: 'json',
}, {
test: /\.(gif|png)$/,
loader: 'file',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is pretty slow so i removed it. less safe but takes half the time to webpack build

@@ -179,16 +176,4 @@ function getCurrentStatus (): AsyncAction {
}
}

export function getDevSettings () {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🔥

import {TabBarButton, TabBarItem} from './tab-bar'
import {globalStyles, globalColors} from '../styles'
import {iconMeta} from './icon.constants'

const onCheck = () => console.log('on check!')
const onClick = () => console.log('on click!')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is me finally moving the contents of the stylesheet over to the dumbsheet


class DevMenu extends Component {
render () {
const menuItems = [
{name: 'Login',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removing items we don't use anymore

@@ -1,46 +0,0 @@
// @flow
import CommonMap from '../common-adapters/dumb.desktop'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is just moved into the dumb-sheet subfolder

@@ -33,8 +33,9 @@ class Render extends Component<void, Props, any> {
}

render () {
const filter = this.props.dumbFilter.toLowerCase()
let numItemsLeftWeCanShow = 10
const parts = this.props.dumbFilter.toLowerCase().split(':')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

you can enter something like buttons:20 to see 20 buttons render now

@@ -55,7 +56,7 @@ class Render extends Component<void, Props, any> {
.map((mockKey, idx) => {
--numItemsLeftWeCanShow

if (numItemsLeftWeCanShow <= 0) return null
if (numItemsLeftWeCanShow < 0) return null
Copy link
Contributor Author

Choose a reason for hiding this comment

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

off by 1 error!

@chrisnojima chrisnojima changed the title Updates react native to 0.34 Updates react native to 0.34 and cleans up the dev menu Sep 29, 2016
Copy link
Contributor

@chromakode chromakode left a comment

Choose a reason for hiding this comment

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

Looks good! We should split up the common-adapters dumb.js in the future. It's now over 500 lines long.

@chromakode
Copy link
Contributor

Once this lands we can consider revisiting #4245

@chrisnojima
Copy link
Contributor Author

but we're going to switch fonts soon right

@chrisnojima
Copy link
Contributor Author

  • Removed external android permissions module as this is built into RN android now

@keybase-ci-visdiff
Copy link

🔎 The commits e4fea7c30ce7...4b8ba46b2555 introduced some visual changes on linux:

  • Added: Text-Header_Terminal
    Text-Header_Terminal rendered
  • Added: Text-Header_Success
    Text-Header_Success rendered
  • Added: Text-Header_Normal
    Text-Header_Normal rendered
  • Added: Text-Header_Link_Terminal
    Text-Header_Link_Terminal rendered
  • Added: Text-Header_Link_Success
    Text-Header_Link_Success rendered
  • Added: Text-Header_Link_Normal
    Text-Header_Link_Normal rendered
  • Added: Text-Header_Link_Information
    Text-Header_Link_Information rendered
  • Added: Text-Header_Link_High_Risk (view)
  • Added: Text-Header_Link_Documentation (view)
  • Added: Text-Header_Link_Announcements (view)
  • Added: Text-Header_Jumbo_Terminal (view)
  • Added: Text-Header_Jumbo_Success (view)
  • Added: Text-Header_Jumbo_Normal (view)
  • Added: Text-Header_Jumbo_Information (view)
  • Added: Text-Header_Jumbo_High_Risk (view)
  • Added: Text-Header_Jumbo_Documentation (view)
  • Added: Text-Header_Jumbo_Announcements (view)
  • Added: Text-Header_Information (view)
  • Added: Text-Header_High_Risk (view)
  • Added: Text-Header_Error_Terminal (view)
  • Added: Text-Header_Error_Success (view)
  • Added: Text-Header_Error_Normal (view)
  • Added: Text-Header_Error_Information (view)
  • Added: Text-Header_Error_High_Risk (view)
  • Added: Text-Header_Error_Documentation (view)
  • Added: Text-Header_Error_Announcements (view)
  • Added: Text-Header_Documentation (view)
  • Added: Text-Header_Big_Terminal (view)
  • Added: Text-Header_Big_Success (view)
  • Added: Text-Header_Big_Normal (view)
  • Added: Text-Header_Big_Information (view)
  • Added: Text-Header_Big_High_Risk (view)
  • Added: Text-Header_Big_Documentation (view)
  • Added: Text-Header_Big_Announcements (view)
  • Added: Text-Header_Announcements (view)
  • Added: Text-Body_X_Small_Terminal (view)
  • Added: Text-Body_X_Small_Success (view)
  • Added: Text-Body_X_Small_Normal (view)
  • Added: Text-Body_X_Small_Link_Terminal (view)
  • Added: Text-Body_X_Small_Link_Success (view)
  • Added: Text-Body_X_Small_Link_Normal (view)
  • Added: Text-Body_X_Small_Link_Information (view)
  • Added: Text-Body_X_Small_Link_High_Risk (view)
  • Added: Text-Body_X_Small_Link_Documentation (view)
  • Added: Text-Body_X_Small_Link_Announcements (view)
  • Added: Text-Body_X_Small_Information (view)
  • Added: Text-Body_X_Small_High_Risk (view)
  • Added: Text-Body_X_Small_Documentation (view)
  • Added: Text-Body_X_Small_Announcements (view)
  • Added: Text-Body_Terminal (view)
  • Added: Text-Body_Success (view)
  • Added: Text-Body_Small_Terminal (view)
  • Added: Text-Body_Small_Success (view)
  • Added: Text-Body_Small_Semibold_Terminal (view)
  • Added: Text-Body_Small_Semibold_Success (view)
  • Added: Text-Body_Small_Semibold_Normal (view)
  • Added: Text-Body_Small_Semibold_Information (view)
  • Added: Text-Body_Small_Semibold_High_Risk (view)
  • Added: Text-Body_Small_Semibold_Documentation (view)
  • Added: Text-Body_Small_Semibold_Announcements (view)
  • Added: Text-Body_Small_Secondary_Link_Terminal (view)
  • Added: Text-Body_Small_Secondary_Link_Success (view)
  • Added: Text-Body_Small_Secondary_Link_Normal (view)
  • Added: Text-Body_Small_Secondary_Link_Information (view)
  • Added: Text-Body_Small_Secondary_Link_High_Risk (view)
  • Added: Text-Body_Small_Secondary_Link_Documentation (view)
  • Added: Text-Body_Small_Secondary_Link_Announcements (view)
  • Added: Text-Body_Small_Primary_Link_Terminal (view)
  • Added: Text-Body_Small_Primary_Link_Success (view)
  • Added: Text-Body_Small_Primary_Link_Normal (view)
  • Added: Text-Body_Small_Primary_Link_Information (view)
  • Added: Text-Body_Small_Primary_Link_High_Risk (view)
  • Added: Text-Body_Small_Primary_Link_Documentation (view)
  • Added: Text-Body_Small_Primary_Link_Announcements (view)
  • Added: Text-Body_Small_Normal (view)
  • Added: Text-Body_Small_Link_Terminal (view)
  • Added: Text-Body_Small_Link_Success (view)
  • Added: Text-Body_Small_Link_Normal (view)
  • Added: Text-Body_Small_Link_Information (view)
  • Added: Text-Body_Small_Link_High_Risk (view)
  • Added: Text-Body_Small_Link_Documentation (view)
  • Added: Text-Body_Small_Link_Announcements (view)
  • Added: Text-Body_Small_Information (view)
  • Added: Text-Body_Small_High_Risk (view)
  • Added: Text-Body_Small_Error_Terminal (view)
  • Added: Text-Body_Small_Error_Success (view)
  • Added: Text-Body_Small_Error_Normal (view)
  • Added: Text-Body_Small_Error_Information (view)
  • Added: Text-Body_Small_Error_High_Risk (view)
  • Added: Text-Body_Small_Error_Documentation (view)
  • Added: Text-Body_Small_Error_Announcements (view)
  • Added: Text-Body_Small_Documentation (view)
  • Added: Text-Body_Small_Announcements (view)
  • Added: Text-Body_Semibold_Terminal (view)
  • Added: Text-Body_Semibold_Success (view)
  • Added: Text-Body_Semibold_Normal (view)
  • Added: Text-Body_Semibold_Information (view)
  • Added: Text-Body_Semibold_High_Risk (view)
  • Added: Text-Body_Semibold_Documentation (view)
  • Added: Text-Body_Semibold_Announcements (view)
  • Added: Text-Body_Primary_Link_Terminal (view)
  • Added: Text-Body_Primary_Link_Success (view)
  • Added: Text-Body_Primary_Link_Normal (view)
  • Added: Text-Body_Primary_Link_Information (view)
  • Added: Text-Body_Primary_Link_High_Risk (view)
  • Added: Text-Body_Primary_Link_Documentation (view)
  • Added: Text-Body_Primary_Link_Announcements (view)
  • Added: Text-Body_Normal (view)
  • Added: Text-Body_Information (view)
  • Added: Text-Body_High_Risk (view)
  • Added: Text-Body_Documentation (view)
  • Added: Text-Body_Announcements (view)
  • Added: Terminal-Terminal (view)
  • Added: Dropdown-Username (view)
  • Added: Dropdown-Not_selected (view)
  • Added: Dropdown-Normal (view)
  • Added: Colors-yellow_fff_75_a (view)
  • Added: Colors-yellow_Green_a_8_cf_36 (view)
  • Added: Colors-yellow_Green_3_d_2_e_697 (view)
  • Added: Colors-yellow_Green_2_94_b_52_f (view)
  • Added: Colors-yellow_Green_2_75_rgba_154_180_57_0_75 (view)
  • Added: Colors-white_ffffff (view)
  • Added: Colors-white_90_rgba_255_255_255_0_90 (view)
  • Added: Colors-white_75_rgba_255_255_255_0_75 (view)
  • Added: Colors-white_40_rgba_255_255_255_0_40 (view)
  • Added: Colors-transparent_rgba_0_0_0_0 (view)
  • Added: Colors-red_ff_4_d_61 (view)
  • Added: Colors-red_75_rgba_255_0_0_0_75 (view)
  • Added: Colors-orange_ff_6_f_21 (view)
  • Added: Colors-midnight_Blue_082640 (view)
  • Added: Colors-light_Grey_f_0_f_0_f_0 (view)
  • Added: Colors-light_Grey_2_e_6_e_6_e_6 (view)
  • Added: Colors-grey_cccccc (view)
  • Added: Colors-green_3_e_5_f_6_ef (view)
  • Added: Colors-green_3_dcc_8_e (view)
  • Added: Colors-green_2_36_b_37_c (view)
  • Added: Colors-dark_Blue_4_103_c_64 (view)
  • Added: Colors-dark_Blue_3_0_a_3052 (view)
  • Added: Colors-dark_Blue_2_2470_b_3 (view)
  • Added: Colors-dark_Blue_195080 (view)
  • Added: Colors-brown_60_rgba_71_31_17_0_6 (view)
  • Added: Colors-blue_4_e_6_f_3_ff (view)
  • Added: Colors-blue_3_a_8_d_7_ff (view)
  • Added: Colors-blue_3_40_rgba_168_215_255_0_4 (view)
  • Added: Colors-blue_33_a_0_ff (view)
  • Added: Colors-blue_30_rgba_51_160_255_0_3 (view)
  • Added: Colors-blue_2_66_b_8_ff (view)
  • Added: Colors-black_75_rgba_0_0_0_0_75 (view)
  • Added: Colors-black_60_rgba_0_0_0_0_60 (view)
  • Added: Colors-black_40_rgba_0_0_0_0_40 (view)
  • Added: Colors-black_20_rgba_0_0_0_0_20 (view)
  • Added: Colors-black_10_rgba_0_0_0_0_10 (view)
  • Added: Colors-black_05_rgba_0_0_0_0_05 (view)
  • Added: Colors-black_000000 (view)
  • Added: Buttons-Unfollow (view)
  • Added: Buttons-Secondary_waiting (view)
  • Added: Buttons-Secondary_terminal_full_Width (view)
  • Added: Buttons-Secondary_terminal (view)
  • Added: Buttons-Secondary_small_waiting (view)
  • Added: Buttons-Secondary_small (view)
  • Added: Buttons-Secondary_full_Width_waiting (view)
  • Added: Buttons-Secondary_full_Width (view)
  • Added: Buttons-Secondary_disabled (view)
  • Added: Buttons-Secondary (view)
  • Added: Buttons-Primary_waiting (view)
  • Added: Buttons-Primary_small_waiting (view)
  • Added: Buttons-Primary_small (view)
  • Added: Buttons-Primary_full_Width_waiting (view)
  • Added: Buttons-Primary_full_Width (view)
  • Added: Buttons-Primary_disabled (view)
  • Added: Buttons-Primary (view)
  • Added: Buttons-Following (view)
  • Added: Buttons-Follow_small_waiting (view)
  • Added: Buttons-Follow_small (view)
  • Added: Buttons-Follow_full_Width_waiting (view)
  • Added: Buttons-Follow_full_Width (view)
  • Added: Buttons-Follow_Disabled (view)
  • Added: Buttons-Follow (view)
  • Added: Buttons-Danger_waiting (view)
  • Added: Buttons-Danger_small_waiting (view)
  • Added: Buttons-Danger_small (view)
  • Added: Buttons-Danger_full_Width_waiting (view)
  • Added: Buttons-Danger_full_Width (view)
  • Added: Buttons-Danger_disabled (view)
  • Added: Buttons-Danger (view)

@chrisnojima chrisnojima merged commit ecdaf34 into master Oct 3, 2016
@chrisnojima chrisnojima deleted the nojima/DESKTOP-1873-rn-34 branch October 3, 2016 13:57
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.

4 participants