Skip to content

Fix difficulty selection behavior when going back from scoped beatmapset select#38023

Open
n-saraseka wants to merge 2 commits into
ppy:masterfrom
n-saraseka:scoped-select-fix
Open

Fix difficulty selection behavior when going back from scoped beatmapset select#38023
n-saraseka wants to merge 2 commits into
ppy:masterfrom
n-saraseka:scoped-select-fix

Conversation

@n-saraseka

@n-saraseka n-saraseka commented Jun 8, 2026

Copy link
Copy Markdown

When a player switches to a ScopedBeatmapSetDisplay, selects a different difficulty than they started at, and then goes back to showing all filtered beatmaps, the song select screen currently switches to the map they started at, which may feel unintuitive to the player, especially when selecting a difficulty that's way lower or way higher in the list. This change aims to fix this behavior and switch to the map they last selected instead.

Before:

2026-06-08.18-58-26.1.mp4

After:

2026-06-08.19-32-38.1.mp4

@n-saraseka n-saraseka changed the title Prioritise queueing beatmap selection to current grouped beatmap Fix difficulty selection behavior in scoped select Jun 8, 2026
@n-saraseka n-saraseka changed the title Fix difficulty selection behavior in scoped select Fix difficulty selection behavior in scoped beatmapset select Jun 8, 2026
@n-saraseka n-saraseka changed the title Fix difficulty selection behavior in scoped beatmapset select Fix difficulty selection behavior when going back from scoped beatmapset select Jun 8, 2026
@n-saraseka n-saraseka marked this pull request as draft June 8, 2026 17:45
@pull-request-size pull-request-size Bot added size/S and removed size/XS labels Jun 8, 2026
if (beforeScopedSelection != null)
queueBeatmapSelection(beforeScopedSelection);
{
var beatmapToSwitchTo = carousel.CurrentGroupedBeatmap ?? beforeScopedSelection;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This won't work the way you're expecting it to. CurrentGroupedBeatmap will not get nulled if the current selection gets hidden by filters, so it will always revert to it, even if it should have reverted to a different selection. You can see it on the second video you've attached at 0:27 - once you unscope, the selection remains at the top diff, even though it is now hidden from view.

@n-saraseka n-saraseka Jun 8, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's the behavior I was expecting when doing this change, similar to how things work when a player selects a map and then filters it out. I'm not sure if there even is a case where it would get nulled in this branch of logic, but I left that as a fallback just in case because CurrentGroupedBeatmap is a nullable property and beforeScopedSelection is guaranteed to be not null here.

Is type casting to a GroupedBeatmap instead the way to go in such situation (even if it's a bit ugly) when it's known to not be null?

@n-saraseka n-saraseka marked this pull request as ready for review June 8, 2026 18:46
@bdach bdach added area:song-select subjective PRs with subjective changes which have not been discussed prior. Need team consensus to proceed. labels Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:song-select size/S subjective PRs with subjective changes which have not been discussed prior. Need team consensus to proceed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants