-
Notifications
You must be signed in to change notification settings - Fork 82
Link to statsviewer player #241
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
Conversation
|
ok now how do I select something from the list programmatically 😭 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #241 +/- ##
==========================================
- Coverage 32.16% 32.16% -0.01%
==========================================
Files 118 118
Lines 8132 8133 +1
==========================================
Hits 2616 2616
- Misses 5516 5517 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
probably easier to do this completely on the frontend - e.g. have the onLoad handler parse the URI, see if a player is specified, and then just select it with statsViewer.selectArbitrary() |
|
that sounds like a way better idea lol. will look at it at some point tonight |
|
Made those changes, but now to actually select the user with |
|
LOL I pressed the wrong button |
|
ok i'm 90% sure will do some more digging and maybe find a cool method that solves this later (🙏🙏🙏🙏). alternatively i can just change the score and rank to not use currentlySelected idk maybe we'll see |
|
Here I made a new endpoint that returns a RankedPlayer object for the given id. I picked RankedPlayer because I think its the lightest player struct with a rank, but if you want me to change this to FullPlayer or something let me know :) |
|
opened a PR for documentation aswell |
|
this is pretty much done! let me know if you need me to change anything :D |
|
Hey @sphericle, I've gone ahead and implemented the whole "include rank in |
85148ad to
0a33299
Compare
|
Can confirm that it does work now, thanks :) |
stadust
left a comment
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!
Now that we have the deep links in place, maybe we can go a bit further still, and turn all the player names on the record lists on the demon pages into stats viewer deep links? :o
pointercrate-demonlist-pages/static/js/statsviewer/individual.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Patrick <43299462+stadust@users.noreply.github.com>
|
Added the deep links to the record list. I'm personally a bit iffy on putting the link on the record's username, as I think most people are used to the completion link being there, but ig it's pretty obvious that you can just click "youtube" and go to the video anyways |
Ah, I completely forgot it did that. And it needs to continue doing that because on mobile, the "youtube" column doesn't exist, ugh. Maybe we can just move the youtube link to the percentage in that case (and actually style it like a link)? People will grumble, and it'll take some time getting used to, but I really wanna start sprinkling these stats viewer deep links in there haha. |
|
Yup, that's essentially what I was trying to get at with my half-asleep ramblings last night haha. Thanks for the mockup, Jason!
|
new.mp4I added the styling to the whole percentage text because it was easier lol, but i can take a closer look at only putting it on the little box icon if needed |
zero is false-y, so it was triggering the path for "malformed player id". Does not really make a difference because there will never be a player with id 0, but oh well. Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
Otherwise it'll just stick around forever, which is a bit annoying if someone clicks a stats viewer link for a non-existing player. Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
- remove copy-to-clipboard when clicking player name. The on-hover underlining was causing the flags to resize, and now that the URL gets updated, one can just copy the link from the browser (which is a bit more intuitive imo, as nothing was really indicating that the clipboard functionality was there, or that "add to clipboard" was actually what happened when the name was clicked) - Gave small visual indication that player names on demon pages can be clicked by underlining them. Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
By using direct stats viewer links, its possible to pull up players that have no score, and hence no rank. Display rank as '-' for these. Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>

closes #222
License Acceptance
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.