From 9e091a8b5a22348178713b0f83595fc011644666 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 20 Jul 2017 01:10:23 -0400 Subject: [PATCH 01/25] Added react-native-cli to avoid onboarding issues in the future --- package.json | 5 +- yarn.lock | 134 +++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 117 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 9c54cc520..d03d64c48 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "babel-eslint": "^7.1.1", "babel-jest": "18.0.0", "babel-plugin-module-resolver": "^2.7.1", + "babel-plugin-transform-inline-environment-variables": "^6.8.0", "babel-preset-flow": "^6.23.0", "babel-preset-react-native": "1.9.1", "eslint": "^3.19.0", @@ -79,8 +80,8 @@ "lint-staged": "^3.2.6", "pre-commit": "^1.2.2", "prettier": "^1.3.1", - "react-test-renderer": "16.0.0-alpha.6", - "babel-plugin-transform-inline-environment-variables": "^6.8.0" + "react-native-cli": "^2.0.1", + "react-test-renderer": "16.0.0-alpha.6" }, "jest": { "preset": "react-native" diff --git a/yarn.lock b/yarn.lock index 854fbed01..a189348e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -243,6 +243,10 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" +async@0.2.x, async@~0.2.6, async@~0.2.9: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -253,10 +257,6 @@ async@^2.0.0-rc.1, async@^2.1.4, async@^2.4.0: dependencies: lodash "^4.14.0" -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1361,6 +1361,10 @@ color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" +colors@0.6.x: + version "0.6.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc" + colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -1577,6 +1581,10 @@ csurf@~1.8.3: csrf "~3.0.0" http-errors "~1.3.1" +cycle@1.0.x: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" + d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" @@ -1601,11 +1609,11 @@ dateformat@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" -debug@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" +debug@2.6.8, debug@^2.6.3, debug@^2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: - ms "0.7.2" + ms "2.0.0" debug@^2.1.1, debug@^2.2.0: version "2.6.0" @@ -1613,12 +1621,6 @@ debug@^2.1.1, debug@^2.2.0: dependencies: ms "0.7.2" -debug@^2.6.8: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - debug@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" @@ -1633,6 +1635,10 @@ deep-diff@0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/deep-diff/-/deep-diff-0.3.4.tgz#aac5c39952236abe5f037a2349060ba01b00ae48" +deep-equal@*: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + deep-extend@~0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" @@ -2149,6 +2155,10 @@ extsprintf@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +eyes@0.1.x: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + fancy-log@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" @@ -2618,6 +2628,10 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" +i@0.3.x: + version "0.3.5" + resolved "https://registry.yarnpkg.com/i/-/i-0.3.5.tgz#1d2b854158ec8169113c6cb7f6b6801e99e211d5" + iconv-lite@0.4.11: version "0.4.11" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.11.tgz#2ecb42fd294744922209a2e7c404dac8793d8ade" @@ -2902,7 +2916,7 @@ isomorphic-fetch@^2.1.1: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" -isstream@~0.1.2: +isstream@0.1.x, isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -3756,7 +3770,7 @@ minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@0.x.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -3805,7 +3819,7 @@ mute-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" -mute-stream@0.0.7: +mute-stream@0.0.7, mute-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -3817,6 +3831,10 @@ natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" +ncp@0.4.x: + version "0.4.2" + resolved "https://registry.yarnpkg.com/ncp/-/ncp-0.4.2.tgz#abcc6cbd3ec2ed2a729ff6e7c1fa8f01784a8574" + negotiator@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.5.3.tgz#269d5c476810ec92edbe7b6c2f28316384f9a7e8" @@ -4184,6 +4202,14 @@ pkg-up@^1.0.0: dependencies: find-up "^1.0.0" +pkginfo@0.3.x: + version "0.3.1" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21" + +pkginfo@0.x.x: + version "0.4.0" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.0.tgz#349dbb7ffd38081fcadc0853df687f0c7744cd65" + plist@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/plist/-/plist-2.0.1.tgz#0a32ca9481b1c364e92e18dc55c876de9d01da8b" @@ -4257,6 +4283,16 @@ promise@^7.1.1: dependencies: asap "~2.0.3" +prompt@^0.2.14: + version "0.2.14" + resolved "https://registry.yarnpkg.com/prompt/-/prompt-0.2.14.tgz#57754f64f543fd7b0845707c818ece618f05ffdc" + dependencies: + pkginfo "0.x.x" + read "1.0.x" + revalidator "0.1.x" + utile "0.2.x" + winston "0.8.x" + prop-types@^15.5.10, prop-types@^15.5.6, prop-types@^15.5.8: version "15.5.10" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" @@ -4342,6 +4378,15 @@ react-native-actionsheet@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/react-native-actionsheet/-/react-native-actionsheet-2.2.0.tgz#3783ad2c8d1ba116908ab8e169399adc486cc89e" +react-native-cli@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/react-native-cli/-/react-native-cli-2.0.1.tgz#f2cd3c7aa1b83828cdfba630e2dfd817df766d54" + dependencies: + chalk "^1.1.1" + minimist "^1.2.0" + prompt "^0.2.14" + semver "^5.0.3" + react-native-communications@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/react-native-communications/-/react-native-communications-2.2.1.tgz#7883b56b20a002eeb790c113f8616ea8692ca795" @@ -4628,9 +4673,27 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6: +read@1.0.x: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + dependencies: + mute-stream "~0.0.4" + +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6: version "2.2.11" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.11.tgz#0796b31f8d7688007ff0b93a8088d34aa17c0f72" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "~5.0.1" + string_decoder "~1.0.0" + util-deprecate "~1.0.1" + +readable-stream@^2.0.6: + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -4865,13 +4928,17 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +revalidator@0.1.x: + version "0.1.8" + resolved "https://registry.yarnpkg.com/revalidator/-/revalidator-0.1.8.tgz#fece61bfa0c1b52a206bd6b18198184bdd523a3b" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: +rimraf@2, rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -5144,6 +5211,10 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + stacktrace-parser@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.4.tgz#01397922e5f62ecf30845522c95c4fe1d25e7d4e" @@ -5201,7 +5272,7 @@ string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" -string_decoder@~1.0.3: +string_decoder@~1.0.0, string_decoder@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: @@ -5459,6 +5530,17 @@ util-deprecate@1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +utile@0.2.x: + version "0.2.1" + resolved "https://registry.yarnpkg.com/utile/-/utile-0.2.1.tgz#930c88e99098d6220834c356cbd9a770522d90d7" + dependencies: + async "~0.2.9" + deep-equal "*" + i "0.3.x" + mkdirp "0.x.x" + ncp "0.4.x" + rimraf "2.x.x" + utils-merge@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" @@ -5569,6 +5651,18 @@ window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" +winston@0.8.x: + version "0.8.3" + resolved "https://registry.yarnpkg.com/winston/-/winston-0.8.3.tgz#64b6abf4cd01adcaefd5009393b1d8e8bec19db0" + dependencies: + async "0.2.x" + colors "0.6.x" + cycle "1.0.x" + eyes "0.1.x" + isstream "0.1.x" + pkginfo "0.3.x" + stack-trace "0.0.x" + wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" From f52e2f674ed5db8f5df9046b3414970f2b489250 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 20 Jul 2017 01:14:03 -0400 Subject: [PATCH 02/25] Pull down to refresh implemented in profile page --- src/auth/screens/auth-profile.screen.js | 163 +++++++++++++----------- 1 file changed, 89 insertions(+), 74 deletions(-) diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index 8b1cd3ef3..c2b6be7b7 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { StyleSheet } from 'react-native'; +import { StyleSheet, ScrollView, RefreshControl } from 'react-native'; import { ListItem } from 'react-native-elements'; import Communications from 'react-native-communications'; @@ -60,90 +60,105 @@ class AuthProfile extends Component { return url.substr(0, prefix.length) === prefix ? url : `http://${url}`; }; + refreshProfile = () => { + this.props.getUser(); + this.props.getOrgs(); + }; + render() { const { user, orgs, isPendingUser, isPendingOrgs, navigation } = this.props; const loading = isPendingUser || isPendingOrgs; return ( - {loading && } - - {!loading && - - } - stickyTitle={user.login} - > - {user.bio && - user.bio !== '' && - + + } + > + {loading && } + + {!loading && + + } + stickyTitle={user.login} + > + {user.bio && + user.bio !== '' && + + + } + + + Communications.email([user.email], null, null, 'Hi!', '')} + underlayColor={colors.greyLight} /> - } + - - - Communications.email([user.email], null, null, 'Hi!', '')} - underlayColor={colors.greyLight} - /> - - - - Communications.web(this.getUserBlog(user.blog))} - underlayColor={colors.greyLight} - /> - - - - {orgs.map(item => - + + Communications.web(this.getUserBlog(user.blog))} + underlayColor={colors.greyLight} /> - )} - - } + + + + {orgs.map(item => + + )} + + } + ); } From 90c8d76b15b160d2bb4bccf60d77f7df86e9f888 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 20 Jul 2017 01:14:38 -0400 Subject: [PATCH 03/25] Pull down to refresh implemented in Repository page. Closes #103. --- src/repository/screens/repository.screen.js | 315 +++++++++++--------- 1 file changed, 170 insertions(+), 145 deletions(-) diff --git a/src/repository/screens/repository.screen.js b/src/repository/screens/repository.screen.js index 95ae9e2df..1aaffc248 100644 --- a/src/repository/screens/repository.screen.js +++ b/src/repository/screens/repository.screen.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { StyleSheet } from 'react-native'; +import { StyleSheet, ScrollView, RefreshControl } from 'react-native'; import { ListItem } from 'react-native-elements'; import ActionSheet from 'react-native-actionsheet'; @@ -117,6 +117,14 @@ class Repository extends Component { } }; + refreshRepo = () => { + const { navigation } = this.props; + const repo = navigation.state.params.repository; + const repoUrl = navigation.state.params.repositoryUrl; + + this.props.getRepositoryInfoByDispatch(repo ? repo.url : repoUrl); + }; + render() { const { repository, @@ -151,160 +159,177 @@ class Repository extends Component { return ( {loader} + + } + > + { + if (isPendingRepository && !initalRepository) { + return ; + } - { - if (isPendingRepository && !initalRepository) { - return ; - } + return ( + + ); + }} + stickyTitle={repository.name} + showMenu={!isPendingRepository && !isPendingCheckStarred} + menuAction={() => this.showMenuActionSheet()} + navigation={navigation} + navigateBack + > + {initalRepository && + !initalRepository.owner && + isPendingRepository && + + + } - return ( - - ); - }} - stickyTitle={repository.name} - showMenu={!isPendingRepository && !isPendingCheckStarred} - menuAction={() => this.showMenuActionSheet()} - navigation={navigation} - navigateBack - > - {initalRepository && - !initalRepository.owner && - isPendingRepository && - - - } + {!(initalRepository && initalRepository.owner) && + (repository && repository.owner) && + !isPendingRepository && + + + } - {!(initalRepository && initalRepository.owner) && - (repository && repository.owner) && - !isPendingRepository && - - - } + {initalRepository && + initalRepository.owner && + + + } - {initalRepository && - initalRepository.owner && - - - } + {isPendingContributors && + } - {isPendingContributors && } + {!isPendingContributors && + } - {!isPendingContributors && - } + + + navigation.navigate('ReadMe', { + repository, + })} + underlayColor={colors.greyLight} + /> + + navigation.navigate('RepositoryCodeList', { + topLevel: true, + })} + underlayColor={colors.greyLight} + /> + - - - navigation.navigate('ReadMe', { - repository, - })} - underlayColor={colors.greyLight} - /> - - navigation.navigate('RepositoryCodeList', { - topLevel: true, + issue.state === 'open').length === 0 + } + noItemsMessage={ + pureIssues.length === 0 ? 'No issues' : 'No open issues' + } + showButton={pureIssues.length > 0} + buttonTitle="View All" + buttonAction={() => + navigation.navigate('IssueList', { + type: 'issue', + issues: pureIssues, })} - underlayColor={colors.greyLight} - /> - + > + {pureIssues + .filter(issue => issue.state === 'open') + .slice(0, 3) + .map(item => + + )} + - issue.state === 'open').length === 0 - } - noItemsMessage={ - pureIssues.length === 0 ? 'No issues' : 'No open issues' - } - showButton={pureIssues.length > 0} - buttonTitle="View All" - buttonAction={() => - navigation.navigate('IssueList', { - type: 'issue', - issues: pureIssues, - })} - > - {pureIssues - .filter(issue => issue.state === 'open') - .slice(0, 3) - .map(item => - - )} - - - issue.state === 'open').length === 0} - noItemsMessage={ - pulls.length === 0 ? 'No pull requests' : 'No open pull requests' - } - showButton={pulls.length > 0} - buttonTitle="View All" - buttonAction={() => - navigation.navigate('PullList', { - type: 'pull', - issues: pulls, - })} - > - {pulls - .filter(issue => issue.state === 'open') - .slice(0, 3) - .map(item => - - )} - - + issue.state === 'open').length === 0 + } + noItemsMessage={ + pulls.length === 0 + ? 'No pull requests' + : 'No open pull requests' + } + showButton={pulls.length > 0} + buttonTitle="View All" + buttonAction={() => + navigation.navigate('PullList', { + type: 'pull', + issues: pulls, + })} + > + {pulls + .filter(issue => issue.state === 'open') + .slice(0, 3) + .map(item => + + )} + + - { - this.ActionSheet = o; - }} - title="Repository Actions" - options={[...repositoryActions, 'Cancel']} - cancelButtonIndex={repositoryActions.length} - onPress={this.handlePress} - /> + { + this.ActionSheet = o; + }} + title="Repository Actions" + options={[...repositoryActions, 'Cancel']} + cancelButtonIndex={repositoryActions.length} + onPress={this.handlePress} + /> + ); } From 5eb2b51d4bdea4d67c9d24beb1eebafdc9bd3217 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 20 Jul 2017 02:08:56 -0400 Subject: [PATCH 04/25] Fixed some merge issues --- src/auth/screens/auth-profile.screen.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index 91ae16fe0..f508ecde0 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -1,6 +1,5 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { StyleSheet, ScrollView, RefreshControl } from 'react-native'; import { StyleSheet, Text, From 870ea3cd0ab373fd00d961c0d14838b67f67939f Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 20 Jul 2017 02:16:27 -0400 Subject: [PATCH 05/25] Fixing some more merging issues --- src/auth/screens/auth-profile.screen.js | 89 ++++++++++--------------- 1 file changed, 35 insertions(+), 54 deletions(-) diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index f508ecde0..52c6e9292 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -6,7 +6,7 @@ import { TouchableOpacity, View, Linking, - ScrollView, + ScrollView, RefreshControl, } from 'react-native'; import { ListItem } from 'react-native-elements'; @@ -156,63 +156,44 @@ class AuthProfile extends Component { /> } + + - - Communications.email([user.email], null, null, 'Hi!', '')} - underlayColor={colors.greyLight} - /> + {orgs.map(item => + + )} + + Can't see all your organizations? You may have to + + Linking.openURL( + 'https://github.com/settings/applications' + )} + > + {' '}request approval{' '} + + for them. + - - - - {orgs.map(item => - - )} - - Can't see all your organizations? You may have to - - Linking.openURL('https://github.com/settings/applications')} - > - {' '}request approval{' '} - - for them. - - - - - GitPoint v1.1 - - - {this.state.updateText} - - - - } + + GitPoint v1.1 + + + {this.state.updateText} + + + + } ); From 9a86228eaea511cd47fb19cd90b57bf8f4f5ea25 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 20 Jul 2017 02:31:16 -0400 Subject: [PATCH 06/25] Forgot to add myself as a contributor. --- .all-contributorsrc | 9 +++++++++ README.md | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 88d20ee8e..5d872628f 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -155,6 +155,15 @@ "contributions": [ "code" ] + }, + { + "login": "SammyIsra", + "name": "Sammy Israwi", + "avatar_url": "https://avatars0.githubusercontent.com/u/8962228?v=4", + "profile": "https://github.com/SammyIsra", + "contributions": [ + "code" + ] } ] } diff --git a/README.md b/README.md index 2e0f87a83..2fb167c5b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Build Status](https://travis-ci.org/gitpoint/git-point.svg?branch=master)](https://travis-ci.org/gitpoint/git-point) -[![All Contributors](https://img.shields.io/badge/all_contributors-16-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/git-point) @@ -69,5 +69,5 @@ Please take a look at the [contributing guidelines](./CONTRIBUTING.md) for a det | [
Houssein Djirdeh](https://houssein.me)
[๐Ÿ’ฌ](#question-housseindjirdeh "Answering Questions") [๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=housseindjirdeh "Code") [๐ŸŽจ](#design-housseindjirdeh "Design") [๐Ÿ“–](https://github.com/gitpoint/git-point/commits?author=housseindjirdeh "Documentation") [๐Ÿ‘€](#review-housseindjirdeh "Reviewed Pull Requests") | [
gejose](https://github.com/gejose)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=gejose "Code") | [
rmevans9](https://github.com/rmevans9)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=rmevans9 "Code") | [
Alexey Pyltsyn](http://lex111.ru)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=lex111 "Code") | [
Jason Etcovitch](https://jasonet.co)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=JasonEtco "Code") | [
Hosmel Quintana](http://hosmelq.com)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=hosmelq "Code") | [
Alejandro ร‘รกรฑez Ortiz](http://co.linkedin.com/in/alejandronanez/)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=alejandronanez "Code") [๐Ÿ‘€](#review-alejandronanez "Reviewed Pull Requests") | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | [
Patrick Wang](https://patw.me)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=patw0929 "Code") | [
Mike Kavouras](https://github.com/mikekavouras)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=mikekavouras "Code") | [
Peter Lazar](https://github.com/peterlazar1993)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=peterlazar1993 "Code") | [
June Domingo](https://github.com/junedomingo)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=junedomingo "Code") | [
Antoine](http://www.jaaccelere.com)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=Antoine38660 "Code") | [
Wang Shidong](https://wsdjeg.github.io)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=wsdjeg "Code") | [
Swapnil Joshi](http://swapnilmj.users.sourceforge.net/)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=swapnilmj "Code") | -| [
Rolf Koenders](https://github.com/RolfKoenders)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=RolfKoenders "Code") | [
Andrew Dassonville](https://andrewda.me)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=andrewda "Code") | +| [
Rolf Koenders](https://github.com/RolfKoenders)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=RolfKoenders "Code") | [
Andrew Dassonville](https://andrewda.me)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=andrewda "Code") | [
Sammy Israwi](https://github.com/SammyIsra)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=SammyIsra "Code") | From 08548e5b26c5f2a37d4f94a18c6cbd467245e4d4 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Fri, 21 Jul 2017 00:03:30 -0400 Subject: [PATCH 07/25] Fetching user data and fetching repository data have been moved into their own functions. --- src/auth/screens/auth-profile.screen.js | 3 +- src/repository/screens/repository.screen.js | 134 ++++++++++---------- 2 files changed, 67 insertions(+), 70 deletions(-) diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index 52c6e9292..de65fe5c2 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -92,8 +92,7 @@ class AuthProfile extends Component { }; componentDidMount() { - this.props.getUser(); - this.props.getOrgs(); + this.refreshProfile(); } checkForUpdate = () => { diff --git a/src/repository/screens/repository.screen.js b/src/repository/screens/repository.screen.js index beab696dc..a4d4876b9 100644 --- a/src/repository/screens/repository.screen.js +++ b/src/repository/screens/repository.screen.js @@ -81,11 +81,7 @@ class Repository extends Component { }; componentDidMount() { - const { navigation } = this.props; - const repo = navigation.state.params.repository; - const repoUrl = navigation.state.params.repositoryUrl; - - this.props.getRepositoryInfoByDispatch(repo ? repo.url : repoUrl); + this.refreshRepo(); } showMenuActionSheet = () => { @@ -293,72 +289,74 @@ class Repository extends Component { /> )} - - } - noItems={openIssues.length === 0} - noItemsMessage={ - pureIssues.length === 0 ? 'No issues' : 'No open issues' - } - showButton={pureIssues.length > 0} - buttonTitle="View All" - buttonAction={() => - navigation.navigate('IssueList', { - type: 'issue', - issues: pureIssues, - })} - > - {openIssues - .slice(0, 3) - .map(item => - - )} - + } + noItems={openIssues.length === 0} + noItemsMessage={ + pureIssues.length === 0 ? 'No issues' : 'No open issues' + } + showButton={pureIssues.length > 0} + buttonTitle="View All" + buttonAction={() => + navigation.navigate('IssueList', { + type: 'issue', + issues: pureIssues, + })} + > + {openIssues + .slice(0, 3) + .map(item => + + )} + - - } - noItems={openPulls.length === 0} - noItemsMessage={ - pulls.length === 0 ? 'No pull requests' : 'No open pull requests' - } - showButton={pulls.length > 0} - buttonTitle="View All" - buttonAction={() => - navigation.navigate('PullList', { - type: 'pull', - issues: pulls, - })} - > - {openPulls - .slice(0, 3) - .map(item => - - )} - - + } + noItems={openPulls.length === 0} + noItemsMessage={ + pulls.length === 0 + ? 'No pull requests' + : 'No open pull requests' + } + showButton={pulls.length > 0} + buttonTitle="View All" + buttonAction={() => + navigation.navigate('PullList', { + type: 'pull', + issues: pulls, + })} + > + {openPulls + .slice(0, 3) + .map(item => + + )} + + { From f308a7b3bdbd1445387d8b60abe0287bfe5beca3 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Sat, 22 Jul 2017 03:21:22 -0400 Subject: [PATCH 08/25] Fixed some merge issues. --- src/auth/screens/auth-profile.screen.js | 95 +++++++++++++++---------- 1 file changed, 58 insertions(+), 37 deletions(-) diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index 7c7745eb9..4cf3c1350 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -4,11 +4,8 @@ import { StyleSheet, Text, TouchableOpacity, - View, - Linking, ScrollView, RefreshControl, - TouchableOpacity, } from 'react-native'; import { ListItem } from 'react-native-elements'; import { NavigationActions } from 'react-navigation'; @@ -122,10 +119,9 @@ class AuthProfile extends Component { } }; - refreshProfile = () => { - this.props.getUser(); - this.props.getOrgs(); + this.props.getUserByDispatch(); + this.props.getOrgsByDispatch(); }; signOutUser() { @@ -169,39 +165,64 @@ class AuthProfile extends Component { initialUser={user} user={user} navigation={navigation} + />} + stickyTitle={user.login} + > + {user.bio && + user.bio !== '' && + + + } + + + + + {orgs.map(item => + + )} + + Can't see all your organizations?{'\n'} + + openURLInView('https://github.com/settings/applications')} + > + You may have to request approval for them. + + + + + + this.signOutUser()} /> - )} - - Can't see all your organizations?{'\n'} - - openURLInView('https://github.com/settings/applications')} - > - You may have to request approval for them. + + + + GitPoint v1.1 + + {this.state.updateText} - - - - - this.signOutUser()} - /> - - - - GitPoint v1.1 - - {this.state.updateText} - - - } + + } ); From 36d8cf7105c058203b445ec0db60f07b6688a82a Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Sat, 22 Jul 2017 03:24:28 -0400 Subject: [PATCH 09/25] Renamed the function that fetches the information to be a bit more descriptive --- src/repository/screens/repository.screen.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/repository/screens/repository.screen.js b/src/repository/screens/repository.screen.js index a4d4876b9..68456f810 100644 --- a/src/repository/screens/repository.screen.js +++ b/src/repository/screens/repository.screen.js @@ -81,7 +81,7 @@ class Repository extends Component { }; componentDidMount() { - this.refreshRepo(); + this.fetchRepoInfo(); } showMenuActionSheet = () => { @@ -114,7 +114,7 @@ class Repository extends Component { } }; - refreshRepo = () => { + fetchRepoInfo = () => { const { navigation } = this.props; const repo = navigation.state.params.repository; const repoUrl = navigation.state.params.repositoryUrl; @@ -166,7 +166,7 @@ class Repository extends Component { refreshControl={ } > From 088dc121387a7036075535145e461d2c1f255412 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Sat, 22 Jul 2017 20:07:19 -0400 Subject: [PATCH 10/25] Again, fixing my own merge issues. Doing it here with code highlight and VSCode yelling at me is easier than on the Github editor. --- package.json | 2 +- src/auth/screens/auth-profile.screen.js | 88 +++++++++++++------------ 2 files changed, 46 insertions(+), 44 deletions(-) diff --git a/package.json b/package.json index f81e1bb95..3d6ddc845 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "pre-commit": "^1.2.2", "prettier": "^1.3.1", "react-native-cli": "^2.0.1", - "react-test-renderer": "16.0.0-alpha.6", + "react-test-renderer": "16.0.0-alpha.6" }, "jest": { "preset": "react-native" diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index 4b615985a..0ee664d98 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -179,51 +179,53 @@ class AuthProfile extends Component { /> } - - - - {orgs.map(item => - + + + {orgs.map(item => + + )} + + Can't see all your organizations?{'\n'} + + openURLInView('https://github.com/settings/applications')} + > + You may have to request approval for them. + + + + + + this.signOutUser()} /> - )} - - Can't see all your organizations?{'\n'} - - openURLInView('https://github.com/settings/applications')} - > - You may have to request approval for them. + + + + GitPoint v{version} + + {this.state.updateText} - - - - - this.signOutUser()} - /> - - - - GitPoint v{version} - - {this.state.updateText} - - - } + + + } + ); } From 7c1112047290727862513d43f680fc9e54b1024f Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Mon, 24 Jul 2017 01:26:54 -0400 Subject: [PATCH 11/25] Fixed some merge issues, _again_ --- src/repository/screens/repository.screen.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/repository/screens/repository.screen.js b/src/repository/screens/repository.screen.js index 54976ea40..95a389fe1 100644 --- a/src/repository/screens/repository.screen.js +++ b/src/repository/screens/repository.screen.js @@ -116,8 +116,8 @@ class Repository extends Component { fetchRepoInfo = () => { const { - repository: repo, - repositoryUrl: repoUrl + repository: repo, + repositoryUrl: repoUrl, } = this.props.navigation.state.params; this.props.getRepositoryInfoByDispatch(repo ? repo.url : repoUrl); @@ -160,9 +160,11 @@ class Repository extends Component { const loader = isPendingFork ? : null; + return ( {loader} + } - + > + { if (isPendingRepository && !initalRepository) { @@ -325,8 +328,9 @@ class Repository extends Component { )} - + + { this.ActionSheet = o; @@ -336,7 +340,6 @@ class Repository extends Component { cancelButtonIndex={repositoryActions.length} onPress={this.handlePress} /> - ); } From f8506e7592ec915bd3bdc21e0eb2537633d47519 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Mon, 24 Jul 2017 02:09:54 -0400 Subject: [PATCH 12/25] Added pull to refresh to the non auth profile screen. Other minor improv. --- src/repository/screens/repository.screen.js | 2 +- src/user/screens/profile.screen.js | 25 +++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/repository/screens/repository.screen.js b/src/repository/screens/repository.screen.js index 95a389fe1..9a7d95246 100644 --- a/src/repository/screens/repository.screen.js +++ b/src/repository/screens/repository.screen.js @@ -193,7 +193,7 @@ class Repository extends Component { }} stickyTitle={repository.name} showMenu={!isPendingRepository && !isPendingCheckStarred} - menuAction={() => this.showMenuActionSheet()} + menuAction={this.showMenuActionSheet} navigation={navigation} navigateBack > diff --git a/src/user/screens/profile.screen.js b/src/user/screens/profile.screen.js index 7ada1f15f..87d266d19 100644 --- a/src/user/screens/profile.screen.js +++ b/src/user/screens/profile.screen.js @@ -1,6 +1,13 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { StyleSheet, ActivityIndicator, Dimensions, View } from 'react-native'; +import { + StyleSheet, + ActivityIndicator, + Dimensions, + View, + ScrollView, + RefreshControl, + } from 'react-native'; import { ListItem } from 'react-native-elements'; import ActionSheet from 'react-native-actionsheet'; @@ -55,6 +62,10 @@ class Profile extends Component { }; componentDidMount() { + this.getUserInfo(); + } + + getUserInfo = () => { this.props.getUserInfoByDispatch( this.props.navigation.state.params.user.login ); @@ -89,6 +100,16 @@ class Profile extends Component { return ( + + + } + > + } - + { this.ActionSheet = o; From 438a87f95cdd958f17a2b27d21afbe7acf48eb75 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Mon, 24 Jul 2017 15:08:52 -0400 Subject: [PATCH 13/25] Fixing indentation inside of `` --- src/user/screens/profile.screen.js | 116 ++++++++++++++--------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/src/user/screens/profile.screen.js b/src/user/screens/profile.screen.js index 87d266d19..7a462e91b 100644 --- a/src/user/screens/profile.screen.js +++ b/src/user/screens/profile.screen.js @@ -110,64 +110,64 @@ class Profile extends Component { } > - - } - stickyTitle={user.login} - showMenu={ - !isPendingUser && - !isPendingCheckFollowing && - initialUser.login === user.login - } - menuAction={() => this.showMenuActionSheet()} - navigateBack - navigation={navigation} - > - {isPending && - } - - {!isPending && - initialUser.login === user.login && - - {!!user.bio && - user.bio !== '' && - - - } - - - - - {orgs.map(item => - - )} - - } - + + } + stickyTitle={user.login} + showMenu={ + !isPendingUser && + !isPendingCheckFollowing && + initialUser.login === user.login + } + menuAction={() => this.showMenuActionSheet()} + navigateBack + navigation={navigation} + > + {isPending && + } + + {!isPending && + initialUser.login === user.login && + + {!!user.bio && + user.bio !== '' && + + + } + + + + + {orgs.map(item => + + )} + + } + { From f7da7a516d21587af6fac40c155bf9387cc323a2 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Mon, 24 Jul 2017 15:10:14 -0400 Subject: [PATCH 14/25] Removing extra newline --- src/repository/screens/repository.screen.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/repository/screens/repository.screen.js b/src/repository/screens/repository.screen.js index 9a7d95246..f53cf22e3 100644 --- a/src/repository/screens/repository.screen.js +++ b/src/repository/screens/repository.screen.js @@ -160,7 +160,6 @@ class Repository extends Component { const loader = isPendingFork ? : null; - return ( {loader} From 899d028d02473c27d4e21fc0b01394830e9ebd72 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Mon, 24 Jul 2017 15:11:20 -0400 Subject: [PATCH 15/25] Adding a newline between our components and vendor components. --- src/auth/screens/auth-profile.screen.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index 0ee664d98..b10561c20 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -10,6 +10,7 @@ import { import { ListItem } from 'react-native-elements'; import { NavigationActions } from 'react-navigation'; import codePush from 'react-native-code-push'; + import { ViewContainer, UserProfile, From a17a572cecbc7292a61eb15ec302bd6b5ef2bc44 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Mon, 24 Jul 2017 19:59:38 -0400 Subject: [PATCH 16/25] Added myself as a contributor. Code and Bug Reports --- .all-contributorsrc | 9 +++++---- README.md | 10 +++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 1ca600ed0..aefdf4156 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -189,10 +189,11 @@ "avatar_url": "https://avatars0.githubusercontent.com/u/8962228?v=4", "profile": "https://github.com/SammyIsra", "contributions": [ - "code" - ] - }, - { + "code", + "bug" + ] + }, + { "login": "RogerAbyss", "name": "Chao Ren", "avatar_url": "https://avatars1.githubusercontent.com/u/8122587?v=4", diff --git a/README.md b/README.md index 9758453bd..0d48a80a1 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,5 @@ -[![Build Status](https://travis-ci.org/gitpoint/git-point.svg?branch=master)](https://travis-ci.org/gitpoint/git-point) -[![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) -[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/git-point) -

- ย  + GitPoint

@@ -21,7 +16,7 @@ # GitPoint [![Build Status](https://img.shields.io/travis/gitpoint/git-point.svg?style=flat-square)](https://travis-ci.org/gitpoint/git-point) -[![All Contributors](https://img.shields.io/badge/all_contributors-19-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-20-orange.svg?style=flat-square)](#contributors) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Gitter chat](https://img.shields.io/badge/chat-on_gitter-008080.svg?style=flat-square)](https://gitter.im/git-point) @@ -74,4 +69,5 @@ Please take a look at the [contributing guidelines](./CONTRIBUTING.md) for a det | [
Houssein Djirdeh](https://houssein.me)
[๐Ÿ’ฌ](#question-housseindjirdeh "Answering Questions") [๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=housseindjirdeh "Code") [๐ŸŽจ](#design-housseindjirdeh "Design") [๐Ÿ“–](https://github.com/gitpoint/git-point/commits?author=housseindjirdeh "Documentation") [๐Ÿ‘€](#review-housseindjirdeh "Reviewed Pull Requests") | [
gejose](https://github.com/gejose)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=gejose "Code") | [
rmevans9](https://github.com/rmevans9)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=rmevans9 "Code") | [
Alexey Pyltsyn](http://lex111.ru)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=lex111 "Code") [๐Ÿ›](https://github.com/gitpoint/git-point/issues?q=author%3Alex111 "Bug reports") | [
Jason Etcovitch](https://jasonet.co)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=JasonEtco "Code") | [
Hosmel Quintana](http://hosmelq.com)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=hosmelq "Code") | [
Alejandro ร‘รกรฑez Ortiz](http://co.linkedin.com/in/alejandronanez/)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=alejandronanez "Code") [๐Ÿ‘€](#review-alejandronanez "Reviewed Pull Requests") | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | [
Patrick Wang](https://patw.me)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=patw0929 "Code") [๐Ÿ›](https://github.com/gitpoint/git-point/issues?q=author%3Apatw0929 "Bug reports") | [
Mike Kavouras](https://github.com/mikekavouras)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=mikekavouras "Code") [๐Ÿ›](https://github.com/gitpoint/git-point/issues?q=author%3Amikekavouras "Bug reports") | [
Peter Lazar](https://github.com/peterlazar1993)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=peterlazar1993 "Code") | [
June Domingo](https://github.com/junedomingo)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=junedomingo "Code") [๐Ÿ›](https://github.com/gitpoint/git-point/issues?q=author%3Ajunedomingo "Bug reports") | [
Antoine](http://www.jaaccelere.com)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=Antoine38660 "Code") [๐Ÿ›](https://github.com/gitpoint/git-point/issues?q=author%3AAntoine38660 "Bug reports") | [
Wang Shidong](https://wsdjeg.github.io)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=wsdjeg "Code") | [
Swapnil Joshi](http://swapnilmj.users.sourceforge.net/)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=swapnilmj "Code") | +| [
Rolf Koenders](https://github.com/RolfKoenders)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=RolfKoenders "Code") [๐Ÿ›](https://github.com/gitpoint/git-point/issues?q=author%3ARolfKoenders "Bug reports") | [
Andrew Dassonville](https://andrewda.me)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=andrewda "Code") [๐Ÿ’ฌ](#question-andrewda "Answering Questions") [๐Ÿ›](https://github.com/gitpoint/git-point/issues?q=author%3Aandrewda "Bug reports") [๐Ÿ‘€](#review-andrewda "Reviewed Pull Requests") | [
Anton](https://medium.com/@antondomashnev)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=Antondomashnev "Code") | [
Xuezheng Ma](https://github.com/xuezhma)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=xuezhma "Code") | [
Sammy Israwi](https://github.com/SammyIsra)
[๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=SammyIsra "Code") [๐Ÿ›](https://github.com/gitpoint/git-point/issues?q=author%3ASammyIsra "Bug reports") | [
Chao Ren](https://github.com/RogerAbyss)
[๐Ÿ›](https://github.com/gitpoint/git-point/issues?q=author%3ARogerAbyss "Bug reports") [๐Ÿ’ป](https://github.com/gitpoint/git-point/commits?author=RogerAbyss "Code") | From 88eee32f083927ff2ca096723dcce3dfde6af468 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Wed, 26 Jul 2017 20:47:32 -0400 Subject: [PATCH 17/25] Valid NPM versions need to include three parts (x.y.z) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d6ddc845..8e987155a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitpoint", - "version": "1.1", + "version": "1.1.0", "private": true, "scripts": { "start": "react-native start", From 15d685bdeac5c26cccd1c0c659c4b77e1b83b4ac Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Wed, 26 Jul 2017 20:53:41 -0400 Subject: [PATCH 18/25] Removed the double ScrollView. Parallax can now take in refreshControl. Profile Screen, Repo, and Auth User screen have pull to refresh. --- src/auth/screens/auth-profile.screen.js | 145 +++++----- src/components/parallax-scroll.component.js | 4 + src/repository/screens/repository.screen.js | 304 ++++++++++---------- src/user/screens/profile.screen.js | 123 ++++---- 4 files changed, 284 insertions(+), 292 deletions(-) diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index b10561c20..35dd69cc7 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -4,7 +4,6 @@ import { StyleSheet, Text, TouchableOpacity, - ScrollView, RefreshControl, } from 'react-native'; import { ListItem } from 'react-native-elements'; @@ -149,84 +148,82 @@ class AuthProfile extends Component { return ( - - } - > - {loading && } - - {!loading && - - } - stickyTitle={user.login} - > - {user.bio && - user.bio !== '' && - - + {loading && } + + {!loading && + + } + refreshControl={ + + } + stickyTitle={user.login} + > + {user.bio && + user.bio !== '' && + + } - - - - {orgs.map(item => - - )} - - Can't see all your organizations?{'\n'} - - openURLInView('https://github.com/settings/applications')} - > - You may have to request approval for them. - - - + - - this.signOutUser()} + + {orgs.map(item => + - - - - GitPoint v{version} - - {this.state.updateText} + )} + + Can't see all your organizations?{'\n'} + + openURLInView('https://github.com/settings/applications')} + > + You may have to request approval for them. - - - } - + + + + + this.signOutUser()} + /> + + + + + GitPoint v{version} + + + {this.state.updateText} + + + } ); } diff --git a/src/components/parallax-scroll.component.js b/src/components/parallax-scroll.component.js index 4c68bdac0..009bb4fef 100644 --- a/src/components/parallax-scroll.component.js +++ b/src/components/parallax-scroll.component.js @@ -17,6 +17,7 @@ type Props = { menuAction?: Function, navigation: Object, children?: React.Element<*>, + refreshControl?: React.Element<*>, }; const styles = StyleSheet.create({ @@ -59,6 +60,7 @@ export const ParallaxScroll = ({ menuAction, navigation, children, + refreshControl, }: Props) => } } + refreshControl={refreshControl} > {children} ; @@ -111,4 +114,5 @@ ParallaxScroll.defaultProps = { showMenu: false, menuAction: undefined, children: null, + refreshControl: null, }; diff --git a/src/repository/screens/repository.screen.js b/src/repository/screens/repository.screen.js index f53cf22e3..4222f112a 100644 --- a/src/repository/screens/repository.screen.js +++ b/src/repository/screens/repository.screen.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { StyleSheet, ScrollView, RefreshControl } from 'react-native'; +import { StyleSheet, RefreshControl } from 'react-native'; import { ListItem } from 'react-native-elements'; import ActionSheet from 'react-native-actionsheet'; @@ -164,171 +164,167 @@ class Repository extends Component { {loader} - { + if (isPendingRepository && !initalRepository) { + return ; + } + + return ( + + ); + }} refreshControl={ } + stickyTitle={repository.name} + showMenu={!isPendingRepository && !isPendingCheckStarred} + menuAction={this.showMenuActionSheet} + navigation={navigation} + navigateBack > - - { - if (isPendingRepository && !initalRepository) { - return ; - } - - return ( - - ); - }} - stickyTitle={repository.name} - showMenu={!isPendingRepository && !isPendingCheckStarred} - menuAction={this.showMenuActionSheet} - navigation={navigation} - navigateBack - > - {initalRepository && - !initalRepository.owner && - isPendingRepository && - - - } - - {!(initalRepository && initalRepository.owner) && - (repository && repository.owner) && - !isPendingRepository && - - - } - - {initalRepository && - initalRepository.owner && - - - } - - {(isPendingRepository || isPendingContributors) && } - - {!isPendingContributors && - + + } + + {!(initalRepository && initalRepository.owner) && + (repository && repository.owner) && + !isPendingRepository && + + + } + + {initalRepository && + initalRepository.owner && + + } - - - - navigation.navigate('ReadMe', { - repository, - })} - underlayColor={colors.greyLight} /> - - navigation.navigate('RepositoryCodeList', { - topLevel: true, - })} - underlayColor={colors.greyLight} + } + + {(isPendingRepository || isPendingContributors) && + } + + {!isPendingContributors && + } + + + + navigation.navigate('ReadMe', { + repository, + })} + underlayColor={colors.greyLight} + /> + + navigation.navigate('RepositoryCodeList', { + topLevel: true, + })} + underlayColor={colors.greyLight} + /> + + + - - - 0} + buttonTitle="View All" + buttonAction={() => + navigation.navigate('IssueList', { + type: 'issue', + issues: pureIssues, + })} + > + {openIssues + .slice(0, 3) + .map(item => + - } - noItems={openIssues.length === 0} - noItemsMessage={ - pureIssues.length === 0 ? 'No issues' : 'No open issues' - } - showButton={pureIssues.length > 0} - buttonTitle="View All" - buttonAction={() => - navigation.navigate('IssueList', { - type: 'issue', - issues: pureIssues, - })} - > - {openIssues - .slice(0, 3) - .map(item => - - )} - - - + + + } + noItems={openPulls.length === 0} + noItemsMessage={ + pulls.length === 0 ? 'No pull requests' : 'No open pull requests' + } + showButton={pulls.length > 0} + buttonTitle="View All" + buttonAction={() => + navigation.navigate('PullList', { + type: 'pull', + issues: pulls, + })} + > + {openPulls + .slice(0, 3) + .map(item => + - } - noItems={openPulls.length === 0} - noItemsMessage={ - pulls.length === 0 ? 'No pull requests' : 'No open pull requests' - } - showButton={pulls.length > 0} - buttonTitle="View All" - buttonAction={() => - navigation.navigate('PullList', { - type: 'pull', - issues: pulls, - })} - > - {openPulls - .slice(0, 3) - .map(item => - - )} - - - - + )} + + { diff --git a/src/user/screens/profile.screen.js b/src/user/screens/profile.screen.js index 7a462e91b..2cb06b2c5 100644 --- a/src/user/screens/profile.screen.js +++ b/src/user/screens/profile.screen.js @@ -5,9 +5,8 @@ import { ActivityIndicator, Dimensions, View, - ScrollView, RefreshControl, - } from 'react-native'; +} from 'react-native'; import { ListItem } from 'react-native-elements'; import ActionSheet from 'react-native-actionsheet'; @@ -69,7 +68,7 @@ class Profile extends Component { this.props.getUserInfoByDispatch( this.props.navigation.state.params.user.login ); - } + }; showMenuActionSheet = () => { this.ActionSheet.show(); @@ -100,75 +99,71 @@ class Profile extends Component { return ( - - + } refreshControl={ } + stickyTitle={user.login} + showMenu={ + !isPendingUser && + !isPendingCheckFollowing && + initialUser.login === user.login + } + menuAction={() => this.showMenuActionSheet()} + navigateBack + navigation={navigation} > + {isPending && + } + + {!isPending && + initialUser.login === user.login && + + {!!user.bio && + user.bio !== '' && + + + } + + + + + {orgs.map(item => + + )} + + } + - - } - stickyTitle={user.login} - showMenu={ - !isPendingUser && - !isPendingCheckFollowing && - initialUser.login === user.login - } - menuAction={() => this.showMenuActionSheet()} - navigateBack - navigation={navigation} - > - {isPending && - } - - {!isPending && - initialUser.login === user.login && - - {!!user.bio && - user.bio !== '' && - - - } - - - - - {orgs.map(item => - - )} - - } - - { this.ActionSheet = o; From ec7c9ef0cbf2c7e4fd37c2eb0f04a8291eb59ff3 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Wed, 26 Jul 2017 22:15:13 -0400 Subject: [PATCH 19/25] Pull down to refresh now in Issue/PR page (comment list) --- src/issue/screens/issue.screen.js | 70 ++++++++++++++++++------------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/src/issue/screens/issue.screen.js b/src/issue/screens/issue.screen.js index f1bf6db61..294b7f9a0 100644 --- a/src/issue/screens/issue.screen.js +++ b/src/issue/screens/issue.screen.js @@ -87,38 +87,11 @@ class Issue extends Component { isPendingCheckMerge: boolean, isPendingComments: boolean, // isPostingComment: boolean, - navigation: Object + navigation: Object, }; componentDidMount() { - const { - issue, - navigation, - repository, - getIssueCommentsByDispatch, - getRepositoryByDispatch, - getIssueFromUrlByDispatch, - } = this.props; - - const issueParam = navigation.state.params.issue; - const issueURLParam = navigation.state.params.issueURL; - const issueCommentsURL = `${navigation.state.params.issueURL}/comments`; - - Promise.all( - getIssueFromUrlByDispatch(issueURLParam || issueParam.url), - getIssueCommentsByDispatch(issueURLParam ? issueCommentsURL : issueParam.comments_url) - ).then(() => { - if ( - repository.full_name !== - issue.repository_url.replace('https://api.github.com/repos/', '') - ) { - getRepositoryByDispatch(issue.repository_url).then(() => { - this.setNavigationParams(); - }); - } else { - this.setNavigationParams(); - } - }); + this.getIssueInformation(); } onLinkPress = node => { @@ -151,6 +124,39 @@ class Issue extends Component { }); }; + getIssueInformation = () => { + const { + issue, + navigation, + repository, + getIssueCommentsByDispatch, + getRepositoryByDispatch, + getIssueFromUrlByDispatch, + } = this.props; + + const issueParam = navigation.state.params.issue; + const issueURLParam = navigation.state.params.issueURL; + const issueCommentsURL = `${navigation.state.params.issueURL}/comments`; + + Promise.all( + getIssueFromUrlByDispatch(issueURLParam || issueParam.url), + getIssueCommentsByDispatch( + issueURLParam ? issueCommentsURL : issueParam.comments_url + ) + ).then(() => { + if ( + repository.full_name !== + issue.repository_url.replace('https://api.github.com/repos/', '') + ) { + getRepositoryByDispatch(issue.repository_url).then(() => { + this.setNavigationParams(); + }); + } else { + this.setNavigationParams(); + } + }); + }; + setNavigationParams = () => { const { navigation, repository } = this.props; @@ -217,9 +223,11 @@ class Issue extends Component { navigation, } = this.props; + const isLoadingData = isPendingComments || isPendingIssue; + return ( - {(isPendingComments || isPendingIssue) && + {isLoadingData && { this.commentsList = ref; }} + onRefresh={this.getIssueInformation} + refreshing={isLoadingData} contentContainerStyle={{ flexGrow: 1 }} ListHeaderComponent={this.renderHeader} removeClippedSubviews={false} From 442690ca571011863b0368bd0b99c4dc4edcb4df Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Wed, 26 Jul 2017 23:02:02 -0400 Subject: [PATCH 20/25] Fixed some merging issues and yarn lockfile --- src/issue/screens/issue.screen.js | 4 +- yarn.lock | 104 +++++++++++++++++++++++++++--- 2 files changed, 97 insertions(+), 11 deletions(-) diff --git a/src/issue/screens/issue.screen.js b/src/issue/screens/issue.screen.js index f33d072a2..12789ee34 100644 --- a/src/issue/screens/issue.screen.js +++ b/src/issue/screens/issue.screen.js @@ -17,7 +17,7 @@ import { CommentInput, } from 'components'; import { colors } from 'config'; -import { getRepository, getContributors } from 'repository'; +import { getRepository } from 'repository'; import { getIssueComments, postIssueComment, @@ -45,7 +45,6 @@ const mapDispatchToProps = dispatch => ({ dispatch(postIssueComment(body, owner, repoName, issueNum)), getIssueFromUrlByDispatch: url => dispatch(getIssueFromUrl(url)), getRepositoryByDispatch: url => dispatch(getRepository(url)), - getContributorsByDispatch: url => dispatch(getContributors(url)), }); class Issue extends Component { @@ -76,7 +75,6 @@ class Issue extends Component { props: { getIssueCommentsByDispatch: Function, getRepositoryByDispatch: Function, - getContributorsByDispatch: Function, postIssueCommentByDispatch: Function, getIssueFromUrlByDispatch: Function, diff: string, diff --git a/yarn.lock b/yarn.lock index 8abb4ea81..4245644a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -262,6 +262,10 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" +async@0.2.x, async@~0.2.6, async@~0.2.9: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -272,10 +276,6 @@ async@^2.0.0-rc.1, async@^2.1.4, async@^2.4.0: dependencies: lodash "^4.14.0" -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1419,6 +1419,10 @@ color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" +colors@0.6.x: + version "0.6.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc" + colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -1660,6 +1664,10 @@ csurf@~1.8.3: csrf "~3.0.0" http-errors "~1.3.1" +cycle@1.0.x: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" + d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" @@ -1714,6 +1722,10 @@ deep-diff@0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/deep-diff/-/deep-diff-0.3.4.tgz#aac5c39952236abe5f037a2349060ba01b00ae48" +deep-equal@*: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + deep-extend@~0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" @@ -2254,6 +2266,10 @@ extsprintf@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +eyes@0.1.x: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + fancy-log@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" @@ -2793,6 +2809,10 @@ https-proxy-agent@1: debug "2" extend "3" +i@0.3.x: + version "0.3.5" + resolved "https://registry.yarnpkg.com/i/-/i-0.3.5.tgz#1d2b854158ec8169113c6cb7f6b6801e99e211d5" + iconv-lite@0.4.11: version "0.4.11" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.11.tgz#2ecb42fd294744922209a2e7c404dac8793d8ade" @@ -3104,7 +3124,7 @@ isomorphic-fetch@^2.1.1: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" -isstream@~0.1.2: +isstream@0.1.x, isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -3966,7 +3986,7 @@ minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@0.x.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -4019,7 +4039,7 @@ mute-stream@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.6.tgz#48962b19e169fd1dfc240b3f1e7317627bbc47db" -mute-stream@0.0.7: +mute-stream@0.0.7, mute-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -4031,6 +4051,10 @@ natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" +ncp@0.4.x: + version "0.4.2" + resolved "https://registry.yarnpkg.com/ncp/-/ncp-0.4.2.tgz#abcc6cbd3ec2ed2a729ff6e7c1fa8f01784a8574" + negotiator@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.5.3.tgz#269d5c476810ec92edbe7b6c2f28316384f9a7e8" @@ -4430,6 +4454,14 @@ pkg-up@^1.0.0: dependencies: find-up "^1.0.0" +pkginfo@0.3.x: + version "0.3.1" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21" + +pkginfo@0.x.x: + version "0.4.0" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.0.tgz#349dbb7ffd38081fcadc0853df687f0c7744cd65" + plist@1.2.0, plist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/plist/-/plist-1.2.0.tgz#084b5093ddc92506e259f874b8d9b1afb8c79593" @@ -4503,6 +4535,16 @@ promise@^7.1.1: dependencies: asap "~2.0.3" +prompt@^0.2.14: + version "0.2.14" + resolved "https://registry.yarnpkg.com/prompt/-/prompt-0.2.14.tgz#57754f64f543fd7b0845707c818ece618f05ffdc" + dependencies: + pkginfo "0.x.x" + read "1.0.x" + revalidator "0.1.x" + utile "0.2.x" + winston "0.8.x" + prop-types@^15.5.10, prop-types@^15.5.6, prop-types@^15.5.8: version "15.5.10" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" @@ -4609,6 +4651,15 @@ react-native-actionsheet@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/react-native-actionsheet/-/react-native-actionsheet-2.2.0.tgz#3783ad2c8d1ba116908ab8e169399adc486cc89e" +react-native-cli@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/react-native-cli/-/react-native-cli-2.0.1.tgz#f2cd3c7aa1b83828cdfba630e2dfd817df766d54" + dependencies: + chalk "^1.1.1" + minimist "^1.2.0" + prompt "^0.2.14" + semver "^5.0.3" + react-native-code-push@3.0.1-beta: version "3.0.1-beta" resolved "https://registry.yarnpkg.com/react-native-code-push/-/react-native-code-push-3.0.1-beta.tgz#592b9bd579437b8d7e76c139571bda3a1975a0cb" @@ -4907,6 +4958,12 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" +read@1.0.x: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + dependencies: + mute-stream "~0.0.4" + readable-stream@1.0.27-1: version "1.0.27-1" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.27-1.tgz#6b67983c20357cefd07f0165001a16d710d91078" @@ -5161,13 +5218,17 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +revalidator@0.1.x: + version "0.1.8" + resolved "https://registry.yarnpkg.com/revalidator/-/revalidator-0.1.8.tgz#fece61bfa0c1b52a206bd6b18198184bdd523a3b" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: +rimraf@2, rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -5483,6 +5544,10 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + stacktrace-parser@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.4.tgz#01397922e5f62ecf30845522c95c4fe1d25e7d4e" @@ -5849,6 +5914,17 @@ util-deprecate@1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +utile@0.2.x: + version "0.2.1" + resolved "https://registry.yarnpkg.com/utile/-/utile-0.2.1.tgz#930c88e99098d6220834c356cbd9a770522d90d7" + dependencies: + async "~0.2.9" + deep-equal "*" + i "0.3.x" + mkdirp "0.x.x" + ncp "0.4.x" + rimraf "2.x.x" + utils-merge@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" @@ -5959,6 +6035,18 @@ window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" +winston@0.8.x: + version "0.8.3" + resolved "https://registry.yarnpkg.com/winston/-/winston-0.8.3.tgz#64b6abf4cd01adcaefd5009393b1d8e8bec19db0" + dependencies: + async "0.2.x" + colors "0.6.x" + cycle "1.0.x" + eyes "0.1.x" + isstream "0.1.x" + pkginfo "0.3.x" + stack-trace "0.0.x" + wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" From 203cc2bd83b3ad3a588e17067ccb992c5786fc3b Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 27 Jul 2017 01:41:49 -0400 Subject: [PATCH 21/25] Organizations are now refreshable --- .../screens/organization-profile.screen.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/organization/screens/organization-profile.screen.js b/src/organization/screens/organization-profile.screen.js index ecfce577b..2128b4deb 100644 --- a/src/organization/screens/organization-profile.screen.js +++ b/src/organization/screens/organization-profile.screen.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { StyleSheet } from 'react-native'; +import { StyleSheet, RefreshControl } from 'react-native'; import { ListItem } from 'react-native-elements'; import { @@ -57,11 +57,15 @@ class OrganizationProfile extends Component { }; componentDidMount() { + this.getOrgData(); + } + + getOrgData = () => { const organization = this.props.navigation.state.params.organization; this.props.getOrgByDispatch(organization.login); this.props.getOrgMembersByDispatch(organization.login); - } + }; render() { const { @@ -73,6 +77,8 @@ class OrganizationProfile extends Component { } = this.props; const initialOrganization = this.props.navigation.state.params.organization; + const isLoadingData = isPendingOrg || isPendingMembers; + return ( } + refreshControl={ + + } stickyTitle={organization.name} navigateBack navigation={navigation} From f6ed3ba1e45adb3c729efcc958e060f1ea27b1f2 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 27 Jul 2017 02:26:58 -0400 Subject: [PATCH 22/25] Better behavior on the AuthUser pull to refresh --- src/auth/screens/auth-profile.screen.js | 86 ++++++++++++------------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index 71b331e97..410e9ecd4 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -14,7 +14,6 @@ import { ViewContainer, UserProfile, SectionList, - LoadingContainer, ParallaxScroll, UserListItem, EntityInfo, @@ -144,41 +143,42 @@ class AuthProfile extends Component { render() { const { user, orgs, isPendingUser, isPendingOrgs, navigation } = this.props; + const loading = isPendingUser || isPendingOrgs; return ( - {loading && } - - {!loading && - - } - refreshControl={ - + } + refreshControl={ + + } + stickyTitle={user.login} + > + {!isPendingUser && + user.bio && + user.bio !== '' && + + - } - stickyTitle={user.login} - > - {user.bio && - user.bio !== '' && - - - } + } - + {!loading && + } + {!isPendingOrgs && - + } + {!loading && this.signOutUser()} /> - - - - - GitPoint v{version} - - - {this.state.updateText} - - - } + } + + + + GitPoint v{version} + + + {this.state.updateText} + + + ); } From 02c5e6727de92c9b3b634bd4531d5bda2a22d5be Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 27 Jul 2017 03:01:55 -0400 Subject: [PATCH 23/25] Even better experience when refreshing AuthProfile. Now we have a flag when we _have_ a profile --- src/auth/auth.reducer.js | 3 +++ src/auth/screens/auth-profile.screen.js | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/auth/auth.reducer.js b/src/auth/auth.reducer.js index 95ba10289..2d02f65bb 100644 --- a/src/auth/auth.reducer.js +++ b/src/auth/auth.reducer.js @@ -12,6 +12,7 @@ const initialState = { isAuthenticated: false, accessToken: null, user: {}, + hasInitialUser: false, orgs: [], events: [], isPendingUser: false, @@ -50,6 +51,7 @@ export const authReducer = (state = initialState, action = {}) => { case LOGOUT.SUCCESS: return { ...initialState, + hasInitialUser: false, }; case LOGOUT.FAILURE: return { @@ -67,6 +69,7 @@ export const authReducer = (state = initialState, action = {}) => { ...state, user: action.payload, isPendingUser: false, + hasInitialUser: true, }; case GET_AUTH_USER.ERROR: return { diff --git a/src/auth/screens/auth-profile.screen.js b/src/auth/screens/auth-profile.screen.js index 410e9ecd4..f99debd6b 100644 --- a/src/auth/screens/auth-profile.screen.js +++ b/src/auth/screens/auth-profile.screen.js @@ -28,6 +28,7 @@ const mapStateToProps = state => ({ orgs: state.auth.orgs, isPendingUser: state.auth.isPendingUser, isPendingOrgs: state.auth.isPendingOrgs, + hasInitialUser: state.auth.hasInitialUser, }); const mapDispatchToProps = dispatch => ({ @@ -90,6 +91,7 @@ class AuthProfile extends Component { orgs: Array, isPendingUser: boolean, isPendingOrgs: boolean, + hasInitialUser: boolean, navigation: Object, }; @@ -142,7 +144,14 @@ class AuthProfile extends Component { } render() { - const { user, orgs, isPendingUser, isPendingOrgs, navigation } = this.props; + const { + user, + orgs, + isPendingUser, + isPendingOrgs, + navigation, + hasInitialUser, + } = this.props; const loading = isPendingUser || isPendingOrgs; @@ -152,8 +161,8 @@ class AuthProfile extends Component { renderContent={() => } refreshControl={ @@ -164,7 +173,7 @@ class AuthProfile extends Component { } stickyTitle={user.login} > - {!isPendingUser && + {hasInitialUser && user.bio && user.bio !== '' && From 3e907f944945500404ada372c3055ce55531fa71 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Thu, 27 Jul 2017 23:30:52 -0400 Subject: [PATCH 24/25] Refreshing on Issues (specifically) works again --- src/issue/screens/issue.screen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/issue/screens/issue.screen.js b/src/issue/screens/issue.screen.js index 12789ee34..6b193bca0 100644 --- a/src/issue/screens/issue.screen.js +++ b/src/issue/screens/issue.screen.js @@ -230,7 +230,7 @@ class Issue extends Component { navigation, } = this.props; - const isLoadingData = isPendingComments || isPendingIssue; + const isLoadingData = isPendingComments || isPendingIssue || false; const fullComments = !isPendingComments ? [issue, ...comments] : []; const participantNames = !isPendingComments ? fullComments.map(item => item && item.user && item.user.login) @@ -262,8 +262,8 @@ class Issue extends Component { ref={ref => { this.commentsList = ref; }} - onRefresh={this.getIssueInformation} refreshing={isLoadingData} + onRefresh={this.getIssueInformation} contentContainerStyle={{ flexGrow: 1 }} ListHeaderComponent={this.renderHeader} removeClippedSubviews={false} From 66ad3e39c2d73a910953e24528904f9b52dc6773 Mon Sep 17 00:00:00 2001 From: Sammy Israwi Date: Fri, 28 Jul 2017 12:15:43 -0400 Subject: [PATCH 25/25] Used '!!' instead of '|| false' as per suggestion Temporal fix, I still want to figure out why isPendingComments and isPendingIssue are undefined. --- src/issue/screens/issue.screen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/issue/screens/issue.screen.js b/src/issue/screens/issue.screen.js index 6b193bca0..1914d8a46 100644 --- a/src/issue/screens/issue.screen.js +++ b/src/issue/screens/issue.screen.js @@ -230,7 +230,7 @@ class Issue extends Component { navigation, } = this.props; - const isLoadingData = isPendingComments || isPendingIssue || false; + const isLoadingData = !!(isPendingComments || isPendingIssue); const fullComments = !isPendingComments ? [issue, ...comments] : []; const participantNames = !isPendingComments ? fullComments.map(item => item && item.user && item.user.login)