Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(*): status for following users/starring repos #260

Merged

Conversation

reyhansofian
Copy link
Contributor

Issue #159

  • Add Starred status below Stars on repo screen
  • Add Following status below Following on user screen

Preview

image


image

Copy link
Member

@andrewda andrewda left a comment

Choose a reason for hiding this comment

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

Wow this is awesome! Could you do the same thing for watchers? Looks like you might need to update your branch to get the latest watcher code.

@andrewda andrewda changed the title status for following/starring repos feat(*): status for following users/starring repos Aug 16, 2017
@lex111
Copy link
Member

lex111 commented Aug 16, 2017

Can make a smaller font? And/or make a clarification like in Twitter, i.e. instead of "following" show "follows you", if he follows you? Similarly do in "Following", but there will be "following you" if you follow him?

@sasongkoadi
Copy link

Can I give any suggest for following @lex111 ??

@reyhansofian
Copy link
Contributor Author

reyhansofian commented Aug 16, 2017

@andrewda sure, I'll update my branch and add to watcher as well
@lex111 I'll take a look on the data again. I'm sure there's followers stuff on the store. Will update
@sasongkoadi feel free to give any suggestion 😄

@sasongkoadi
Copy link

Can I edit following, and starring style, for more looks good? @reyhansofian

@reyhansofian
Copy link
Contributor Author

oh wait, I'm still working on it @sasongkoadi
I'll let you know when it's pushed 😄

@reyhansofian
Copy link
Contributor Author

Updated User Status

screen shot 2017-08-16 at 7 43 55 pm

Updated Repo Status

screen shot 2017-08-16 at 7 45 15 pm

@reyhansofian
Copy link
Contributor Author

reyhansofian commented Aug 16, 2017

@sasongkoadi please let me know if you still want to add something to this PR

@reyhansofian
Copy link
Contributor Author

Added 'Follows You' Status

screen shot 2017-08-16 at 9 47 48 pm

@lex111
Copy link
Member

lex111 commented Aug 16, 2017

@reyhansofian It looks cool indeed! 👍 Although I'm not sure if this fits into the design, I would add an top margin before the statuses. Because of the rounded corners, it looks like buttons, although they are not them, can they be removed? In any case, thank you, what other ideas, how should be these statuses look like?

Copy link
Member

@andrewda andrewda left a comment

Choose a reason for hiding this comment

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

This just keeps looking nicer and nicer! I agree with @lex111 for more padding on top, too - I'd like to see what that looks like.

@@ -186,6 +186,8 @@ export const en = {
starsTitle: 'Stars',
forksTitle: 'Forks',
forkedFromMessage: 'forked from',
starred: 'Starred',
watched: 'Watched',
Copy link
Member

Choose a reason for hiding this comment

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

"Watching" is probably better here (for both the key and translation.)

@@ -156,6 +182,10 @@ export const UserProfile = ({
<Text style={styles.unitText}>
{translate('common.following', language)}
</Text>
{isFollower &&
<View style={styles.badge}>
<Text style={styles.unitStatus}>Follows you</Text>
Copy link
Member

Choose a reason for hiding this comment

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

Needs translation.

@reyhansofian
Copy link
Contributor Author

@lex111 ah you're right! it need to some margin on the top. I'll fix that! Regarding the statuses style, what about make it looks like a label? Just like what Twitter did

screen shot 2017-08-16 at 11 13 25 pm

@andrewda will update soon!

@andrewda
Copy link
Member

@reyhansofian Yea that'd look good. I think you could also try reducing the padding within the label to make it look less like a button.

@reyhansofian
Copy link
Contributor Author

@andrewda OK, will do!

@reyhansofian
Copy link
Contributor Author

reyhansofian commented Aug 16, 2017

@lex111 @andrewda updated! please check 😄 let me know if the statuses border still doesn't make sense and we can remove it

screen shot 2017-08-17 at 12 31 10 am

screen shot 2017-08-17 at 12 31 26 am

Copy link
Member

@andrewda andrewda left a comment

Choose a reason for hiding this comment

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

This looks great!

@lex111
Copy link
Member

lex111 commented Aug 16, 2017

@reyhansofian not bad! One clarification: will the width of the status increase with the change in the text? Simply in English it looks good, but there will be other languages, and the length will differ and then how will the statuses be displayed, I mean the word breaks is there?

@reyhansofian
Copy link
Contributor Author

@lex111 yeah, it will break into newline. I'm not sure how to do that in RN tho 😞

screen shot 2017-08-17 at 1 14 56 am

@lex111
Copy link
Member

lex111 commented Aug 16, 2017

Then everything is fine? I just thought that there would be no breaks. Although it was cool if the width of the block expanded, or increase more it, than now, do you think?
image

@reyhansofian
Copy link
Contributor Author

if you're okay with current approach (break into new line instead of expand the container width), then everything is fine 😄 I'll try to make it expanded by tomorrow.

@lex111
Copy link
Member

lex111 commented Aug 16, 2017

I do not know for sure, but what think @andrewda @housseindjirdeh?

@andrewda
Copy link
Member

Not sure. I think I kinda prefer expanding the width, but either way works.

Copy link
Member

@housseindjirdeh housseindjirdeh left a comment

Choose a reason for hiding this comment

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

This is awesome @reyhansofian and looks so good 😍. I would also align towards expanding the width if text grows but if that's not simple I'm okay with this as well.

Left a few discussion points and one thing that would need changing (removing the duplicate getFollowers call + fixing conflicts). But otherwise it looks good :O

@@ -157,6 +157,9 @@ export const en = {
followingList: {
title: 'Following',
},
followYou: {
title: 'Follows you',
},
Copy link
Member

Choose a reason for hiding this comment

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

As part of trying to streamline translation updates, could you add a comment to the top of en.js with the commit hash and link to the PR? That way we can sort of be able to tell if translations are not the same between multiple different languages.

CC @machour

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do

Copy link
Member

Choose a reason for hiding this comment

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

And what if you add new phrases for translation into all language files? Then it will be clear what needs to be translated in other languages. In fact, we need to do this, because we get the situation that in the English version we have followYou, and in that case there will be an error (missing value) in other languages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just realised that we have France translation. I will add the followYou key there

Copy link
Member

Choose a reason for hiding this comment

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

Can we make it fall back on the English translation if a phrase doesn't exist in a certain language? That would make everything a lot smoother IMO, and make it so we don't have to update every language in small PR's.

Copy link
Member

Choose a reason for hiding this comment

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

@housseindjirdeh no need to do that for the en.js file, this is only for translators to keep some kind of internal record.

+1 on @andrewda request, we need a fallback to english and developers shouldn't have to touch translations files. It used to be the case with the previous system.

@reyhansofian if you do touch the french file, here's the translation: "Vous suit".

export const getUserInfo = user => {
return dispatch => {
return dispatch(getUser(user)).then(() => {
dispatch(getOrgs(user));
dispatch(
checkFollowStatus(`https://api.github.com/user/following/${user}`)
);
dispatch(getFollowers(user));
Copy link
Member

Choose a reason for hiding this comment

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

I'm assuming we fire this to get the list of followers as soon as a user navigates to the user profile screen so that we can determine whether we're following them correct? If that's the case, it's also currently being fired in the follower-list.screen so we'll need to remove it there to prevent it being called unnecessarily for the second time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

exactly! I'll remove that action on follower-list.screen. Thanks for pointing out 👍

},
{
"login": "reyhansofian",
"name": "Reyhan Sofian",
Copy link
Member

Choose a reason for hiding this comment

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

❤️

@@ -12,6 +12,7 @@ export const colors = {
greyMidLight: '#f6f8fa',
greyVeryLight: '#fbfbfb',
lightGreen: '#00FF00',
paleGreen: '#359d68',
Copy link
Member

Choose a reason for hiding this comment

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

Curious, do you think paleGreen will look better than green here? Thinking a lighter shade bolded might give it more pop 🎉 but maybe that's just me 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

naming is hard 😂 how about lighterBoldGreen? 🙈

@reyhansofian
Copy link
Contributor Author

reyhansofian commented Aug 18, 2017

@machour @andrewda added French translation and activate fallback for translation. please check it out

French Translation

screen shot 2017-08-18 at 8 11 05 am

Fallbacks

screen shot 2017-08-18 at 8 10 01 am

@andrewda
Copy link
Member

Very nice!

Copy link
Member

@Antoine38660 Antoine38660 left a comment

Choose a reason for hiding this comment

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

Nice work dude :)

@@ -161,6 +161,9 @@ export const fr = {
followingList: {
title: 'Following',
},
followYou: {
title: 'Vous suit',
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@housseindjirdeh housseindjirdeh left a comment

Choose a reason for hiding this comment

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

Thanks again matey, appreciate this - it looks awesome 🎉

@housseindjirdeh housseindjirdeh merged commit f23cc70 into gitpoint:master Aug 20, 2017
@reyhansofian
Copy link
Contributor Author

thanks guys! 👍

@reyhansofian reyhansofian deleted the feature/follow-star-status branch September 16, 2017 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants