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

HitResults with the same name show across two columns in beatmap rankings #29911

Closed
peppy opened this issue Sep 18, 2024 Discussed in #29904 · 2 comments · Fixed by #30245
Closed

HitResults with the same name show across two columns in beatmap rankings #29911

peppy opened this issue Sep 18, 2024 Discussed in #29904 · 2 comments · Fixed by #30245
Labels
area:overlay-beatmap priority:1 Very important. Feels bad without fix. Affects the majority of users. type:cosmetic

Comments

@peppy
Copy link
Member

peppy commented Sep 18, 2024

Discussed in #29904

Originally posted by 424ever September 18, 2024
When looking at the scores on this map in game, there are 2 columns labeled as "Slider End". I think these should be combined into a single column.
image
There is (currently) only one score which uses the left column, which was set on Lazer with the Classic mod.
image


This is awkward as hell to attempt to fix.

Relevant code:

case HitResult.SliderTailHit:
case HitResult.SmallTickHit:
return "slider end";

var allScoreStatistics = scores.SelectMany(s => s.GetStatisticsForDisplay().Select(stat => stat.Result)).ToHashSet();
var ruleset = scores.First().Ruleset.CreateInstance();
foreach (var result in EnumExtensions.GetValuesInOrder<HitResult>())
{
if (!allScoreStatistics.Contains(result))
continue;
// for the time being ignore bonus result types.
// this is not being sent from the API and will be empty in all cases.
if (result.IsBonus())
continue;
var displayName = ruleset.GetDisplayNameForHitResult(result);
columns.Add(new TableColumn(displayName, Anchor.CentreLeft, new Dimension(minSize: 35, maxSize: 60)));
statisticResultTypes.Add((result, displayName));
}
if (showPerformancePoints)
columns.Add(new TableColumn(BeatmapsetsStrings.ShowScoreboardHeaderspp, Anchor.CentreLeft, new Dimension(GridSizeMode.Absolute, 30)));
columns.Add(new TableColumn(BeatmapsetsStrings.ShowScoreboardHeadersTime, Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)));
columns.Add(new TableColumn(BeatmapsetsStrings.ShowScoreboardHeadersMods, Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)));
return columns.ToArray();

Could group by localisable string base string, but it makes things very fiddly (currently it's pre-checking stats across all scores to be displayed, so it kinda has to happen before that). Would want a second opinion before attempting this.

@bdach
Copy link
Collaborator

bdach commented Sep 19, 2024

Not sure it helps, but for reference this is how judgement counter handles the exact same problem right now:

// Due to weirdness in judgements, some results have the same name and should be aggregated for display purposes.
// There's only one case of this right now ("slider end").
foreach (var group in ruleset.Value.CreateInstance().GetHitResults().GroupBy(r => r.displayName))

@peppy
Copy link
Member Author

peppy commented Sep 27, 2024

Not sure it helps, but for reference this is how judgement counter handles the exact same problem right now

Yeah I found this in passing, but still a bit of a pain to implement.

@peppy peppy added the priority:1 Very important. Feels bad without fix. Affects the majority of users. label Sep 27, 2024
424ever added a commit to 424ever/osu that referenced this issue Oct 12, 2024
@bdach bdach closed this as completed in dcd3e51 Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:overlay-beatmap priority:1 Very important. Feels bad without fix. Affects the majority of users. type:cosmetic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants