-
Notifications
You must be signed in to change notification settings - Fork 602
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
Show user details. #416
Show user details. #416
Conversation
I broke ground on this, but it's late at night and I should stop before I write anti-code. I'll mark when this is in a reviewable state! |
OK, there's some actual code here if anyone wants to take a look at it! |
Thanks! Do you have some screenshots as well to take a look? r? @steveklabnik |
I don't at the moment; my local install data has no packages, and because this involved a backend change, I couldn't use the staging data. |
OOOOHHH. Let me see if I can get you a screenshot, I have some hacked together data locally I think :) So excited for this! |
What URLs am I supposed to be able to visit with this code? I'm having trouble telling :-/ It looks like if there is a user in the database with gh_login "carols10cents", that I should be able to go to The first problem is that if I'm not logged in, I get told I must be logged in to proceed. But a page of a person or teams' crates should be public, just like a crate's page is, right? If I log in and go to It looks like when I go to If instead I try to use the users.id number in the URL, like Here are some relevant entries in my database:
|
Yeah, the intended paths are The auth-required was an oversight, sorry! The search-by-username not user-id was also an oversight, but of a different sort; I couldn't see that that wasn't working without test data, but I've fixed it now. I'd love it if you could take another look. How have you set up local data for testing this? I'd love to not be shooting in the dark! |
It's... pretty ad-hoc. I have a script that imports half the information from the crates index, but then I decided that was a bad idea, but that got me the crates and their versions. I just inserted a few records straight into my database with |
Taking another look-- I can indeed visit http://localhost:4200/users/carols10cents/crates now without being logged in, yay! And it's saying "Displaying 1 of 1 total results" instead of all of them, yay! Only problem is... that's all it says, I don't actually see any crates. I do see the crate I expect to see in the json response for http://localhost:4200/api/v1/crates?page=1&per_page=10&sort=alpha&user_id=3&_=1472592537012, so something might not be hooked up right? And when I try to go to http://localhost:4200/users/carols10cents/, I get an error that says "Assertion Failed: You cannot pass Let me create a file of some data that you should be able to import into your database, 1 min :) |
Thanks for all this feedback! I'll get some sample data so I'm not requiring you to test for me, and get this working. Adding [WIP] tag again. |
Here's a bit of the data I was using-- after migrating your database, you should be able to import it by running I created two users, you and me, and three crates-- one that we each own individually and one that we own jointly. Each crate has only one version. I didn't add any crates owned by teams since it looks like you're just working on users right now :) |
Thanks, that data was really helpful. I have placeholder text in the user profile right now; I'm not sure what that page should show. Do you have any suggestions? |
The intent is to eventually be able to go to a user's profile page and see a list of their crates. See rust-lang#409.
cd3f29b
to
1d9cbac
Compare
Could we get a screenshot? |
import PaginationMixin from '../../mixins/pagination'; | ||
|
||
const { computed } = Ember; | ||
// TODO: reduce duplicatoin with controllers/crates |
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.
small note here; eventually, controllers are going away in Ember, so this might be extra-fine for now :)
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.
Yeah; I've been trying to train myself out of them, with little success so far!
Okay, thanks @wlonk ! This looks great overall. Just one question before merging... I wonder what we should put instead of "generic info here." |
Yeah, I asked @carols10cents that upthread, too. I don't really know. We might want to just make the user detail page be their list of crates for now, if we don't have any profile information to show. I can do that tonight if I get a 👍 on it. |
Yeah, I think the two pages could totally be merged, and just list someone's crates on their user page. That's all I'd like to know for now! |
We don't need a distinct user profile page at the moment.
@carols10cents bump! I'd love it if you could get a chance to look at this. Thanks! |
The user pages look great to me locally!!! 2 things about links:
It's really really close!!! |
Changes incorporated. Thanks for shepherding me through this. I'm curious whether you think it'd be worth adding a link to the user's GitHub page on their Crates profile, perhaps via a GitHub logo somewhere in the profile header area. |
That sounds like a good idea! I personally don't often use a github link to a person/org from crates.io, but I could see cases in which it'd be useful. There's also a desire to have other ways to create a crates.io account without github in the future, so a github logo that could optionally be there or not if github is connected to that person would be awesome (as opposed to making the github link like, the username, or something else that couldn't accommodate multiple links to different places in the future). |
That's what I'm thinking, yeah—the "if there's a linked GitHub profile, show a GitHub logo with that link" and, for now, there will always be a linked GitHub profile. |
OK, I've added a GitHub profile link using their mark. Unfortunately, my local dev setup fell down for reasons that are unclear to me at the moment, so I can't provide a screenshot! |
i got u fam! We're getting into the REALLY REALLY picky now: the github logo is smooshing up reaaal close to the username: I think this could be fixed by adding a similar padding-right to I saved the whole webpage and threw it in a repo to maybe make it easier for you to play with the CSS, maybe? Repo: https://github.com/carols10cents/cratesio-page and rendered gh-pages: https://carols10cents.github.io/cratesio-page/ So incredibly close!! I can't wait til this is deployed!! |
Ok I am r+ on this but I don't actually have the power to r+ ;) |
Bump? |
@bors: r+ I like it too, thanks so much, and sorry about the latency in reviewing. |
Oh wait, we don't use bors on crates.io. 😄 |
@steveklabnik It's OK! I just didn't want that open loop to stay open in my head. Thanks for merging! |
The intent is to eventually be able to go to a user's profile page and see a list of their crates.
See #409.
Every pull request comes with a cute animal:
From http://www.zooborns.com/zooborns/2015/10/houston-zoo-cares-for-valuable-new-gem-opal.html