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

More readable URL's and private profile name visibility fix #100

Merged
merged 3 commits into from
Jul 31, 2019

Conversation

j9peters
Copy link
Collaborator

Include slugified user name in user URL's
Links to projects in project lists now contain project slugs
A user with private profile visibility can now view their own name in project listings when they are logged in

Issue #12 More readable URLs
Resolves issue #97 Authors shown as "Anonymous" on the project list page when full author name should be visible

Co-authored-by: EL246 [email protected]

Copy link
Owner

@jasonaowen jasonaowen left a comment

Choose a reason for hiding this comment

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

Thank you for working on this, @j9peters and @EL246 ! Sorry it took me so long to get to it.

The code quality and structure all looks great to me; I just have one question below about the functionality.

@@ -15,7 +15,7 @@ public static DisplayAuthor fromUserForUser(
) {
switch(sourceUser.getProfileVisibility()) {
case PRIVATE:
if (sourceUser == requestingUser) {
if (sourceUser.equals(requestingUser)) {
Copy link
Owner

Choose a reason for hiding this comment

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

Thank you for catching and fixing this! And thank you for calling it out in a separate commit.

);
}

private static DisplayAuthor useInternal(User user) {
String slug = slugify.slugify(user.getInternalName());
Copy link
Owner

Choose a reason for hiding this comment

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

I think we had talked about using the public name throughout for profile slugs, regardless of whether or not the viewer is logged in... or at least, that's what I wrote down after our discussion! I'm fine with going with this instead, but I just wanted to double-check that it was intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this was intentional. We decided to use internal info for a user's pages when they are logged in. So I'm good with this, I guess we just need a confirmation from @EL246. :)

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks, @j9peters! I'm not sure we need to block on @EL246 responding, but I'll wait until tomorrow before merging.

@jasonaowen
Copy link
Owner

Ah sorry, it looks like #94 introduced some changes that conflict with changes in this PR; the conflicts will need to be resolved before this can be merged. Please rebase onto master and fix the merge conflicts git complains about. Let me know if you'd like any help resolving them, or if you'd like me to just handle it!

j9peters and others added 3 commits July 30, 2019 19:45
Issue jasonaowen#12 More readable URL's

Co-authored by:  EL246 <[email protected]>
… in project listings when they are logged in.

resolves issue jasonaowen#97 Authors shown as "Anonymous" on the project list page when full author name should be visible

Co-authored-by: j9peters <[email protected]>
issue jasonaowen#12 More readable URLS

Co-authored-by: j9peters <[email protected]>
@j9peters j9peters force-pushed the more-readable-user-urls branch from 69ddb77 to 90dc82c Compare July 31, 2019 03:29
@j9peters
Copy link
Collaborator Author

Merge conflicts resolved!

@j9peters j9peters merged commit dbb7074 into jasonaowen:master Jul 31, 2019
@j9peters j9peters deleted the more-readable-user-urls branch July 31, 2019 22:42
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.

3 participants