New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull down to refresh implemented #132
Changes from 30 commits
f455e30
9e091a8
f52e2f6
90c8d76
8e285b4
5eb2b51
870ea3c
9a86228
08548e5
e02fe90
f308a7b
36d8cf7
5d7736b
088dc12
9d97a3a
7c11120
f8506e7
438a87f
f7da7a5
899d028
a17a572
88eee32
15d685b
ec7c9ef
f484cd8
442690c
203cc2b
f6ed3ba
02c5e67
3e907f9
5d639c1
66ad3e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<h1 align="center"> GitPoint </h1> <br> | ||
<p align="center"> | ||
<a href="https://gitpoint.co/"> | ||
<a href="https://gitpoint.co/"> | ||
<img alt="GitPoint" title="GitPoint" src="http://i.imgur.com/VShxJHs.png" width="450"> | ||
</a> | ||
</p> | ||
|
@@ -17,8 +17,8 @@ | |
|
||
## Introduction | ||
|
||
[![Build Status](https://img.shields.io/travis/gitpoint/git-point/master.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) | ||
[![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-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) | ||
|
||
|
@@ -67,5 +67,5 @@ Please take a look at the [contributing guidelines](./CONTRIBUTING.md) for a det | |
| [<img src="https://avatars0.githubusercontent.com/u/12476932?v=3" width="100px;"/><br /><sub>Houssein Djirdeh</sub>](https://houssein.me)<br />[💬](#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") | [<img src="https://avatars2.githubusercontent.com/u/16705071?v=3" width="100px;"/><br /><sub>gejose</sub>](https://github.com/gejose)<br />[💻](https://github.com/gitpoint/git-point/commits?author=gejose "Code") | [<img src="https://avatars3.githubusercontent.com/u/14151327?v=3" width="100px;"/><br /><sub>rmevans9</sub>](https://github.com/rmevans9)<br />[💻](https://github.com/gitpoint/git-point/commits?author=rmevans9 "Code") | [<img src="https://avatars1.githubusercontent.com/u/4408379?v=3" width="100px;"/><br /><sub>Alexey Pyltsyn</sub>](http://lex111.ru)<br />[💻](https://github.com/gitpoint/git-point/commits?author=lex111 "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Alex111 "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/10660468?v=3" width="100px;"/><br /><sub>Jason Etcovitch</sub>](https://jasonet.co)<br />[💻](https://github.com/gitpoint/git-point/commits?author=JasonEtco "Code") | [<img src="https://avatars1.githubusercontent.com/u/1166143?v=3" width="100px;"/><br /><sub>Hosmel Quintana</sub>](http://hosmelq.com)<br />[💻](https://github.com/gitpoint/git-point/commits?author=hosmelq "Code") | [<img src="https://avatars0.githubusercontent.com/u/464978?v=3" width="100px;"/><br /><sub>Alejandro Ñáñez Ortiz</sub>](http://co.linkedin.com/in/alejandronanez/)<br />[💻](https://github.com/gitpoint/git-point/commits?author=alejandronanez "Code") [👀](#review-alejandronanez "Reviewed Pull Requests") | | ||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | | ||
| [<img src="https://avatars3.githubusercontent.com/u/3055294?v=3" width="100px;"/><br /><sub>Patrick Wang</sub>](https://patw.me)<br />[💻](https://github.com/gitpoint/git-point/commits?author=patw0929 "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Apatw0929 "Bug reports") | [<img src="https://avatars5.githubusercontent.com/u/627794?v=4" width="100px;"/><br /><sub>Mike Kavouras</sub>](https://github.com/mikekavouras)<br />[💻](https://github.com/gitpoint/git-point/commits?author=mikekavouras "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Amikekavouras "Bug reports") | [<img src="https://avatars4.githubusercontent.com/u/4848554?v=4" width="100px;"/><br /><sub>Peter Lazar</sub>](https://github.com/peterlazar1993)<br />[💻](https://github.com/gitpoint/git-point/commits?author=peterlazar1993 "Code") | [<img src="https://avatars6.githubusercontent.com/u/5106887?v=4" width="100px;"/><br /><sub>June Domingo</sub>](https://github.com/junedomingo)<br />[💻](https://github.com/gitpoint/git-point/commits?author=junedomingo "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Ajunedomingo "Bug reports") | [<img src="https://avatars7.githubusercontent.com/u/9287184?v=4" width="100px;"/><br /><sub>Antoine</sub>](http://www.jaaccelere.com)<br />[💻](https://github.com/gitpoint/git-point/commits?author=Antoine38660 "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3AAntoine38660 "Bug reports") | [<img src="https://avatars6.githubusercontent.com/u/13142418?v=4" width="100px;"/><br /><sub>Wang Shidong</sub>](https://wsdjeg.github.io)<br />[💻](https://github.com/gitpoint/git-point/commits?author=wsdjeg "Code") | [<img src="https://avatars4.githubusercontent.com/u/2190589?v=4" width="100px;"/><br /><sub>Swapnil Joshi</sub>](http://swapnilmj.users.sourceforge.net/)<br />[💻](https://github.com/gitpoint/git-point/commits?author=swapnilmj "Code") | | ||
| [<img src="https://avatars5.githubusercontent.com/u/408959?v=4" width="100px;"/><br /><sub>Rolf Koenders</sub>](https://github.com/RolfKoenders)<br />[💻](https://github.com/gitpoint/git-point/commits?author=RolfKoenders "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3ARolfKoenders "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/10191084?v=4" width="100px;"/><br /><sub>Andrew Dassonville</sub>](https://andrewda.me)<br />[💻](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") | [<img src="https://avatars0.githubusercontent.com/u/2076088?v=4" width="100px;"/><br /><sub>Anton</sub>](https://medium.com/@antondomashnev)<br />[💻](https://github.com/gitpoint/git-point/commits?author=Antondomashnev "Code") | [<img src="https://avatars0.githubusercontent.com/u/14795799?v=4" width="100px;"/><br /><sub>Xuezheng Ma</sub>](https://github.com/xuezhma)<br />[💻](https://github.com/gitpoint/git-point/commits?author=xuezhma "Code") | [<img src="https://avatars1.githubusercontent.com/u/8122587?v=4" width="100px;"/><br /><sub>Chao Ren</sub>](https://github.com/RogerAbyss)<br />[🐛](https://github.com/gitpoint/git-point/issues?q=author%3ARogerAbyss "Bug reports") [💻](https://github.com/gitpoint/git-point/commits?author=RogerAbyss "Code") | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably a merge conflict gone wrong. These README changes shouldn't be here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (except appending your name to the bottom which is done automatically by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Huh, I thought I had fixed it before... I ran the command before (when I first introduced the PR), but there were new contributors since then so I had to fix the list of contributors. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd recommend just copy and pasting the README from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok I think I may have broken the list... Do you think it would be best to reset this file to the one in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I sent that message before I realized you recommended that a minute before haha There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed! |
||
| [<img src="https://avatars5.githubusercontent.com/u/408959?v=4" width="100px;"/><br /><sub>Rolf Koenders</sub>](https://github.com/RolfKoenders)<br />[💻](https://github.com/gitpoint/git-point/commits?author=RolfKoenders "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3ARolfKoenders "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/10191084?v=4" width="100px;"/><br /><sub>Andrew Dassonville</sub>](https://andrewda.me)<br />[💻](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") | [<img src="https://avatars0.githubusercontent.com/u/2076088?v=4" width="100px;"/><br /><sub>Anton</sub>](https://medium.com/@antondomashnev)<br />[💻](https://github.com/gitpoint/git-point/commits?author=Antondomashnev "Code") | [<img src="https://avatars0.githubusercontent.com/u/14795799?v=4" width="100px;"/><br /><sub>Xuezheng Ma</sub>](https://github.com/xuezhma)<br />[💻](https://github.com/gitpoint/git-point/commits?author=xuezhma "Code") | [<img src="https://avatars0.githubusercontent.com/u/8962228?v=4" width="100px;"/><br /><sub>Sammy Israwi</sub>](https://github.com/SammyIsra)<br />[💻](https://github.com/gitpoint/git-point/commits?author=SammyIsra "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3ASammyIsra "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/8122587?v=4" width="100px;"/><br /><sub>Chao Ren</sub>](https://github.com/RogerAbyss)<br />[🐛](https://github.com/gitpoint/git-point/issues?q=author%3ARogerAbyss "Bug reports") [💻](https://github.com/gitpoint/git-point/commits?author=RogerAbyss "Code") | | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,7 @@ | |
"lint-staged": "^3.2.6", | ||
"pre-commit": "^1.2.2", | ||
"prettier": "^1.3.1", | ||
"react-native-cli": "^2.0.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this in here? Maybe I just missed it, thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My machine was having problems with running yarn commands that called on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good to me then. =] |
||
"react-test-renderer": "16.0.0-alpha.6" | ||
}, | ||
"jest": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
import React, { Component } from 'react'; | ||
import { connect } from 'react-redux'; | ||
import { StyleSheet, Text, TouchableOpacity } from 'react-native'; | ||
import { | ||
StyleSheet, | ||
Text, | ||
TouchableOpacity, | ||
RefreshControl, | ||
} from 'react-native'; | ||
import { ListItem } from 'react-native-elements'; | ||
import { NavigationActions } from 'react-navigation'; | ||
import codePush from 'react-native-code-push'; | ||
|
@@ -9,7 +14,6 @@ import { | |
ViewContainer, | ||
UserProfile, | ||
SectionList, | ||
LoadingContainer, | ||
ParallaxScroll, | ||
UserListItem, | ||
EntityInfo, | ||
|
@@ -24,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 => ({ | ||
|
@@ -86,6 +91,7 @@ class AuthProfile extends Component { | |
orgs: Array, | ||
isPendingUser: boolean, | ||
isPendingOrgs: boolean, | ||
hasInitialUser: boolean, | ||
navigation: Object, | ||
}; | ||
|
||
|
@@ -94,8 +100,7 @@ class AuthProfile extends Component { | |
}; | ||
|
||
componentDidMount() { | ||
this.props.getUserByDispatch(); | ||
this.props.getOrgsByDispatch(); | ||
this.refreshProfile(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! |
||
} | ||
|
||
checkForUpdate = () => { | ||
|
@@ -116,6 +121,11 @@ class AuthProfile extends Component { | |
} | ||
}; | ||
|
||
refreshProfile = () => { | ||
this.props.getUserByDispatch(); | ||
this.props.getOrgsByDispatch(); | ||
}; | ||
|
||
signOutUser() { | ||
const { signOutByDispatch, navigation } = this.props; | ||
|
||
|
@@ -134,36 +144,50 @@ 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; | ||
|
||
return ( | ||
<ViewContainer> | ||
{loading && <LoadingContainer animating={loading} center />} | ||
|
||
{!loading && | ||
<ParallaxScroll | ||
renderContent={() => | ||
<UserProfile | ||
type="user" | ||
initialUser={user} | ||
user={user} | ||
navigation={navigation} | ||
/>} | ||
stickyTitle={user.login} | ||
> | ||
{user.bio && | ||
user.bio !== '' && | ||
<SectionList title="BIO"> | ||
<ListItem | ||
subtitle={emojifyText(user.bio)} | ||
subtitleStyle={styles.listSubTitle} | ||
hideChevron | ||
/> | ||
</SectionList>} | ||
<ParallaxScroll | ||
renderContent={() => | ||
<UserProfile | ||
type="user" | ||
initialUser={hasInitialUser ? user : {}} | ||
user={hasInitialUser ? user : {}} | ||
navigation={navigation} | ||
/>} | ||
refreshControl={ | ||
<RefreshControl | ||
refreshing={loading} | ||
onRefresh={this.refreshProfile} | ||
/> | ||
} | ||
stickyTitle={user.login} | ||
> | ||
{hasInitialUser && | ||
user.bio && | ||
user.bio !== '' && | ||
<SectionList title="BIO"> | ||
<ListItem | ||
subtitle={emojifyText(user.bio)} | ||
subtitleStyle={styles.listSubTitle} | ||
hideChevron | ||
/> | ||
</SectionList>} | ||
|
||
<EntityInfo entity={user} orgs={orgs} navigation={navigation} /> | ||
{!loading && | ||
<EntityInfo entity={user} orgs={orgs} navigation={navigation} />} | ||
|
||
{!isPendingOrgs && | ||
<SectionList | ||
title="ORGANIZATIONS" | ||
noItems={orgs.length === 0} | ||
|
@@ -186,8 +210,9 @@ class AuthProfile extends Component { | |
You may have to request approval for them. | ||
</Text> | ||
</Text> | ||
</SectionList> | ||
</SectionList>} | ||
|
||
{!loading && | ||
<SectionList> | ||
<ListItem | ||
title="Privacy Policy" | ||
|
@@ -201,20 +226,17 @@ class AuthProfile extends Component { | |
hideChevron | ||
onPress={() => this.signOutUser()} | ||
/> | ||
</SectionList> | ||
|
||
<TouchableOpacity | ||
style={styles.update} | ||
onPress={this.checkForUpdate} | ||
> | ||
<Text style={styles.updateText}> | ||
GitPoint v{version} | ||
</Text> | ||
<Text style={[styles.updateText, styles.updateTextSub]}> | ||
{this.state.updateText} | ||
</Text> | ||
</TouchableOpacity> | ||
</ParallaxScroll>} | ||
</SectionList>} | ||
|
||
<TouchableOpacity style={styles.update} onPress={this.checkForUpdate}> | ||
<Text style={styles.updateText}> | ||
GitPoint v{version} | ||
</Text> | ||
<Text style={[styles.updateText, styles.updateTextSub]}> | ||
{this.state.updateText} | ||
</Text> | ||
</TouchableOpacity> | ||
</ParallaxScroll> | ||
</ViewContainer> | ||
); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has got quite a few conflicts and is using a pretty old version of the file. For example, most of these SectionList's can be replaced with the |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 🎉 🎉 🎉 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!