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

osu!mania 4k/7k ranking / pp values are not present on profile overlay #30827

Open
peppy opened this issue Nov 22, 2024 Discussed in #30787 · 5 comments · May be fixed by #31084
Open

osu!mania 4k/7k ranking / pp values are not present on profile overlay #30827

peppy opened this issue Nov 22, 2024 Discussed in #30787 · 5 comments · May be fixed by #31084
Labels
area:overlay-user-profile good first issue A good place to start contributing to this project without going too deep. priority:2 Moderately important. Relied on by some users or impeding the usability of the game

Comments

@peppy
Copy link
Member

peppy commented Nov 22, 2024

I guess also on the user card somewhere for the local user?

Discussed in #30787

Originally posted by theredpro-sj November 20, 2024
I'm not very confident in how I worded the title but the basic idea of it is that on the website when hovering global rank in the mania gamemode you also see the users 4k and 7k rank along with their peak rank like in other gamemodes (see first image). This behavior is not replicated on the lazer client as when hovering over global rank it only shows peak rank and doesn't show the 4k and 7k ranks (see second image). Basically I feel that the 4k and 7k breakdown should be shown when hovering over a users global rank like it is on the website.
Screenshot 2024-11-19 at 6 12 39 PM

Screenshot 2024-11-19 at 6 11 39 PM
@peppy peppy added area:overlay-user-profile good first issue A good place to start contributing to this project without going too deep. labels Nov 22, 2024
@peppy peppy changed the title Mania 4k/7k ranking / pp values are not present on profile overlay osu!mania 4k/7k ranking / pp values are not present on profile overlay Nov 22, 2024
@peppy peppy added the priority:2 Moderately important. Relied on by some users or impeding the usability of the game label Nov 22, 2024
@theredpro-sj
Copy link

In an extension to this there is no way to separate the 4k/7k ranking on the ingame leaderboard.
Screenshot 2024-11-22 at 1 30 21 PM

@mESmaC
Copy link

mESmaC commented Nov 29, 2024

I've started looking into this issue and noticed that the UserRankPanel (lines 187-200) contains a TODO for the tooltip, which seems relevant. Adding a breakpoint to the encompassing method confirms it triggers when navigating to the relevant screen. However, I couldn’t find any existing user strings in the UserStrings file for the 4k/7k-specific statistics.

I’ll investigate further to determine how to implement this, but I wanted to confirm: should new strings be added to UserStrings for these statistics, or is there a preferred way to structure this data in the tooltip?

@frenzibyte
Copy link
Member

frenzibyte commented Nov 29, 2024

UserRankPanel is one of many places where this should be supported. Check out all the above screenshots and locate the relevant components and hook up the displays with the values returned from the API.

The lines you mentioned are weakly relevant, they are only relevant in the sense that the UserRankPanel should support hovering over the rank and display the highest rank achieved, along with displaying the 4K/7K-specific ranks.

@chadmoyashii
Copy link

Hello! New dev here. Decided to tackle this issue for a school assignment, however, hit a similar roadblock to what was written above. (I couldn't get the user strings for the 4k/7k statistics) I unfortunately didn't get the code to work, however, I have uploaded my work to my personal repo in case you would like to reference some of the ideas I had. (I also didn't want to create an incomplete PR in this project to waste anyone's time)

https://github.com/chadmoyashii/osu4k7kdisplayissue

Feel free to take a look at it, maybe you'll find some inspiration for when you resolve this issue!

Cheers

@NicholasChin28
Copy link

Hello! First time contributor here. Decided to tackle this issue after noticing similar behavior between the client and web implementation.
After comparing the code, I found that the web version handles the 4K/7K statistics through a Variant mapping in the API response:

interface Variant {
    country_rank: number | null;
    global_rank: number | null;
    mode: Ruleset;
    pp: number;
    variant: '4k' | '7k';
}

Source: user-statistics-json.ts
I've implemented a similar mapping in the UserStatistics class and created a pull request #31084
with the changes. Testing shows the tooltips now display the 4K/7K rankings correctly.
Feel free to check it out and provide any feedback! Happy to make adjustments or have the implementation serve as reference for future solutions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:overlay-user-profile good first issue A good place to start contributing to this project without going too deep. priority:2 Moderately important. Relied on by some users or impeding the usability of the game
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants