├── .babelrc ├── .editorconfig ├── .flowconfig ├── .gitignore ├── LICENSE ├── README.md ├── __mocks__ ├── .eslintrc.js └── react-native-maps.js ├── __tests__ ├── .eslintrc.js ├── scenes │ ├── Info │ │ ├── __snapshots__ │ │ │ └── index.test.js.snap │ │ ├── components │ │ │ ├── CodeOfConduct.test.js │ │ │ ├── Organiser.test.js │ │ │ └── __snapshots__ │ │ │ │ ├── CodeOfConduct.test.js.snap │ │ │ │ └── Organiser.test.js.snap │ │ └── index.test.js │ ├── Schedule │ │ ├── __snapshots__ │ │ │ └── index.test.js.snap │ │ ├── components │ │ │ ├── Break.test.js │ │ │ ├── NowButton.test.js │ │ │ ├── SplashScreen.test.js │ │ │ ├── Talk.test.js │ │ │ └── __snapshots__ │ │ │ │ ├── Break.test.js.snap │ │ │ │ ├── NowButton.test.js.snap │ │ │ │ ├── SplashScreen.test.js.snap │ │ │ │ └── Talk.test.js.snap │ │ └── index.test.js │ └── Talk │ │ ├── __snapshots__ │ │ └── index.test.js.snap │ │ ├── components │ │ ├── Hint.test.js │ │ ├── Pane.test.js │ │ ├── Preview.test.js │ │ ├── Speaker.test.js │ │ └── __snapshots__ │ │ │ ├── Hint.test.js.snap │ │ │ ├── Pane.test.js.snap │ │ │ ├── Preview.test.js.snap │ │ │ └── Speaker.test.js.snap │ │ └── index.test.js └── setup.js ├── android ├── .gitignore ├── .idea │ ├── .name │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── misc.xml │ ├── modules.xml │ └── runConfigurations.xml ├── app │ ├── BUCK │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ └── fonts │ │ │ ├── Entypo.ttf │ │ │ ├── EvilIcons.ttf │ │ │ ├── FontAwesome.ttf │ │ │ ├── Foundation.ttf │ │ │ ├── Ionicons.ttf │ │ │ ├── MaterialCommunityIcons.ttf │ │ │ ├── MaterialIcons.ttf │ │ │ ├── Octicons.ttf │ │ │ ├── SimpleLineIcons.ttf │ │ │ └── Zocial.ttf │ │ ├── java │ │ └── com │ │ │ └── reactconf2017 │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── app.json ├── app ├── ReactConf2017.js ├── components │ ├── Avatar │ │ └── index.js │ ├── DraggableView │ │ └── index.js │ ├── ListTitle │ │ └── index.js │ ├── Modal │ │ └── index.js │ ├── Navbar │ │ └── index.js │ └── Scene │ │ └── index.js ├── constants.js ├── data │ ├── organisers.js │ └── talks.js ├── scenes │ ├── Info │ │ ├── components │ │ │ ├── CodeOfConduct │ │ │ │ └── index.js │ │ │ └── Organiser │ │ │ │ └── index.js │ │ ├── images │ │ │ ├── thinkmill-logo.png │ │ │ └── thinkmill-logo@2x.png │ │ └── index.js │ ├── Schedule │ │ ├── components │ │ │ ├── Break │ │ │ │ └── index.js │ │ │ ├── NowButton │ │ │ │ └── index.js │ │ │ ├── SplashScreen │ │ │ │ └── index.js │ │ │ └── Talk │ │ │ │ └── index.js │ │ ├── images │ │ │ ├── splash-logo.png │ │ │ └── splash-logo@2x.png │ │ └── index.js │ ├── Talk │ │ ├── components │ │ │ ├── Hint │ │ │ │ └── index.js │ │ │ ├── Pane │ │ │ │ └── index.js │ │ │ ├── Preview │ │ │ │ └── index.js │ │ │ └── Speaker │ │ │ │ └── index.js │ │ └── index.js │ └── index.js ├── theme.js ├── types.js └── utils │ ├── attemptToOpenUrl.js │ ├── color.js │ └── index.js ├── circle.yml ├── flow-typed └── npm │ ├── babel-eslint_vx.x.x.js │ ├── babel-jest_vx.x.x.js │ ├── babel-preset-react-native_vx.x.x.js │ ├── eslint-config-keystone-react_vx.x.x.js │ ├── eslint-config-keystone_vx.x.x.js │ ├── eslint-plugin-react_vx.x.x.js │ ├── eslint_vx.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── flow-typed_vx.x.x.js │ ├── jest_v18.x.x.js │ ├── mockdate_vx.x.x.js │ ├── moment_v2.x.x.js │ ├── react-native-blur_vx.x.x.js │ ├── react-native-code-push_vx.x.x.js │ ├── react-native-linear-gradient_vx.x.x.js │ ├── react-native-maps_vx.x.x.js │ ├── react-native-smart-splash-screen_vx.x.x.js │ ├── react-native-vector-icons_vx.x.x.js │ └── react-test-renderer_vx.x.x.js ├── index.android.js ├── index.ios.js ├── ios ├── .gitignore ├── ReactConf2017-tvOS │ └── Info.plist ├── ReactConf2017-tvOSTests │ └── Info.plist ├── ReactConf2017.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── joss.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── Debug.xcscheme │ │ └── Release.xcscheme ├── ReactConf2017 │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ ├── Icon-Small-50x50@1x.png │ │ │ └── Icon-Small-50x50@2x.png │ │ ├── iTunesArtwork@1x.png │ │ ├── iTunesArtwork@2x.png │ │ └── iTunesArtwork@3x.png │ ├── Info.plist │ ├── LaunchScreen.storyboard │ ├── Splash.png │ ├── Splash@2x.png │ └── main.m └── ReactConf2017Tests │ ├── Info.plist │ └── ReactConf2017Tests.m ├── jsconfig.json ├── package.json └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | root = true 4 | 5 | [*] 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | indent_style = space 11 | indent_size = 2 12 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | .*/Libraries/react-native/ReactNative.js 16 | 17 | [include] 18 | 19 | [libs] 20 | node_modules/react-native/Libraries/react-native/react-native-interface.js 21 | node_modules/react-native/flow 22 | flow/ 23 | 24 | [options] 25 | emoji=true 26 | 27 | module.system=haste 28 | 29 | experimental.strict_type_args=true 30 | 31 | munge_underscores=true 32 | 33 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 34 | 35 | suppress_type=$FlowIssue 36 | suppress_type=$FlowFixMe 37 | suppress_type=$FixMe 38 | 39 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 40 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 42 | 43 | unsafe.enable_getters_and_setters=true 44 | 45 | [version] 46 | 0.39.0 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | 39 | # Android secrets 40 | **/*/res/values/configuration.xml 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Thinkmill 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React Conf 2017 2 | 3 | The companion app for [React Conf 2017](http://conf.reactjs.org) in Santa Clara, California. Powered by [React Native](https://facebook.github.io/react-native/), and built in Sydney by [Thinkmill](https://www.thinkmill.com.au). 4 | 5 | Get a live schedule, information about the talks and speakers, and easily tweet or share talks as they happen. 6 | 7 | ## About the App 8 | 9 | We're open sourcing this early as a preview, it's been submitted to the app store and will hopefully be available in a couple of days. We'll add a link to the app here when that happens. 10 | 11 | There will be design tweaks and updates as we lead up to the conference - we'll also be publishing the final Sketch files when they're ready. 12 | 13 | PRs and feedback are welcome, let us know what you think! 14 | 15 | And for those of you who will be attending, we hope you enjoy the app, and we'll see you there. 16 | 17 | ## Getting Started 18 | 19 | To run the app, clone this repo then use `yarn` to install its dependencies. 20 | 21 | Open the project in XCode and click "Play". You should be good to go! 22 | 23 | ## Credits 24 | 25 | [Thinkmill](https://www.thinkmill.com.au) set aside some project time to build this app because we wanted to hack on a fresh React Native project, try some new things and we're excited about the conference. 26 | 27 | The following people made it happen: 28 | 29 | * [Boris Bozic](https://twitter.com/borisbozic) - Design 30 | * [Jed Watson](http://twitter.com/jedwatson) - Concept and Architecture 31 | * [Joss Mackison](https://twitter.com/jossmackison) - UI 32 | * [Kevin Brown](https://github.com/blargity) - Programming 33 | 34 | Also thanks to [James Kyle](https://twitter.com/thejameskyle) for his review & contributions. 35 | 36 | We've incorporated some cool tech including: 37 | 38 | * [Code Push](http://microsoft.github.io/code-push/) 39 | * [Jest](https://facebook.github.io/jest/) 40 | * [Flow](https://flowtype.org) 41 | * [Prettier](https://github.com/prettier/prettier) 42 | 43 | See [package.json](./package.json) for the full set of react native packages we used. 44 | 45 | # License 46 | 47 | MIT Licensed. Copyright (c) Thinkmill Pty Ltd 2017. 48 | -------------------------------------------------------------------------------- /__mocks__/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'env': { 3 | 'es6': true, 4 | 'jest': true, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /__mocks__/react-native-maps.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default class MapView extends React.Component { 4 | render() { 5 | return React.createElement('MapView', this.props, this.props.children); 6 | } 7 | } 8 | 9 | class Marker extends React.Component { 10 | render() { 11 | return React.createElement('Marker', this.props, this.props.children); 12 | } 13 | 14 | showCallout() {} 15 | } 16 | 17 | MapView.Marker = Marker; 18 | -------------------------------------------------------------------------------- /__tests__/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'env': { 3 | 'es6': true, 4 | 'jest': true, 5 | }, 6 | }; -------------------------------------------------------------------------------- /__tests__/scenes/Info/components/CodeOfConduct.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import CodeOfConduct 7 | from '../../../../app/scenes/Info/components/CodeOfConduct'; 8 | 9 | describe('Info - Code of Conduct', () => { 10 | it('renders correctly', () => { 11 | const tree = renderer.create( {}} />).toJSON(); 12 | 13 | expect(tree).toMatchSnapshot(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /__tests__/scenes/Info/components/Organiser.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Organiser from '../../../../app/scenes/Info/components/Organiser'; 7 | 8 | describe('Info - Organiser', () => { 9 | it('renders correctly', () => { 10 | const tree = renderer 11 | .create( 12 | {}} 16 | summary="We are testing." 17 | /> 18 | ) 19 | .toJSON(); 20 | 21 | expect(tree).toMatchSnapshot(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /__tests__/scenes/Info/components/__snapshots__/Organiser.test.js.snap: -------------------------------------------------------------------------------- 1 | exports[`Info - Organiser renders correctly 1`] = ` 2 | 29 | 41 | 51 | 63 | 64 | 72 | 82 | Tes Ting 83 | 84 | 96 | We are testing. 97 | 98 | 99 | 100 | 101 | `; 102 | -------------------------------------------------------------------------------- /__tests__/scenes/Info/index.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Info from '../../../app/scenes/Info'; 7 | 8 | describe('Info', () => { 9 | it('renders correctly', () => { 10 | const tree = renderer.create().toJSON(); 11 | 12 | expect(tree).toMatchSnapshot(); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /__tests__/scenes/Schedule/components/Break.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Break from '../../../../app/scenes/Schedule/components/Break'; 7 | 8 | describe('Schedule - Break', () => { 9 | it('renders correctly', () => { 10 | const tree = renderer 11 | .create() 12 | .toJSON(); 13 | 14 | expect(tree).toMatchSnapshot(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /__tests__/scenes/Schedule/components/NowButton.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import NowButton from '../../../../app/scenes/Schedule/components/NowButton'; 7 | 8 | describe('Schedule - Now Button', () => { 9 | it('renders correctly', () => { 10 | const tree = renderer.create( {}} />).toJSON(); 11 | 12 | expect(tree).toMatchSnapshot(); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /__tests__/scenes/Schedule/components/SplashScreen.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import SplashScreen 7 | from '../../../../app/scenes/Schedule/components/SplashScreen'; 8 | 9 | describe('Schedule - Splash Screen', () => { 10 | it('renders correctly', () => { 11 | const tree = renderer.create().toJSON(); 12 | 13 | expect(tree).toMatchSnapshot(); 14 | }); 15 | 16 | it('renders correctly in animated state', () => { 17 | const tree = renderer.create().toJSON(); 18 | 19 | expect(tree).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /__tests__/scenes/Schedule/components/Talk.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Talk from '../../../../app/scenes/Schedule/components/Talk'; 7 | 8 | describe('Schedule - Talk', () => { 9 | it('renders correctly', () => { 10 | const tree = renderer 11 | .create( 12 | {}} 14 | speakerAvatarUri="" 15 | speakerName="" 16 | startTime="" 17 | status="present" 18 | title="" 19 | /> 20 | ) 21 | .toJSON(); 22 | 23 | expect(tree).toMatchSnapshot(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /__tests__/scenes/Schedule/components/__snapshots__/Break.test.js.snap: -------------------------------------------------------------------------------- 1 | exports[`Schedule - Break renders correctly 1`] = ` 2 | 14 | 21 | 164 | 180 | — 181 | Break 182 | 183 | 184 | 185 | `; 186 | -------------------------------------------------------------------------------- /__tests__/scenes/Schedule/components/__snapshots__/NowButton.test.js.snap: -------------------------------------------------------------------------------- 1 | exports[`Schedule - Now Button renders correctly 1`] = ` 2 | 19 | 65 | 76 | NOW 77 | 78 | 79 | 80 | `; 81 | -------------------------------------------------------------------------------- /__tests__/scenes/Schedule/components/__snapshots__/SplashScreen.test.js.snap: -------------------------------------------------------------------------------- 1 | exports[`Schedule - Splash Screen renders correctly 1`] = ` 2 | 8 | 20 | 55 | 57 | 58 | 81 | 107 | 108 | 109 | `; 110 | 111 | exports[`Schedule - Splash Screen renders correctly in animated state 1`] = ` 112 | 118 | 130 | 165 | 167 | 168 | 191 | 217 | 218 | 219 | `; 220 | -------------------------------------------------------------------------------- /__tests__/scenes/Schedule/components/__snapshots__/Talk.test.js.snap: -------------------------------------------------------------------------------- 1 | exports[`Schedule - Talk renders correctly 1`] = ` 2 | 29 | 40 | 47 | 57 | 82 |  83 | 84 | 85 | 86 | 100 | 111 | 128 | 129 | — 130 | 131 | 132 | 147 | 148 | 149 | 150 | 158 | 168 | 180 | 181 | 201 |  202 | 203 | 204 | 205 | 206 | 207 | `; 208 | -------------------------------------------------------------------------------- /__tests__/scenes/Schedule/index.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Schedule from '../../../app/scenes/Schedule'; 7 | 8 | const mockNavigator = { 9 | navigationContext: { 10 | addListener: () => {}, 11 | }, 12 | }; 13 | 14 | describe('Schedule', () => { 15 | it('renders correctly', () => { 16 | const tree = renderer 17 | .create() 18 | .toJSON(); 19 | 20 | expect(tree).toMatchSnapshot(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /__tests__/scenes/Talk/components/Hint.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Hint from '../../../../app/scenes/Talk/components/Hint'; 7 | 8 | describe('Talk - Hint', () => { 9 | it('renders correctly', () => { 10 | const tree = renderer.create( {}} />).toJSON(); 11 | 12 | expect(tree).toMatchSnapshot(); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /__tests__/scenes/Talk/components/Pane.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Pane from '../../../../app/scenes/Talk/components/Pane'; 7 | import talks from '../../../../app/data/talks'; 8 | 9 | describe('Talk - Pane', () => { 10 | it('renders correctly', () => { 11 | const tree = renderer 12 | .create( 13 | {}} 16 | onScroll={() => {}} 17 | onScrollEndDrag={() => {}} 18 | prevTalk={talks[2]} 19 | showSpeakerModal={() => {}} 20 | visibleTalk={talks[2]} 21 | /> 22 | ) 23 | .toJSON(); 24 | 25 | expect(tree).toMatchSnapshot(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /__tests__/scenes/Talk/components/Preview.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Preview from '../../../../app/scenes/Talk/components/Preview'; 7 | 8 | describe('Talk - Preview', () => { 9 | it('renders correctly in top position', () => { 10 | const tree = renderer 11 | .create( 12 | 19 | ) 20 | .toJSON(); 21 | 22 | expect(tree).toMatchSnapshot(); 23 | }); 24 | 25 | it('renders correctly in bottom position', () => { 26 | const tree = renderer 27 | .create( 28 | 35 | ) 36 | .toJSON(); 37 | 38 | expect(tree).toMatchSnapshot(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /__tests__/scenes/Talk/components/Speaker.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Speaker from '../../../../app/scenes/Talk/components/Speaker'; 7 | 8 | describe('Talk - Speaker', () => { 9 | it('renders correctly with missing github and twitter', () => { 10 | const tree = renderer 11 | .create( 12 | {}} 16 | summary="This is my summary." 17 | /> 18 | ) 19 | .toJSON(); 20 | 21 | expect(tree).toMatchSnapshot(); 22 | }); 23 | it('renders correctly with all props', () => { 24 | const tree = renderer 25 | .create( 26 | {}} 31 | summary="This is my summary." 32 | twitter="twitter" 33 | /> 34 | ) 35 | .toJSON(); 36 | 37 | expect(tree).toMatchSnapshot(); 38 | }); 39 | }); 40 | -------------------------------------------------------------------------------- /__tests__/scenes/Talk/components/__snapshots__/Hint.test.js.snap: -------------------------------------------------------------------------------- 1 | exports[`Talk - Hint renders correctly 1`] = ` 2 | 32 | 43 | 61 |  62 | 63 | 64 | 65 | `; 66 | -------------------------------------------------------------------------------- /__tests__/scenes/Talk/components/__snapshots__/Preview.test.js.snap: -------------------------------------------------------------------------------- 1 | exports[`Talk - Preview renders correctly in bottom position 1`] = ` 2 | 19 | 30 | 48 |  49 | 50 | 51 | 61 | React Boilerplate 62 | 63 | 73 | React Boilerplate 74 | 75 | 76 | `; 77 | 78 | exports[`Talk - Preview renders correctly in top position 1`] = ` 79 | 96 | 106 | React Boilerplate 107 | 108 | 118 | React Boilerplate 119 | 120 | 131 | 149 |  150 | 151 | 152 | 153 | `; 154 | -------------------------------------------------------------------------------- /__tests__/scenes/Talk/index.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'react-native'; 3 | import React from 'react'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | import Talk from '../../../app/scenes/Talk'; 7 | 8 | const talk = { 9 | id: '', 10 | summary: '', 11 | title: '', 12 | speaker: { 13 | avatar: '', 14 | github: '', 15 | name: '', 16 | twitter: '', 17 | summary: '', 18 | }, 19 | time: { 20 | start: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), 21 | end: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), 22 | }, 23 | }; 24 | 25 | describe('Talk', () => { 26 | it('renders correctly', () => { 27 | const tree = renderer 28 | .create( 29 | 36 | ) 37 | .toJSON(); 38 | 39 | expect(tree).toMatchSnapshot(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /__tests__/setup.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { View } from 'react-native'; 4 | 5 | // ------------------------ 6 | // Javascript Built-Ins 7 | // ------------------------ 8 | // Ensure Date.now and new Date() give us the same date for snapshots. 9 | import mockdate from 'mockdate'; 10 | mockdate.set(1422778155399, -660); 11 | 12 | // ------------------------ 13 | // React Native Built-Ins 14 | // ------------------------ 15 | // React Native UI Manager needs a focus function. 16 | // $FlowFixMe 17 | import { UIManager } from 'NativeModules'; 18 | UIManager.focus = jest.fn(); 19 | UIManager.createView = jest.fn(() => ); 20 | UIManager.updateView = jest.fn(); 21 | 22 | // ------------------------ 23 | // NPM Modules 24 | // ------------------------ 25 | // Provide a manual mock for native modules. 26 | jest.mock('react-native-maps'); 27 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # Intellij 36 | *.iml 37 | .idea/workspace.xml 38 | .idea/tasks.xml 39 | .idea/gradle.xml 40 | .idea/dictionaries 41 | .idea/libraries 42 | 43 | # Keystore files 44 | *.jks 45 | 46 | # External native build folder generated in Android Studio 2.2 and later 47 | .externalNativeBuild 48 | 49 | # Google Services (e.g. APIs or Firebase) 50 | google-services.json 51 | 52 | # Freeline 53 | freeline.py 54 | freeline/ 55 | freeline_project_description.json 56 | -------------------------------------------------------------------------------- /android/.idea/.name: -------------------------------------------------------------------------------- 1 | ReactConf2017 -------------------------------------------------------------------------------- /android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /android/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /android/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.reactconf2017', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.reactconf2017', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * project.ext.react = [ 14 | * // the name of the generated asset file containing your JS bundle 15 | * bundleAssetName: "index.bundle", 16 | * 17 | * // the entry file for bundle generation 18 | * entryFile: "index.js", 19 | * ] 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // the root of your project, i.e. where "package.json" lives 37 | * root: "../../", 38 | * 39 | * // where to put the JS bundle asset in debug mode 40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 41 | * 42 | * // where to put the JS bundle asset in release mode 43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 44 | * 45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 46 | * // require('./image.png')), in debug mode 47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 48 | * 49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 50 | * // require('./image.png')), in release mode 51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 52 | * 53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 57 | * // for example, you might want to remove it from here. 58 | * inputExcludes: ["android/**", "ios/**"], 59 | * 60 | * // override which node gets called and with what additional arguments 61 | * nodeExecutableAndArgs: ["node"] 62 | * 63 | * // supply additional arguments to the packager 64 | * extraPackagerArgs: [] 65 | * ] 66 | */ 67 | 68 | apply from: "../../node_modules/react-native/react.gradle" 69 | apply from: "../../node_modules/react-native-code-push/android/codepush.gradle" 70 | 71 | /** 72 | * Set this to true to create two separate APKs instead of one: 73 | * - An APK that only works on ARM devices 74 | * - An APK that only works on x86 devices 75 | * The advantage is the size of the APK is reduced by about 4MB. 76 | * Upload all the APKs to the Play Store and people will download 77 | * the correct one based on the CPU architecture of their device. 78 | */ 79 | def enableSeparateBuildPerCPUArchitecture = false 80 | 81 | /** 82 | * Run Proguard to shrink the Java bytecode in release builds. 83 | */ 84 | def enableProguardInReleaseBuilds = false 85 | 86 | android { 87 | compileSdkVersion 23 88 | buildToolsVersion "23.0.1" 89 | 90 | defaultConfig { 91 | applicationId "com.reactconf2017" 92 | minSdkVersion 16 93 | targetSdkVersion 22 94 | versionCode 1 95 | versionName "1.0" 96 | ndk { 97 | abiFilters "armeabi-v7a", "x86" 98 | } 99 | } 100 | splits { 101 | abi { 102 | reset() 103 | enable enableSeparateBuildPerCPUArchitecture 104 | universalApk false // If true, also generate a universal APK 105 | include "armeabi-v7a", "x86" 106 | } 107 | } 108 | buildTypes { 109 | release { 110 | minifyEnabled enableProguardInReleaseBuilds 111 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 112 | } 113 | } 114 | // applicationVariants are e.g. debug, release 115 | applicationVariants.all { variant -> 116 | variant.outputs.each { output -> 117 | // For each separate APK per architecture, set a unique version code as described here: 118 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 119 | def versionCodes = ["armeabi-v7a":1, "x86":2] 120 | def abi = output.getFilter(OutputFile.ABI) 121 | if (abi != null) { // null for the universal-debug, universal-release variants 122 | output.versionCodeOverride = 123 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 124 | } 125 | } 126 | } 127 | } 128 | 129 | dependencies { 130 | compile project(':react-native-smart-splash-screen') 131 | compile project(':react-native-linear-gradient') 132 | compile project(':react-native-maps') 133 | compile project(':react-native-code-push') 134 | compile project(':react-native-blur') 135 | compile project(':react-native-vector-icons') 136 | compile fileTree(dir: "libs", include: ["*.jar"]) 137 | compile "com.fivehundredpx:blurringview:1.0.0" 138 | compile "com.android.support:appcompat-v7:23.0.1" 139 | compile "com.facebook.react:react-native:+" // From node_modules 140 | } 141 | 142 | // Run this once to be able to run the application with BUCK 143 | // puts all compile dependencies into folder libs for BUCK to use 144 | task copyDownloadableDepsToLibs(type: Copy) { 145 | from configurations.compile 146 | into 'libs' 147 | } 148 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/SimpleLineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/SimpleLineIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactconf2017/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactconf2017; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "ReactConf2017"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactconf2017/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.reactconf2017; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.ReactApplication; 7 | import com.reactnativecomponent.splashscreen.RCTSplashScreenPackage; 8 | import com.BV.LinearGradient.LinearGradientPackage; 9 | import com.airbnb.android.react.maps.MapsPackage; 10 | import com.microsoft.codepush.react.CodePush; 11 | import com.cmcewen.blurview.BlurViewPackage; 12 | import com.oblador.vectoricons.VectorIconsPackage; 13 | import com.facebook.react.ReactInstanceManager; 14 | import com.facebook.react.ReactNativeHost; 15 | import com.facebook.react.ReactPackage; 16 | import com.facebook.react.shell.MainReactPackage; 17 | import com.facebook.soloader.SoLoader; 18 | 19 | import java.util.Arrays; 20 | import java.util.List; 21 | 22 | public class MainApplication extends Application implements ReactApplication { 23 | 24 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 25 | 26 | @Override 27 | protected String getJSBundleFile() { 28 | return CodePush.getJSBundleFile(); 29 | } 30 | 31 | @Override 32 | public boolean getUseDeveloperSupport() { 33 | return BuildConfig.DEBUG; 34 | } 35 | 36 | @Override 37 | protected List getPackages() { 38 | return Arrays.asList( 39 | new MainReactPackage(), 40 | new RCTSplashScreenPackage(), 41 | new LinearGradientPackage(), 42 | new MapsPackage(), 43 | new CodePush(null, getApplicationContext(), BuildConfig.DEBUG), 44 | new BlurViewPackage(), 45 | new VectorIconsPackage() 46 | ); 47 | } 48 | }; 49 | 50 | @Override 51 | public ReactNativeHost getReactNativeHost() { 52 | return mReactNativeHost; 53 | } 54 | 55 | @Override 56 | public void onCreate() { 57 | super.onCreate(); 58 | SoLoader.init(this, /* native exopackage */ false); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ReactConf2017 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { url 'https://github.com/500px/500px-android-blur/raw/master/releases/' } 20 | maven { 21 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 22 | url "$rootDir/../node_modules/react-native/android" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Feb 22 13:18:42 AEDT 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactConf2017' 2 | include ':react-native-smart-splash-screen' 3 | project(':react-native-smart-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-splash-screen/android') 4 | include ':react-native-linear-gradient' 5 | project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android') 6 | include ':react-native-maps' 7 | project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/android') 8 | include ':react-native-code-push' 9 | project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app') 10 | include ':react-native-blur' 11 | project(':react-native-blur').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-blur/android') 12 | include ':react-native-vector-icons' 13 | project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') 14 | 15 | include ':app' 16 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactConf2017", 3 | "displayName": "ReactConf2017" 4 | } -------------------------------------------------------------------------------- /app/ReactConf2017.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { AppState, Navigator, StatusBar, StyleSheet } from 'react-native'; 4 | import codePush from 'react-native-code-push'; 5 | 6 | import theme from './theme'; 7 | import { Info, Schedule, Talk } from './scenes'; 8 | const Scenes = { Info, Schedule, Talk }; 9 | 10 | const DEFAULT_VIEW = 'Schedule'; 11 | 12 | class ReactConf2017 extends Component { 13 | componentDidMount() { 14 | this.syncAppVersion(); 15 | StatusBar.setBarStyle('light-content', true); 16 | AppState.addEventListener('change', this.handleAppStateChange); 17 | } 18 | componentWillUnmount() { 19 | AppState.removeEventListener('change', this.handleAppStateChange); 20 | } 21 | 22 | handleAppStateChange = (currentAppState: string) => { 23 | if (currentAppState === 'active') { 24 | this.syncAppVersion(); 25 | } 26 | }; 27 | 28 | syncAppVersion = () => { 29 | codePush.sync({ mandatoryInstallMode: codePush.InstallMode.IMMEDIATE }); 30 | }; 31 | 32 | render() { 33 | const renderScene = (route, navigator) => { 34 | const SceneComponent = Scenes[route.scene]; 35 | 36 | return ; 37 | }; 38 | 39 | const TRANSITION_KEYS = Object.keys(Navigator.SceneConfigs); 40 | 41 | const configureScene = route => { 42 | if ( 43 | route.transitionKey && !TRANSITION_KEYS.includes(route.transitionKey) 44 | ) { 45 | console.warn( 46 | 'Warning: Invalid transition key `' + 47 | route.transitionKey + 48 | '` supplied to `Navigator`. Valid keys: [\n' + 49 | TRANSITION_KEYS.join('\n') + 50 | '\n]' 51 | ); 52 | return Navigator.SceneConfigs.PushFromRight; 53 | } 54 | 55 | return route.transitionKey 56 | ? Navigator.SceneConfigs[route.transitionKey] 57 | : { 58 | ...Navigator.SceneConfigs.PushFromRight, 59 | gestures: route.enableSwipeToPop 60 | ? { 61 | pop: Navigator.SceneConfigs.PushFromRight.gestures.pop, 62 | } 63 | : null, 64 | }; 65 | }; 66 | 67 | return ( 68 | 75 | ); 76 | } 77 | } 78 | 79 | const styles = StyleSheet.create({ 80 | navigator: { 81 | backgroundColor: 'black', 82 | flex: 1, 83 | }, 84 | scenes: { 85 | backgroundColor: theme.color.sceneBg, 86 | overflow: 'visible', 87 | shadowColor: 'black', 88 | shadowOffset: { height: 0, width: 0 }, 89 | shadowOpacity: 0.33, 90 | shadowRadius: 5, 91 | }, 92 | }); 93 | 94 | module.exports = ReactConf2017; 95 | -------------------------------------------------------------------------------- /app/components/Avatar/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { Image, View } from 'react-native'; 4 | 5 | import theme from '../../theme'; 6 | 7 | type Props = { 8 | size?: number, 9 | source: string, 10 | }; 11 | 12 | export default function Avatar({ size = 44, source }: Props) { 13 | const styles = { 14 | wrapper: { 15 | backgroundColor: theme.color.sceneBg, 16 | borderRadius: size, 17 | overflow: 'hidden', 18 | height: size, 19 | width: size, 20 | }, 21 | image: { 22 | height: size, 23 | width: size, 24 | }, 25 | }; 26 | 27 | return ( 28 | 29 | 30 | 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /app/components/DraggableView/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { Animated, PanResponder } from 'react-native'; 4 | 5 | const SWIPE_THRESHOLD = 80; 6 | 7 | export default class DraggableView extends Component { 8 | props: { 9 | allowX: boolean, 10 | allowY: boolean, 11 | onMove?: () => mixed, 12 | onRelease: () => mixed, 13 | children?: Array>, 14 | }; 15 | 16 | state = { 17 | pan: new Animated.ValueXY(), // inits to zero 18 | }; 19 | 20 | static defaultProps = { 21 | allowX: true, 22 | allowY: true, 23 | style: {}, 24 | }; 25 | 26 | _panResponder = PanResponder.create({ 27 | onStartShouldSetPanResponder: () => true, 28 | onPanResponderMove: (e, gestureState) => { 29 | if (this.props.onMove) this.props.onMove(e, gestureState); 30 | 31 | Animated.event([ 32 | null, 33 | { 34 | dx: this.props.allowX ? this.state.pan.x : 0, // x,y are Animated.Value 35 | dy: this.props.allowY ? this.state.pan.y : 0, 36 | }, 37 | ])(e, gestureState); 38 | }, 39 | onPanResponderRelease: (e, { vx, vy }) => { 40 | this.state.pan.flattenOffset(); 41 | 42 | if (Math.abs(this.state.pan.y._value) > SWIPE_THRESHOLD) { 43 | if (this.props.onRelease) this.props.onRelease(e, { vx, vy }); 44 | Animated.decay(this.state.pan, { 45 | velocity: { 46 | x: this.props.allowX ? vx : 0, 47 | y: this.props.allowY ? vy : 0, 48 | }, 49 | deceleration: 0.98, 50 | }).start(); 51 | } else { 52 | Animated.spring(this.state.pan, { 53 | toValue: { x: 0, y: 0 }, 54 | friction: 8, 55 | tension: 80, 56 | }).start(); 57 | } 58 | }, 59 | }); 60 | 61 | render() { 62 | return ( 63 | 67 | {this.props.children} 68 | 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/components/ListTitle/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { PixelRatio, Text, View } from 'react-native'; 4 | 5 | import theme from '../../theme'; 6 | 7 | type Props = { 8 | bordered?: boolean, 9 | text: string, 10 | }; 11 | 12 | export default function ListTitle({ bordered, text }: Props) { 13 | const styles = { 14 | text: { 15 | color: theme.color.text, 16 | fontSize: theme.fontSize.xsmall, 17 | fontWeight: '500', 18 | lineHeight: theme.fontSize.large, 19 | }, 20 | view: { 21 | backgroundColor: theme.color.sceneBg, 22 | borderBottomColor: theme.color.gray20, 23 | borderBottomWidth: 1 / PixelRatio.get(), 24 | paddingHorizontal: theme.fontSize.default + 6, 25 | height: theme.listheader.height, 26 | justifyContent: 'flex-end', 27 | }, 28 | view__bordered: { 29 | shadowColor: theme.color.gray20, 30 | shadowOffset: { height: (-1) / PixelRatio.get(), width: 0 }, 31 | shadowOpacity: 1, 32 | shadowRadius: 0, 33 | }, 34 | }; 35 | 36 | return ( 37 | 38 | {text.toUpperCase()} 39 | 40 | ); 41 | } 42 | -------------------------------------------------------------------------------- /app/components/Modal/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { cloneElement, Component } from 'react'; 3 | import { 4 | Animated, 5 | Dimensions, 6 | Modal as RNModal, 7 | StyleSheet, 8 | TouchableOpacity, 9 | } from 'react-native'; 10 | import { BlurView } from 'react-native-blur'; 11 | 12 | function animateToValueWithOptions(val) { 13 | return { 14 | toValue: val, 15 | friction: 10, 16 | tension: 100, 17 | }; 18 | } 19 | 20 | const MODAL_ALIGNMENT = { 21 | bottom: 'flex-end', 22 | top: 'flex-start', 23 | center: 'center', 24 | }; 25 | 26 | export default class Modal extends Component { 27 | props: { 28 | align: 'bottom' | 'center' | 'top', 29 | blurAmount: number, 30 | blurType: 'dark' | 'light' | 'xlight', 31 | onClose: () => mixed, 32 | style?: {}, 33 | children?: React.Element<{ onClose?: () => mixed }>, 34 | }; 35 | 36 | state = { 37 | animValue: new Animated.Value(0), 38 | }; 39 | 40 | static defaultProps = { 41 | align: 'center', 42 | blurAmount: 12, 43 | blurType: 'dark', 44 | }; 45 | 46 | __isClosed: boolean | void; 47 | 48 | componentDidMount() { 49 | Animated.spring(this.state.animValue, animateToValueWithOptions(1)).start(); 50 | } 51 | onClose = () => { 52 | const { animValue } = this.state; 53 | const { onClose } = this.props; 54 | 55 | if (this.__isClosed) return; 56 | 57 | this.__isClosed = true; 58 | 59 | Animated.spring(animValue, animateToValueWithOptions(0)).start(onClose); 60 | }; 61 | 62 | renderChildren() { 63 | // $FlowFixMe: https://github.com/facebook/flow/issues/1964 64 | return cloneElement(this.props.children, { 65 | onClose: this.onClose, 66 | }); 67 | } 68 | render() { 69 | const { 70 | align, 71 | blurAmount, 72 | blurType, 73 | style, 74 | } = this.props; 75 | 76 | const blockoutDynamicStyles = { 77 | justifyContent: MODAL_ALIGNMENT[align], 78 | opacity: this.state.animValue, 79 | }; 80 | const dialogDynamicStyles = { 81 | transform: [ 82 | { 83 | scale: this.state.animValue.interpolate({ 84 | inputRange: [0, 1], 85 | outputRange: [0.93, 1], 86 | }), 87 | }, 88 | { 89 | translateY: this.state.animValue.interpolate({ 90 | inputRange: [0, 1], 91 | outputRange: [100, 1], 92 | }), 93 | }, 94 | ], 95 | }; 96 | 97 | return ( 98 | 99 | 100 | 105 | 106 | 107 | 108 | {this.props.children} 109 | 110 | 111 | 112 | ); 113 | } 114 | } 115 | 116 | const fillSpace = { 117 | height: Dimensions.get('window').height, 118 | left: 0, 119 | position: 'absolute', 120 | top: 0, 121 | width: Dimensions.get('window').width, 122 | }; 123 | const styles = StyleSheet.create({ 124 | blockout: { 125 | alignItems: 'center', 126 | ...fillSpace, 127 | }, 128 | blur: fillSpace, 129 | touchable: { 130 | flex: 1, 131 | }, 132 | }); 133 | -------------------------------------------------------------------------------- /app/components/Navbar/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { 4 | Dimensions, 5 | PixelRatio, 6 | StyleSheet, 7 | View, 8 | Text, 9 | TouchableOpacity, 10 | } from 'react-native'; 11 | import Icon from 'react-native-vector-icons/Ionicons'; 12 | 13 | import theme from '../../theme'; 14 | 15 | type Props = { 16 | backgroundColor?: string, 17 | buttonColor?: string, 18 | leftButtonDisabled?: boolean, 19 | leftButtonIconName?: string, 20 | leftButtonOnPress?: () => mixed, 21 | leftButtonText?: string, 22 | rightButtonDisabled?: boolean, 23 | rightButtonIconName?: string, 24 | rightButtonOnPress?: () => mixed, 25 | rightButtonText?: string, 26 | textColor?: string, 27 | title: string, 28 | titleRenderer?: () => mixed, 29 | }; 30 | 31 | export default function Navbar( 32 | { 33 | backgroundColor = theme.navbar.backgroundColor, 34 | buttonColor = theme.navbar.buttonColor, 35 | leftButtonDisabled, 36 | leftButtonIconName, 37 | leftButtonOnPress, 38 | leftButtonText, 39 | rightButtonDisabled, 40 | rightButtonIconName, 41 | rightButtonOnPress, 42 | rightButtonText, 43 | textColor = theme.navbar.textColor, 44 | title, 45 | titleRenderer, 46 | ...props 47 | }: Props 48 | ) { 49 | return ( 50 | 51 | 52 | 53 | {/* Left Button */} 54 | {leftButtonOnPress 55 | ? 60 | {!!leftButtonIconName && 61 | } 67 | 73 | {leftButtonText} 74 | 75 | 76 | : } 77 | 78 | {/* Title */} 79 | {titleRenderer 80 | ? titleRenderer() 81 | : 82 | 83 | {title} 84 | 85 | } 86 | 87 | {/* Right Button */} 88 | {rightButtonOnPress 89 | ? 94 | {!!rightButtonIconName && 95 | } 101 | 107 | {rightButtonText} 108 | 109 | 110 | : } 111 | 112 | 113 | ); 114 | } 115 | 116 | const styles = StyleSheet.create({ 117 | container: { 118 | alignItems: 'stretch', 119 | borderBottomColor: theme.color.gray20, 120 | borderBottomWidth: 1 / PixelRatio.get(), 121 | flexDirection: 'row', 122 | height: theme.navbar.height, 123 | overflow: 'hidden', 124 | justifyContent: 'space-between', 125 | paddingTop: 20, // account for the statusbar 126 | position: 'absolute', 127 | width: Dimensions.get('window').width, 128 | }, 129 | 130 | // buttons 131 | button: { 132 | alignItems: 'center', 133 | flex: 2, 134 | flexDirection: 'row', 135 | paddingHorizontal: theme.fontSize.default, 136 | }, 137 | button__right: { 138 | justifyContent: 'flex-end', 139 | }, 140 | buttonText: { 141 | color: theme.color.blue, 142 | fontSize: theme.fontSize.default, 143 | }, 144 | 145 | // title 146 | title: { 147 | alignItems: 'center', 148 | flex: 4, 149 | justifyContent: 'center', 150 | }, 151 | titleText: { 152 | color: theme.color.lightText, 153 | fontSize: theme.fontSize.default, 154 | fontWeight: '500', 155 | }, 156 | }); 157 | -------------------------------------------------------------------------------- /app/components/Scene/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { ScrollView, View } from 'react-native'; 4 | 5 | type Props = { 6 | scroll?: boolean, 7 | style?: Object, 8 | }; 9 | 10 | export default function Scene({ scroll, style, ...props }: Props) { 11 | const styles = [{ flex: 1 }, style]; 12 | const Tag = scroll ? ScrollView : View; 13 | 14 | return ; 15 | } 16 | -------------------------------------------------------------------------------- /app/constants.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | const TIME_FORMAT = 'h:mma'; 3 | 4 | export { TIME_FORMAT }; 5 | -------------------------------------------------------------------------------- /app/data/organisers.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | export const list = [ 3 | { 4 | avatar: 'https://www.gravatar.com/avatar/30840890815ed0044146eb2da203276e?s=128', 5 | name: 'Tom Occhino', 6 | summary: 'Lead Conference Wrangler', 7 | }, 8 | ]; 9 | -------------------------------------------------------------------------------- /app/scenes/Info/components/CodeOfConduct/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import Icon from 'react-native-vector-icons/Ionicons'; 4 | import { 5 | ScrollView, 6 | StyleSheet, 7 | Text, 8 | TouchableOpacity, 9 | View, 10 | } from 'react-native'; 11 | 12 | import theme from '../../../../theme'; 13 | import Modal from '../../../../components/Modal'; 14 | 15 | export default class CodeOfConduct extends Component { 16 | props: { 17 | onClose: () => mixed, 18 | }; 19 | 20 | render() { 21 | const { onClose } = this.props; 22 | 23 | return ( 24 | 30 | 31 | 32 | 33 | 34 | Code of Conduct 35 | 36 | 37 | 38 | 39 | All delegates, speakers and volunteers at React Conf are required to agree with the following code of conduct. Organizers will enforce this code throughout the event. 40 | 41 | 42 | 43 | 44 | The Quick Version 45 | 46 | 47 | Facebook is dedicated to providing a harassment-free conference experience for everyone, regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of conference participants in any form. Sexual language and imagery is not appropriate for any conference venue, including talks. 48 | 49 | 50 | Conference participants violating these rules may be sanctioned or expelled from the conference without a refund at the discretion of the conference organizers. 51 | 52 | 53 | 54 | 55 | The Less Quick Version 56 | 57 | 58 | Harassment includes offensive verbal comments related to gender, sexual orientation, disability, physical appearance, body size, race, religion, sexual images in public spaces, deliberate intimidation, stalking, following, harassing photography or recording, sustained disruption of talks or other events, inappropriate physical contact, and unwelcome sexual attention. 59 | 60 | 61 | Participants asked to stop any harassing behavior are expected to comply immediately. 62 | 63 | 64 | If a participant engages in harassing behavior, the conference organizers may take any action they deem appropriate, including warning the offender or expulsion from the conference with no refund. 65 | 66 | 67 | If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact a member of conference staff immediately. 68 | 69 | 70 | Conference staff will be happy to help participants contact venue security or local law enforcement, provide escorts, or otherwise assist those experiencing harassment to feel safe for the duration of the conference. We value your attendance. 71 | 72 | 73 | We expect participants to follow these rules at all conference venues and conference-related social events. 74 | 75 | 76 | 77 | this.refs.modal.onClose()} 79 | style={styles.close} 80 | activeOpacity={0.75} 81 | > 82 | 88 | 89 | 90 | 91 | ); 92 | } 93 | } 94 | 95 | const BORDER_RADIUS = 6; 96 | 97 | const styles = StyleSheet.create({ 98 | wrapper: { 99 | backgroundColor: 'white', 100 | borderRadius: BORDER_RADIUS, 101 | maxHeight: 400, 102 | shadowColor: 'black', 103 | shadowOffset: { height: 1, width: 0 }, 104 | shadowOpacity: 0.25, 105 | shadowRadius: 5, 106 | }, 107 | content: { 108 | padding: theme.fontSize.default, 109 | }, 110 | 111 | // text 112 | text: { 113 | color: theme.color.gray60, 114 | fontSize: 13, 115 | lineHeight: theme.fontSize.default, 116 | marginTop: theme.fontSize.small, 117 | }, 118 | heading: { 119 | color: theme.color.gray70, 120 | fontSize: theme.fontSize.small, 121 | fontWeight: 'bold', 122 | }, 123 | heading1: { 124 | fontSize: theme.fontSize.default, 125 | }, 126 | heading2: { 127 | fontSize: theme.fontSize.small, 128 | marginTop: theme.fontSize.large, 129 | }, 130 | 131 | // close 132 | close: { 133 | alignItems: 'center', 134 | backgroundColor: theme.color.gray05, 135 | borderBottomLeftRadius: BORDER_RADIUS, 136 | borderBottomRightRadius: BORDER_RADIUS, 137 | height: 40, 138 | justifyContent: 'center', 139 | shadowColor: 'black', 140 | shadowOffset: { height: -1, width: 0 }, 141 | shadowOpacity: 0.1, 142 | shadowRadius: 0, 143 | }, 144 | closeText: { 145 | color: theme.color.gray40, 146 | fontWeight: '500', 147 | }, 148 | }); 149 | -------------------------------------------------------------------------------- /app/scenes/Info/components/Organiser/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { 4 | PixelRatio, 5 | StyleSheet, 6 | Text, 7 | TouchableHighlight, 8 | View, 9 | } from 'react-native'; 10 | 11 | import Avatar from '../../../../components/Avatar'; 12 | import theme from '../../../../theme'; 13 | 14 | type Props = { 15 | avatar: string, 16 | name: string, 17 | onPress: () => mixed, 18 | summary: string, 19 | }; 20 | 21 | export default function Organiser( 22 | { 23 | avatar, 24 | name, 25 | onPress, 26 | summary, 27 | }: Props 28 | ) { 29 | const touchableProps = { 30 | activeOpacity: 1, 31 | onPress: onPress, 32 | style: styles.touchable, 33 | underlayColor: theme.color.gray05, 34 | }; 35 | 36 | return ( 37 | 38 | 39 | 40 | 41 | {name} 42 | {summary} 43 | 44 | 45 | 46 | ); 47 | } 48 | 49 | const styles = StyleSheet.create({ 50 | touchable: { 51 | backgroundColor: 'white', 52 | }, 53 | base: { 54 | alignItems: 'center', 55 | borderBottomColor: theme.color.gray20, 56 | borderBottomWidth: 1 / PixelRatio.get(), 57 | flexDirection: 'row', 58 | flexGrow: 1, 59 | flexShrink: 1, 60 | padding: theme.fontSize.default, 61 | }, 62 | 63 | // content 64 | text: { 65 | flexGrow: 1, 66 | flexShrink: 1, 67 | paddingLeft: theme.fontSize.default, 68 | }, 69 | subtitle: { 70 | color: theme.color.gray60, 71 | fontSize: theme.fontSize.small, 72 | fontWeight: '300', 73 | marginBottom: theme.fontSize.small, 74 | }, 75 | title: { 76 | color: theme.color.text, 77 | fontSize: theme.fontSize.default, 78 | }, 79 | }); 80 | -------------------------------------------------------------------------------- /app/scenes/Info/images/thinkmill-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/app/scenes/Info/images/thinkmill-logo.png -------------------------------------------------------------------------------- /app/scenes/Info/images/thinkmill-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/app/scenes/Info/images/thinkmill-logo@2x.png -------------------------------------------------------------------------------- /app/scenes/Info/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { 4 | Image, 5 | LayoutAnimation, 6 | PixelRatio, 7 | ScrollView, 8 | StyleSheet, 9 | Text, 10 | TouchableOpacity, 11 | View, 12 | } from 'react-native'; 13 | import MapView from 'react-native-maps'; 14 | 15 | import ListTitle from '../../components/ListTitle'; 16 | import Navbar from '../../components/Navbar'; 17 | import Scene from '../../components/Scene'; 18 | 19 | import { list as organiserList } from '../../data/organisers'; 20 | import theme from '../../theme'; 21 | import { attemptToOpenUrl } from '../../utils'; 22 | 23 | import CodeOfConduct from './components/CodeOfConduct'; 24 | import Organiser from './components/Organiser'; 25 | 26 | // Santa Clara, California 27 | const mapRegion = { 28 | latitude: 37.354108, 29 | longitude: -121.955246, 30 | latitudeDelta: 0.01, 31 | longitudeDelta: 0.01, 32 | }; 33 | 34 | export default class Info extends Component { 35 | props: { 36 | navigator: Object, 37 | organisers: typeof organiserList, 38 | }; 39 | 40 | state = { 41 | modalIsOpen: false, 42 | }; 43 | 44 | static defaultProps = { 45 | organisers: organiserList, 46 | }; 47 | 48 | componentDidMount() { 49 | setTimeout(this.refs.marker.showCallout, 1000); 50 | } 51 | 52 | toggleModal = () => { 53 | LayoutAnimation.easeInEaseOut(); 54 | this.setState({ modalIsOpen: !this.state.modalIsOpen }); 55 | }; 56 | 57 | openMap() { 58 | const url = `http://maps.apple.com/?ll=${mapRegion.latitude},${mapRegion.longitude}`; 59 | 60 | attemptToOpenUrl(url); 61 | } 62 | openThinkmill() { 63 | const url = 'https://www.thinkmill.com.au'; 64 | 65 | attemptToOpenUrl(url); 66 | } 67 | 68 | openRepository() { 69 | const url = 'https://github.com/Thinkmill/react-conf-2017'; 70 | attemptToOpenUrl(url); 71 | } 72 | 73 | render() { 74 | const { navigator, organisers } = this.props; 75 | const { modalIsOpen } = this.state; 76 | 77 | return ( 78 | 79 | 84 | 85 | 86 | 92 | 93 | 94 | 95 | 96 | 97 | The conference will be taking place on March 13th and 14th, with talks from 10am to 6pm each day. Plan to hang out with us each evening for plenty of socializing over food and drink. 98 | 99 | 100 | Proceeds from all ticket sales are being donated to Code2040. 101 | 102 | 103 | 104 | Code of Conduct 105 | 106 | 107 | 108 | 109 | 110 | {organisers.map((organiser, idx) => { 111 | const onPress = () => {}; 112 | 113 | return ( 114 | 121 | ); 122 | })} 123 | 124 | 125 | 130 | 134 | {/* Made by Thinkmill */} 135 | 136 | 137 | This app made with love in Sydney, Australia and open sourced by Thinkmill 138 | 139 | 143 | 144 | View Source Code 145 | 146 | 147 | 148 | 149 | 150 | 151 | {!!modalIsOpen && } 152 | 153 | ); 154 | } 155 | } 156 | 157 | const styles = StyleSheet.create({ 158 | map: { 159 | flex: 1, 160 | height: 200, 161 | maxHeight: 200, 162 | }, 163 | // hero 164 | hero: { 165 | alignItems: 'center', 166 | backgroundColor: 'white', 167 | borderBottomColor: theme.color.gray20, 168 | borderBottomWidth: 1 / PixelRatio.get(), 169 | borderTopColor: theme.color.gray30, 170 | borderTopWidth: 1 / PixelRatio.get(), 171 | paddingHorizontal: theme.fontSize.default, 172 | }, 173 | heroText: { 174 | paddingTop: theme.fontSize.xlarge, 175 | fontSize: theme.fontSize.default, 176 | fontWeight: '300', 177 | lineHeight: theme.fontSize.large, 178 | textAlign: 'center', 179 | }, 180 | heroLink: { 181 | color: theme.color.blue, 182 | fontSize: theme.fontSize.default, 183 | fontWeight: '500', 184 | padding: theme.fontSize.large, 185 | }, 186 | 187 | // made by thinkmill 188 | madeby: { 189 | alignItems: 'center', 190 | paddingHorizontal: theme.fontSize.default, 191 | paddingVertical: theme.fontSize.xlarge, 192 | }, 193 | madebyLink: { 194 | alignItems: 'center', 195 | }, 196 | madebyText: { 197 | fontSize: theme.fontSize.default, 198 | fontWeight: '300', 199 | lineHeight: theme.fontSize.large, 200 | marginTop: theme.fontSize.default, 201 | textAlign: 'center', 202 | }, 203 | madebyTitle: { 204 | fontWeight: '500', 205 | }, 206 | }); 207 | -------------------------------------------------------------------------------- /app/scenes/Schedule/components/Break/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { StyleSheet, Text, View } from 'react-native'; 4 | import LinearGradient from 'react-native-linear-gradient'; 5 | 6 | import theme from '../../../../theme'; 7 | import { TalkStatusBar } from '../Talk'; 8 | 9 | const gradientSteps = 14; 10 | const gradientJump = 1.05; 11 | 12 | export default class Break extends Component { 13 | props: { 14 | endTime?: string, 15 | important: boolean, 16 | startTime?: string, 17 | status: 'future' | 'past' | 'present', 18 | title: string, 19 | }; 20 | 21 | render() { 22 | const { important, startTime, status, ...props } = this.props; 23 | const title = this.props.title || 'Break'; 24 | 25 | return ( 26 | 27 | 28 | {important 29 | ? 30 | 31 | {startTime} — 32 | 33 | {' '}{title} 34 | 35 | 36 | 37 | : 44 | 45 | {startTime} — {title} 46 | 47 | } 48 | 49 | ); 50 | } 51 | } 52 | 53 | function generateGradientLocations(steps) { 54 | let locations = []; 55 | 56 | const smallWidth = 0.005; 57 | 58 | for (let i = 0; i < steps; i++) { 59 | const start = gradientJump / steps * i; 60 | const end = gradientJump / steps * (i + 1); 61 | 62 | locations.push(start); // big start 63 | locations.push(end - smallWidth); // big end 64 | locations.push(end - smallWidth); // small start 65 | locations.push(end); // small end 66 | } 67 | 68 | return locations; 69 | } 70 | function generateGradientColors(steps) { 71 | const { gray10 } = theme.color; 72 | let colors = []; 73 | 74 | for (let i = 0; i < steps; i++) { 75 | colors.push('white'); 76 | colors.push('white'); 77 | colors.push(gray10); 78 | colors.push(gray10); 79 | } 80 | 81 | return colors; 82 | } 83 | 84 | const styles = StyleSheet.create({ 85 | base: { 86 | alignItems: 'stretch', 87 | backgroundColor: 'white', 88 | flexDirection: 'row', 89 | }, 90 | gradient: { 91 | alignItems: 'center', 92 | backgroundColor: 'white', 93 | flexGrow: 1, 94 | height: 44, 95 | left: theme.fontSize.default, 96 | justifyContent: 'center', 97 | }, 98 | text: { 99 | backgroundColor: 'transparent', 100 | color: theme.color.text, 101 | fontSize: theme.fontSize.small, 102 | fontWeight: '300', 103 | left: -theme.fontSize.default, 104 | }, 105 | text__past: { 106 | color: theme.color.gray40, 107 | }, 108 | importantText: { 109 | color: theme.color.blue, 110 | }, 111 | }); 112 | -------------------------------------------------------------------------------- /app/scenes/Schedule/components/NowButton/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { 4 | Animated, 5 | StyleSheet, 6 | Text, 7 | TouchableWithoutFeedback, 8 | } from 'react-native'; 9 | import LinearGradient from 'react-native-linear-gradient'; 10 | 11 | import theme from '../../../../theme'; 12 | import { lighten, darken } from '../../../../utils/color'; 13 | 14 | export default class NowButton extends Component { 15 | props: { 16 | onPress: () => mixed, 17 | }; 18 | 19 | state = { 20 | animValue: new Animated.Value(0), 21 | }; 22 | 23 | springToValue(val: number) { 24 | Animated.spring(this.state.animValue, { 25 | toValue: val, 26 | friction: 3, 27 | tension: 50, 28 | }).start(); 29 | } 30 | render() { 31 | const { onPress } = this.props; 32 | const { animValue } = this.state; 33 | const { blue } = theme.color; 34 | 35 | const gradientColors = [lighten(blue, 6), darken(blue, 6)]; 36 | const touchableProps = { 37 | hitSlop: { 38 | bottom: 20, 39 | left: 10, 40 | right: 10, 41 | top: 10, 42 | }, 43 | onPress, 44 | onPressIn: () => this.springToValue(1), 45 | onPressOut: () => this.springToValue(0), 46 | }; 47 | const dynamicStyles = { 48 | transform: [ 49 | { 50 | scale: animValue.interpolate({ 51 | inputRange: [0, 1], 52 | outputRange: [1, 0.9], 53 | }), 54 | }, 55 | ], 56 | }; 57 | 58 | return ( 59 | 63 | 64 | 65 | NOW 66 | 67 | 68 | 69 | ); 70 | } 71 | } 72 | 73 | const styles = StyleSheet.create({ 74 | layout: { 75 | alignItems: 'center', 76 | bottom: 0, 77 | left: 0, 78 | paddingBottom: 20, 79 | position: 'absolute', 80 | right: 0, 81 | }, 82 | button: { 83 | backgroundColor: theme.color.blue, 84 | borderRadius: 40, 85 | height: 40, 86 | justifyContent: 'center', 87 | paddingHorizontal: 32, 88 | shadowColor: 'black', 89 | shadowOffset: { height: 1, width: 0 }, 90 | shadowOpacity: 0.24, 91 | shadowRadius: 2, 92 | }, 93 | text: { 94 | backgroundColor: 'transparent', 95 | color: 'white', 96 | fontWeight: 'bold', 97 | }, 98 | }); 99 | -------------------------------------------------------------------------------- /app/scenes/Schedule/components/SplashScreen/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { 4 | Animated, 5 | Dimensions, 6 | Image, 7 | StyleSheet, 8 | TouchableHighlight, 9 | View, 10 | } from 'react-native'; 11 | 12 | import theme from '../../../../theme'; 13 | 14 | const windowHeight = Dimensions.get('window').height; 15 | const SLIDE_DURATION = 800; 16 | const SLIDE_FINAL_HEIGHT = 400; 17 | 18 | const SKEW_DELAY = 3000; 19 | const SKEW_DURATION = 2000; 20 | const SKEW_UP = -3; 21 | const SKEW_DOWN = 5; 22 | 23 | Animated.TouchableHighlight = Animated.createAnimatedComponent( 24 | TouchableHighlight 25 | ); 26 | 27 | export default class SplashScreen extends Component { 28 | props: { 29 | onAnimationComplete?: () => mixed, 30 | onLogoPress?: () => mixed, 31 | }; 32 | 33 | state = { 34 | animationComplete: false, 35 | height: new Animated.Value(windowHeight + SLIDE_FINAL_HEIGHT), 36 | logoOffset: new Animated.Value(0), 37 | logoScale: new Animated.Value(1), 38 | leftTriangleSkew: new Animated.Value(SKEW_DOWN), 39 | rightTriangleSkew: new Animated.Value(SKEW_UP), 40 | }; 41 | 42 | skewed = false; 43 | 44 | componentDidMount() { 45 | const animateTo = toValue => { 46 | return { 47 | delay: 1000, 48 | duration: SLIDE_DURATION, 49 | toValue, 50 | }; 51 | }; 52 | 53 | Animated.parallel([ 54 | Animated.timing(this.state.logoOffset, animateTo(80)), 55 | Animated.timing(this.state.logoScale, animateTo(0.8)), 56 | Animated.timing( 57 | this.state.height, 58 | animateTo(SLIDE_FINAL_HEIGHT + theme.navbar.height) 59 | ), 60 | ]).start(() => { 61 | if (this.props.onAnimationComplete) { 62 | this.props.onAnimationComplete(); 63 | } 64 | this.setState({ animationComplete: true }); 65 | this.queueIdleAnimation(); 66 | }); 67 | } 68 | 69 | componentDidUpdate() { 70 | const { animationComplete, logoOffset, logoScale } = this.state; 71 | 72 | if (animationComplete) { 73 | logoOffset.setValue(80); 74 | logoScale.setValue(0.8); 75 | } 76 | } 77 | 78 | queueIdleAnimation = () => { 79 | const { leftTriangleSkew, rightTriangleSkew } = this.state; 80 | 81 | const animateTo = toValue => { 82 | return { 83 | duration: SKEW_DURATION, 84 | toValue, 85 | }; 86 | }; 87 | 88 | const leftSkew = this.skewed ? SKEW_UP : SKEW_DOWN; 89 | const rightSkew = this.skewed ? SKEW_DOWN : SKEW_UP; 90 | 91 | // Toggle for next time 92 | this.skewed = !this.skewed; 93 | 94 | Animated.parallel([ 95 | // -------- Left Triangle -------- 96 | Animated.timing(leftTriangleSkew, animateTo(leftSkew)), 97 | Animated.timing(rightTriangleSkew, animateTo(rightSkew)), 98 | ]).start(() => { 99 | setTimeout(() => this.queueIdleAnimation(), SKEW_DELAY); 100 | }); 101 | }; 102 | 103 | render() { 104 | const { 105 | animationComplete, 106 | height, 107 | logoOffset, 108 | logoScale, 109 | leftTriangleSkew, 110 | rightTriangleSkew, 111 | } = this.state; 112 | 113 | // Map to string values for transform. 114 | const interpolateToString = value => { 115 | return value.interpolate({ 116 | inputRange: [-360, 360], 117 | outputRange: ['-360deg', '360deg'], 118 | }); 119 | }; 120 | 121 | return ( 122 | 123 | {/* The actual splash screen */} 124 | 125 | { 128 | if (this.props.onLogoPress) this.props.onLogoPress(); 129 | }} 130 | style={{ 131 | transform: [{ translateY: logoOffset }, { scale: logoScale }], 132 | zIndex: 2, 133 | }} 134 | > 135 | 136 | 137 | 145 | 156 | 157 | 158 | ); 159 | } 160 | } 161 | 162 | const styles = StyleSheet.create({ 163 | wrapper: { 164 | zIndex: 2, 165 | }, 166 | 167 | splash: { 168 | position: 'absolute', 169 | alignItems: 'center', 170 | justifyContent: 'center', 171 | top: -200, 172 | left: 0, 173 | right: 0, 174 | }, 175 | 176 | bottomTriangle: { 177 | position: 'absolute', 178 | backgroundColor: 'rgba(36, 31, 32, 0.6)', 179 | bottom: 40, 180 | height: 1200, 181 | left: -100, 182 | right: -100, 183 | shadowColor: 'black', 184 | shadowOffset: { 185 | width: 10, 186 | height: 15, 187 | }, 188 | shadowOpacity: 0.6, 189 | shadowRadius: 10, 190 | }, 191 | }); 192 | -------------------------------------------------------------------------------- /app/scenes/Schedule/images/splash-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/app/scenes/Schedule/images/splash-logo.png -------------------------------------------------------------------------------- /app/scenes/Schedule/images/splash-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cem2ran/react-conf-app/a7d8459a9944f08b74ff75696ffb8ce817503b90/app/scenes/Schedule/images/splash-logo@2x.png -------------------------------------------------------------------------------- /app/scenes/Talk/components/Hint/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { Animated, Dimensions, Easing } from 'react-native'; 4 | import Icon from 'react-native-vector-icons/Ionicons'; 5 | import LinearGradient from 'react-native-linear-gradient'; 6 | 7 | const Gradient = Animated.createAnimatedComponent(LinearGradient); 8 | 9 | import theme from '../../../../theme'; 10 | import { fade } from '../../../../utils/color'; 11 | 12 | const animationDefault = val => ({ 13 | toValue: val, 14 | duration: 550, 15 | easing: Easing.inOut(Easing.quad), 16 | }); 17 | 18 | export default class Hint extends Component { 19 | props: { 20 | onClose: () => mixed, 21 | }; 22 | 23 | state = { 24 | arrowVal: new Animated.Value(0), 25 | containerVal: new Animated.Value(1), 26 | }; 27 | 28 | _isMounted = false; 29 | 30 | componentDidMount() { 31 | this._isMounted = true; 32 | const { arrowVal, containerVal } = this.state; 33 | const sequence = []; 34 | const count = 5; 35 | 36 | for (let i = 0; i <= count; i++) { 37 | if (i === count) { 38 | sequence.push(Animated.timing(arrowVal, animationDefault(2))); 39 | } else if (i % 2) { 40 | sequence.push(Animated.timing(arrowVal, animationDefault(0))); 41 | } else { 42 | sequence.push(Animated.timing(arrowVal, animationDefault(1))); 43 | } 44 | } 45 | 46 | Animated.sequence(sequence).start(() => Animated.timing(containerVal, { 47 | toValue: 0, 48 | duration: 220, 49 | easing: Easing.in(Easing.quad), 50 | }).start(() => { 51 | if (this._isMounted) this.props.onClose(); 52 | })); 53 | } 54 | componentWillUnmount() { 55 | this._isMounted = false; 56 | } 57 | render() { 58 | const { arrowVal, containerVal } = this.state; 59 | const arrowStyle = { 60 | opacity: arrowVal.interpolate({ 61 | inputRange: [0, 1, 2], 62 | outputRange: [0.2, 1, 0], 63 | }), 64 | transform: [ 65 | { 66 | translateY: arrowVal.interpolate({ 67 | inputRange: [0, 1, 2], 68 | outputRange: [0, -12, 24], 69 | }), 70 | }, 71 | ], 72 | }; 73 | const containerStyle = { 74 | alignItems: 'center', 75 | backgroundColor: 'transparent', 76 | bottom: 0, 77 | left: 0, 78 | height: 80, 79 | justifyContent: 'flex-end', 80 | opacity: containerVal, 81 | paddingBottom: 10, 82 | position: 'absolute', 83 | width: Dimensions.get('window').width, 84 | }; 85 | 86 | const gradientColors = [fade(theme.color.sceneBg, 10), theme.color.sceneBg]; 87 | 88 | return ( 89 | 95 | 96 | 97 | 98 | 99 | ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /app/scenes/Talk/components/Pane/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { 4 | Animated, 5 | PixelRatio, 6 | ScrollView, 7 | StyleSheet, 8 | Text, 9 | TouchableOpacity, 10 | View, 11 | } from 'react-native'; 12 | import moment from 'moment'; 13 | 14 | import type { ScheduleTalk } from '../../../../types'; 15 | 16 | import { TIME_FORMAT } from '../../../../constants'; 17 | import theme from '../../../../theme'; 18 | import Avatar from '../../../../components/Avatar'; 19 | 20 | import Preview from '../Preview'; 21 | 22 | export default class TalkPane extends Component { 23 | props: { 24 | nextTalk?: ScheduleTalk | null, 25 | nextTalkPreviewIsEngaged?: boolean, 26 | onHeroLayout?: (Object) => mixed, 27 | onScroll?: (Object) => mixed, 28 | onScrollEndDrag?: () => mixed, 29 | prevTalk?: ScheduleTalk | null, 30 | prevTalkPreviewIsEngaged?: boolean, 31 | showSpeakerModal?: () => mixed, 32 | visibleTalk: ScheduleTalk, 33 | }; 34 | 35 | render() { 36 | const { 37 | nextTalk, 38 | nextTalkPreviewIsEngaged, 39 | onHeroLayout, 40 | prevTalk, 41 | prevTalkPreviewIsEngaged, 42 | showSpeakerModal, 43 | visibleTalk, 44 | ...props 45 | } = this.props; 46 | 47 | const touchableProps = { 48 | activeOpacity: 0.66, 49 | onPress: showSpeakerModal, 50 | }; 51 | 52 | return ( 53 | 59 | {!!prevTalk && 60 | 61 | 69 | } 70 | 71 | 72 | 73 | 74 | 75 | {visibleTalk.speaker.name} 76 | 77 | 78 | (tap for more) 79 | 80 | 81 | 82 | 83 | {visibleTalk.title} 84 | 85 | 86 | 87 | 88 | 89 | {visibleTalk.summary} 90 | 91 | 92 | 93 | {!!nextTalk && 94 | 95 | 103 | } 104 | 105 | ); 106 | } 107 | } 108 | 109 | const styles = StyleSheet.create({ 110 | hero: { 111 | alignItems: 'center', 112 | backgroundColor: 'white', 113 | borderBottomColor: theme.color.gray20, 114 | borderBottomWidth: 1 / PixelRatio.get(), 115 | borderTopColor: theme.color.gray20, 116 | borderTopWidth: 1 / PixelRatio.get(), 117 | marginTop: -(1 / PixelRatio.get()), 118 | paddingHorizontal: theme.fontSize.large, 119 | paddingBottom: theme.fontSize.xlarge, 120 | }, 121 | heroSpeaker: { 122 | alignItems: 'center', 123 | paddingHorizontal: theme.fontSize.xlarge, 124 | paddingTop: theme.fontSize.xlarge, 125 | }, 126 | heroSpeakerHint: { 127 | color: theme.color.gray40, 128 | fontSize: theme.fontSize.xsmall, 129 | paddingBottom: theme.fontSize.large, 130 | }, 131 | heroSpeakerName: { 132 | color: theme.color.blue, 133 | fontSize: theme.fontSize.default, 134 | fontWeight: '500', 135 | marginTop: theme.fontSize.small, 136 | }, 137 | heroTitle: { 138 | fontSize: theme.fontSize.large, 139 | fontWeight: '300', 140 | textAlign: 'center', 141 | }, 142 | 143 | // summary 144 | summary: { 145 | paddingBottom: 40, 146 | }, 147 | summaryText: { 148 | fontSize: theme.fontSize.default, 149 | fontWeight: '300', 150 | lineHeight: theme.fontSize.large, 151 | padding: theme.fontSize.large, 152 | }, 153 | }); 154 | -------------------------------------------------------------------------------- /app/scenes/Talk/components/Preview/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { Animated, Dimensions, StyleSheet, Text, View } from 'react-native'; 4 | import Icon from 'react-native-vector-icons/Ionicons'; 5 | 6 | import theme from '../../../../theme'; 7 | 8 | type Props = { 9 | isActive?: boolean, 10 | position: 'top' | 'bottom', 11 | subtitle: string, 12 | title: string, 13 | }; 14 | 15 | const ICON_VARIANT = { 16 | bottom: 'ios-arrow-up', 17 | top: 'ios-arrow-down', 18 | }; 19 | 20 | const animateToValue = val => ({ 21 | toValue: val, 22 | duration: 150, 23 | }); 24 | 25 | export default class Preview extends Component { 26 | props: Props; 27 | 28 | state = { 29 | animValue: new Animated.Value(0), 30 | }; 31 | 32 | componentWillReceiveProps(nextProps: Props) { 33 | if (!this.props.isActive && nextProps.isActive) { 34 | this.tada(); 35 | } 36 | } 37 | 38 | tada() { 39 | const { animValue } = this.state; 40 | 41 | Animated.timing(animValue, animateToValue(1)).start(() => { 42 | Animated.timing(animValue, animateToValue(0)).start(); 43 | }); 44 | } 45 | render() { 46 | const { 47 | position, 48 | subtitle, 49 | title, 50 | } = this.props; 51 | const { animValue } = this.state; 52 | 53 | let baseStyles; 54 | 55 | if (position === 'bottom') { 56 | baseStyles = { 57 | bottom: -theme.nextup.height, 58 | }; 59 | } else { 60 | baseStyles = { 61 | top: -theme.nextup.height, 62 | }; 63 | } 64 | 65 | const icon = ( 66 | 79 | 84 | 85 | ); 86 | 87 | return ( 88 | 89 | {position === 'bottom' && icon} 90 | 91 | {title} 92 | 93 | 94 | {subtitle} 95 | 96 | {position === 'top' && icon} 97 | 98 | ); 99 | } 100 | } 101 | 102 | const styles = StyleSheet.create({ 103 | base: { 104 | alignItems: 'center', 105 | justifyContent: 'center', 106 | height: theme.nextup.height, 107 | paddingHorizontal: 60, 108 | position: 'absolute', 109 | left: 0, 110 | width: Dimensions.get('window').width, 111 | }, 112 | title: { 113 | textAlign: 'center', 114 | }, 115 | subtitle: { 116 | color: theme.color.gray60, 117 | textAlign: 'center', 118 | }, 119 | }); 120 | -------------------------------------------------------------------------------- /app/scenes/Talk/components/Speaker/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { 4 | PixelRatio, 5 | StyleSheet, 6 | Text, 7 | TouchableHighlight, 8 | TouchableOpacity, 9 | View, 10 | } from 'react-native'; 11 | import Icon from 'react-native-vector-icons/Ionicons'; 12 | 13 | import Avatar from '../../../../components/Avatar'; 14 | import DraggableView from '../../../../components/DraggableView'; 15 | import Modal from '../../../../components/Modal'; 16 | import theme from '../../../../theme'; 17 | import { attemptToOpenUrl } from '../../../../utils'; 18 | 19 | type ButtonProps = { 20 | bordered?: boolean, 21 | icon: string, 22 | onPress: () => mixed, 23 | text: string, 24 | }; 25 | 26 | function Button({ bordered, icon, onPress, text }: ButtonProps) { 27 | const touchableProps = { 28 | activeOpacity: 1, 29 | onPress: onPress, 30 | style: styles.buttonTouchable, 31 | underlayColor: theme.color.gray05, 32 | }; 33 | 34 | const dynamicStyles = { 35 | borderLeftColor: bordered ? theme.color.gray20 : null, 36 | borderLeftWidth: bordered ? 1 / PixelRatio.get() : null, 37 | }; 38 | 39 | return ( 40 | 41 | 42 | 43 | {text} 44 | 45 | 46 | ); 47 | } 48 | 49 | export default class Speaker extends Component { 50 | props: { 51 | avatar: string, 52 | github?: string, 53 | name: string, 54 | onClose: () => mixed, 55 | summary: string, 56 | twitter?: string, 57 | }; 58 | 59 | static defaultProps = { 60 | onPress() {}, 61 | }; 62 | 63 | handleClose = () => { 64 | this.refs.modal.onClose(); 65 | }; 66 | render() { 67 | const { 68 | avatar, 69 | github, 70 | name, 71 | onClose, 72 | summary, 73 | twitter, 74 | } = this.props; 75 | const showButtons = !!(github || twitter); 76 | 77 | // @jossmac Re: DraggableView - onRelease() 78 | // This is a bit janky but I like the Modal reuse, amenable to refactor 79 | 80 | return ( 81 | 82 | 87 | 88 | 89 | {name} 90 | {summary} 91 | 104 | 105 | 106 | 107 | {showButtons && 108 | 109 | {!!twitter && 110 |