Skip to content

Commit

Permalink
Rename ZulipNative to ZulipMobile, fix issues with latest packages
Browse files Browse the repository at this point in the history
  • Loading branch information
borisyankov committed Dec 12, 2016
1 parent 8a861c6 commit f8abcef
Show file tree
Hide file tree
Showing 41 changed files with 110 additions and 105 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Expand Up @@ -33,6 +33,7 @@
"react/sort-comp": 0,
"react/jsx-filename-extension": 0,
"react/prefer-stateless-function": 0,
"react/no-unused-prop-types": 0,
"import/prefer-default-export": 0,
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/__tests__/*.js"]}],
# incorrectly defects correct code "react-native/no-unused-styles": 2,
Expand Down
4 changes: 2 additions & 2 deletions android/app/BUCK
Expand Up @@ -46,13 +46,13 @@ android_library(

android_build_config(
name = 'build_config',
package = 'com.zulipnative',
package = 'com.zulipmobile',
)

android_resource(
name = 'res',
res = 'src/main/res',
package = 'com.zulipnative',
package = 'com.zulipmobile',
)

android_binary(
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Expand Up @@ -87,7 +87,7 @@ android {
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "com.zulipnative"
applicationId "com.zulipmobile"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zulipnative"
package="com.zulipmobile"
android:versionCode="1"
android:versionName="1.0">

Expand Down
@@ -1,4 +1,4 @@
package com.zulipnative;
package com.zulipmobile;

import com.facebook.react.ReactActivity;
import com.oblador.vectoricons.VectorIconsPackage;
Expand All @@ -11,6 +11,6 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
return "ZulipNative";
return "ZulipMobile";
}
}
@@ -1,4 +1,4 @@
package com.zulipnative;
package com.zulipmobile;

import android.app.Application;
import android.util.Log;
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/strings.xml
@@ -1,4 +1,4 @@
<resources>

<string name="app_name">ZulipNative</string>
<string name="app_name">ZulipMobile</string>
</resources>
2 changes: 1 addition & 1 deletion android/settings.gradle
@@ -1,4 +1,4 @@
rootProject.name = 'ZulipNative'
rootProject.name = 'ZulipMobile'

include ':app'
include ':react-native-vector-icons'
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide.md
Expand Up @@ -32,7 +32,7 @@ It will also launch a browser tab in Chrome with the React Native debugger. `con
## Running on an iOS device
1. [Set up the dev environment](#setting-up-a-dev-environment)
2. Connect your iOS device
3. Within the repo, `$ open ios/ZulipNative.xcodeproj/` to open Xcode
3. Within the repo, `$ open ios/ZulipMobile.xcodeproj/` to open Xcode
4. Select your device as the `build target` (from [this guide](https://facebook.github.io/react-native/docs/running-on-device-ios.html))
5. Hit the `build and run` button

Expand Down
4 changes: 2 additions & 2 deletions index.android.js
@@ -1,4 +1,4 @@
import { AppRegistry } from 'react-native';
import ZulipNative from './src/ZulipNative';
import ZulipMobile from './src/ZulipMobile';

AppRegistry.registerComponent('ZulipNative', () => ZulipNative);
AppRegistry.registerComponent('ZulipMobile', () => ZulipMobile);
4 changes: 2 additions & 2 deletions index.ios.js
@@ -1,4 +1,4 @@
import { AppRegistry } from 'react-native';
import ZulipNative from './src/ZulipNative';
import ZulipMobile from './src/ZulipMobile';

AppRegistry.registerComponent('ZulipNative', () => ZulipNative);
AppRegistry.registerComponent('ZulipMobile', () => ZulipMobile);

Large diffs are not rendered by default.

Expand Up @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "ZulipNative.app"
BlueprintName = "ZulipNative"
ReferencedContainer = "container:ZulipNative.xcodeproj">
BuildableName = "ZulipMobile.app"
BlueprintName = "ZulipMobile"
ReferencedContainer = "container:ZulipMobile.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
Expand All @@ -29,9 +29,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "ZulipNativeTests.xctest"
BlueprintName = "ZulipNativeTests"
ReferencedContainer = "container:ZulipNative.xcodeproj">
BuildableName = "ZulipMobileTests.xctest"
BlueprintName = "ZulipMobileTests"
ReferencedContainer = "container:ZulipMobile.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -46,19 +46,19 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "ZulipNativeTests.xctest"
BlueprintName = "ZulipNativeTests"
ReferencedContainer = "container:ZulipNative.xcodeproj">
BuildableName = "ZulipMobileTests.xctest"
BlueprintName = "ZulipMobileTests"
ReferencedContainer = "container:ZulipMobile.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "ZulipNative.app"
BlueprintName = "ZulipNative"
ReferencedContainer = "container:ZulipNative.xcodeproj">
BuildableName = "ZulipMobile.app"
BlueprintName = "ZulipMobile"
ReferencedContainer = "container:ZulipMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -80,9 +80,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "ZulipNative.app"
BlueprintName = "ZulipNative"
ReferencedContainer = "container:ZulipNative.xcodeproj">
BuildableName = "ZulipMobile.app"
BlueprintName = "ZulipMobile"
ReferencedContainer = "container:ZulipMobile.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
Expand All @@ -99,9 +99,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "ZulipNative.app"
BlueprintName = "ZulipNative"
ReferencedContainer = "container:ZulipNative.xcodeproj">
BuildableName = "ZulipMobile.app"
BlueprintName = "ZulipMobile"
ReferencedContainer = "container:ZulipMobile.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -22,7 +22,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"ZulipNative"
moduleName:@"ZulipMobile"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -16,11 +16,11 @@
#define TIMEOUT_SECONDS 600
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"

@interface ZulipNativeTests : XCTestCase
@interface ZulipMobileTests : XCTestCase

@end

@implementation ZulipNativeTests
@implementation ZulipMobileTests

- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{
Expand Down
12 changes: 9 additions & 3 deletions package.json
@@ -1,10 +1,16 @@
{
"name": "ZulipNative",
"version": "0.0.1",
"name": "ZulipMobile",
"version": "0.9.0",
"private": true,
"scripts": {
"start": "react-native start",
"ios": "react-native run-ios",
"ios-min": "react-native run-ios --simulator 'iPhone 5'",
"ios-max": "react-native run-ios --simulator 'iPhone 7'",
"ios-device": "react-native run-ios --device 'Max's iPhone'",
"android-min": "react-native run-android --simulator '4.0'",
"android-max": "react-native run-android --simulator '7.0'",
"android-max": "react-native run-android --simulator '7.0'",
"android-release": "react-native run-android --configuration 'Release'",
"test:lint": "eslint src/",
"test:flow": "node_modules/.bin/flow check",
"test:unit": "jest",
Expand Down
2 changes: 1 addition & 1 deletion src/ZulipNative.js → src/ZulipMobile.js
Expand Up @@ -5,7 +5,7 @@ import store, { restore } from './store';
import LoadingScreen from './start/LoadingScreen';
import App from './App';

export default class ZulipNative extends Component {
export default class ZulipMobile extends Component {

state = {
rehydrated: false,
Expand Down
2 changes: 1 addition & 1 deletion src/compose/ComposeText.js
Expand Up @@ -61,7 +61,7 @@ class ComposeText extends React.Component {
if (narrow.operator === 'pm-with') {
sendMessage(auth, 'private', narrow.operand, '', this.state.text);
} else {
sendMessage(auth, 'stream', narrow.operand, 'ZulipNative', this.state.text);
sendMessage(auth, 'stream', narrow.operand, 'ZulipMobile', this.state.text);
}
this.setState({ text: '' });
}
Expand Down
9 changes: 4 additions & 5 deletions src/main-tabbed/HomeTab.js
Expand Up @@ -3,7 +3,6 @@ import {
StyleSheet,
View,
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';

import { BRAND_COLOR } from '../common/styles';
import SidebarRow from '../nav/SidebarRow';
Expand All @@ -25,22 +24,22 @@ export default class HomeTab extends React.Component {
<SidebarRow
name="All Messages"
customStyles={[styles.streamName, styles.mainMenu]}
icon={<Icon style={styles.icon} name="md-home" />}
icon="md-home"
/>
<SidebarRow
name="Private Messages"
customStyles={[styles.streamName, styles.mainMenu]}
icon={<Icon style={styles.icon} name="md-chatboxes" />}
icon="md-chatboxes"
/>
<SidebarRow
name="Starred"
customStyles={[styles.streamName, styles.mainMenu]}
icon={<Icon style={styles.icon} name="md-star" />}
icon="md-star"
/>
<SidebarRow
name="Mentions"
customStyles={[styles.streamName, styles.mainMenu]}
icon={<Icon style={styles.icon} name="md-at" />}
icon="md-at"
/>
</View>
);
Expand Down
2 changes: 1 addition & 1 deletion src/nav/SidebarRow.js
Expand Up @@ -11,9 +11,9 @@ import { Touchable } from '../common';
const styles = StyleSheet.create({
row: {
flex: 1,
flexBasis: 40,
flexDirection: 'row',
alignItems: 'center',
height: 40,
},
icon: {
width: 20,
Expand Down
9 changes: 4 additions & 5 deletions src/start/DevAuthScreen.js
Expand Up @@ -4,15 +4,12 @@ import {
} from 'react-native';
import { connect } from 'react-redux';

import { Auth } from '../api/apiFetch';
import boundActions from '../boundActions';
import { Screen, ErrorMsg, Button } from '../common';
import { devGetEmails, devFetchApiKey } from '../api';
import { getAuth } from '../account/accountSelectors';

type Props = {
auth: any,
}

type State = {
progress: boolean,
directAdmins: string[],
Expand All @@ -21,7 +18,9 @@ type State = {

class DevAuthScreen extends React.Component {

props: Props;
props: {
auth: Auth,
};

state: State = {
progress: false,
Expand Down
2 changes: 1 addition & 1 deletion src/streamlist/StreamItem.js
Expand Up @@ -13,7 +13,7 @@ const styles = StyleSheet.create({
flex: 1,
flexDirection: 'row',
alignItems: 'center',
height: 50,
flexBasis: 50,
},
description: {
opacity: 0.75,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -1863,11 +1863,11 @@ eslint-plugin-react-native@^2.0.0:
eslint "3.11.0"

eslint-plugin-react@^6.6.0:
version "6.7.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.7.1.tgz#1af96aea545856825157d97c1b50d5a8fb64a5a7"
version "6.8.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.8.0.tgz#741ab5438a094532e5ce1bbb935d6832356f492d"
dependencies:
doctrine "^1.2.2"
jsx-ast-utils "^1.3.3"
jsx-ast-utils "^1.3.4"

eslint-plugin-spellcheck@0.0.8:
version "0.0.8"
Expand Down Expand Up @@ -3352,7 +3352,7 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.3.6"

jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.3:
jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.3.4.tgz#0257ed1cc4b1e65b39d7d9940f9fb4f20f7ba0a9"
dependencies:
Expand Down

0 comments on commit f8abcef

Please sign in to comment.