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
feat(*): status for following users/starring repos #260
Conversation
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.
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.
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? |
Can I give any suggest for following @lex111 ?? |
@andrewda sure, I'll update my branch and add to watcher as well |
Can I edit following, and starring style, for more looks good? @reyhansofian |
oh wait, I'm still working on it @sasongkoadi |
@sasongkoadi please let me know if you still want to add something to this PR |
@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? |
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.
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.
src/locale/languages/en.js
Outdated
@@ -186,6 +186,8 @@ export const en = { | |||
starsTitle: 'Stars', | |||
forksTitle: 'Forks', | |||
forkedFromMessage: 'forked from', | |||
starred: 'Starred', | |||
watched: 'Watched', |
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.
"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> |
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.
Needs translation.
@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. |
@andrewda OK, will do! |
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.
This looks great!
@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? |
@lex111 yeah, it will break into newline. I'm not sure how to do that in RN tho 😞 |
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. |
I do not know for sure, but what think @andrewda @housseindjirdeh? |
Not sure. I think I kinda prefer expanding the width, but either way works. |
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.
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', | |||
}, |
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.
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
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.
will do
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.
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.
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.
I just realised that we have France translation. I will add the followYou
key there
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.
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.
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.
@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)); |
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.
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.
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.
exactly! I'll remove that action on follower-list.screen
. Thanks for pointing out 👍
}, | ||
{ | ||
"login": "reyhansofian", | ||
"name": "Reyhan Sofian", |
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.
❤️
src/config/colors.js
Outdated
@@ -12,6 +12,7 @@ export const colors = { | |||
greyMidLight: '#f6f8fa', | |||
greyVeryLight: '#fbfbfb', | |||
lightGreen: '#00FF00', | |||
paleGreen: '#359d68', |
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.
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 😂
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.
naming is hard 😂 how about lighterBoldGreen
? 🙈
Very nice! |
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.
Nice work dude :)
@@ -161,6 +161,9 @@ export const fr = { | |||
followingList: { | |||
title: 'Following', | |||
}, | |||
followYou: { | |||
title: 'Vous suit', |
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.
Thanks again matey, appreciate this - it looks awesome 🎉
thanks guys! 👍 |
Issue #159
Starred
status belowStars
on repo screenFollowing
status belowFollowing
on user screenPreview