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

Navigate to AuthProfileScreen for the Current User #247

Closed
wndisra opened this issue Aug 13, 2017 · 11 comments
Closed

Navigate to AuthProfileScreen for the Current User #247

wndisra opened this issue Aug 13, 2017 · 11 comments

Comments

@wndisra
Copy link
Contributor

wndisra commented Aug 13, 2017

Current process

  • I could find my own profile via Search menu navigation (for Users) and try to follow myself via triple dots menu "..." (at top right corner of the screen).
    screen shot 2017-08-13 at 8 53 46 pm

Suggestion

  • How about we remove that menu if the profile that we searched for is our own profile?

What do you guys think? @housseindjirdeh @andrewda

@andrewda
Copy link
Member

I think there's another issue for redirecting you to our AuthProfile if you're on your own user profile.

@wndisra
Copy link
Contributor Author

wndisra commented Aug 13, 2017

Wait, I still don't get it. So, we just need to redirect to profile page if we click on our own user profile in the search list? Is that exactly what we need to do? @andrewda

@andrewda
Copy link
Member

andrewda commented Aug 14, 2017

Any time the user clicks on their own profile from anywhere, it should send them to the AuthProfile page (the page that shows up when you click the profile icon in the bottom right).

@housseindjirdeh
Copy link
Member

housseindjirdeh commented Aug 14, 2017

Yep thanks for this @wlisrausr.

So there are two screens, AuthProfileScreen and UserProfileScreen. The AuthProfileScreen shows additional information and a settings cog na instead of the three dots. We just need to conditionally make sure anytime the user tries to navigate to their own profile it takes them to AuthProfileScreen and not the other one.

Can't seem to find the other issue @andrewda. If it doesn't exist (or we closed it prematurely), happy to have that functionality worked out as part of this ticket :)

@andrewda
Copy link
Member

Ok @housseindjirdeh, thinking back now I think it was a comment on an issue or PR a while back.

@wndisra
Copy link
Contributor Author

wndisra commented Aug 14, 2017

Ok. I'll work on it. Thanks a lot for your complete explanation @housseindjirdeh.

@lex111
Copy link
Member

lex111 commented Aug 14, 2017

@wlisrausr I did similar in PR #211, but apparently missed the search results, you can see this PR and fix it.

@wndisra
Copy link
Contributor Author

wndisra commented Aug 14, 2017

Great! That's exactly what I need. Thanks @lex111. I'll fix it

@andrewda
Copy link
Member

Haha guess that's where I saw it @lex111 🙃

@wndisra wndisra changed the title Remove Triple Dots "..." Menu with Condition Navigate to AuthProfileScreen from SearchScreen for the Current User Aug 14, 2017
@housseindjirdeh
Copy link
Member

So it's the userListItemcomponent where we'll probably want to update this instead of specifically SearchScreen (right [here])https://github.com/gitpoint/git-point/blob/master/src/components/user-list-item.component.js#L114-L116) and here). This is because screens like FollowersListScreen and FollowingListScreen can show yourself as a user where if clicked should also navigate to the authenticated user's profile.

I think it might be worthwhile to just make UserListItem stateful and mapped to the state.auth.user in order to conditionally navigate to AuthProfile or Profile. That way any screen that uses this component will navigate correctly.

@housseindjirdeh housseindjirdeh changed the title Navigate to AuthProfileScreen from SearchScreen for the Current User Navigate to AuthProfileScreen for the Current User Aug 16, 2017
@wndisra
Copy link
Contributor Author

wndisra commented Aug 16, 2017

Yes, that's exactly what I thought. I'm working on it and thanks to make it more clearly @housseindjirdeh

wndisra added a commit to wndisra/git-point that referenced this issue Aug 16, 2017
Previously the current user could find and follow himself
from the search screen.
Need to navigate the current user to auth profile screen.

Closes: gitpoint#247
housseindjirdeh pushed a commit that referenced this issue Aug 16, 2017
* fix(*): fix current user navigation

Previously the current user could find and follow himself
from the search screen.
Need to navigate the current user to auth profile screen.

Closes: #247

* refactor(*): change repeated logic

* refactor(*): change variable style & remove ternary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants