Fix song select background preview when clicking on the beatmap info area / leaderboard#38105
Fix song select background preview when clicking on the beatmap info area / leaderboard#38105austin19moore wants to merge 4 commits into
Conversation
…beatmap details area / leaderboard in song select.
|
Seems fine as long as it doesn't regress any behaviours |
bdach
left a comment
There was a problem hiding this comment.
First of all, this should have visual tests. Fixing these sorts of subtle input handling issues without test coverage leads to inadvertent regressions later.
Secondly, this seems way too complicated and unidiomatic for what it should be. On a quick check this should be no more than the following:
diff --git a/osu.Game/Graphics/UserInterfaceV2/ShearedDropdown.cs b/osu.Game/Graphics/UserInterfaceV2/ShearedDropdown.cs
index af69aefaaf..ac974719e2 100644
--- a/osu.Game/Graphics/UserInterfaceV2/ShearedDropdown.cs
+++ b/osu.Game/Graphics/UserInterfaceV2/ShearedDropdown.cs
@@ -50,6 +50,8 @@ public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
{
}
+ protected override bool OnMouseDown(MouseDownEvent e) => true;
+
protected partial class ShearedDropdownMenu : OsuDropdown<T>.OsuDropdownMenu
{
public ShearedDropdownMenu()
diff --git a/osu.Game/Screens/Select/BeatmapLeaderboardScore.cs b/osu.Game/Screens/Select/BeatmapLeaderboardScore.cs
index bb96c97d52..6c03efb9dd 100644
--- a/osu.Game/Screens/Select/BeatmapLeaderboardScore.cs
+++ b/osu.Game/Screens/Select/BeatmapLeaderboardScore.cs
@@ -534,6 +534,8 @@ protected override void OnHoverLost(HoverLostEvent e)
base.OnHoverLost(e);
}
+ protected override bool OnMouseDown(MouseDownEvent e) => true;
+
private void updateState()
{
var lightenedGradient = ColourInfo.GradientHorizontal(backgroundColour.Opacity(0).Lighten(0.2f), backgroundColour.Lighten(0.2f));
diff --git a/osu.Game/Screens/Select/BeatmapLeaderboardWedge.cs b/osu.Game/Screens/Select/BeatmapLeaderboardWedge.cs
index 56d23dd154..0987d17b4e 100644
--- a/osu.Game/Screens/Select/BeatmapLeaderboardWedge.cs
+++ b/osu.Game/Screens/Select/BeatmapLeaderboardWedge.cs
@@ -16,7 +16,6 @@
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
-using osu.Framework.Input.Events;
using osu.Framework.Threading;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
@@ -88,13 +87,6 @@ public partial class BeatmapLeaderboardWedge : VisibilityContainer
private const float personal_best_height = 112;
- // Blocking mouse down is required to avoid song select's background reveal logic happening while hovering scores.
- // Our horizontal alignment doesn't really align with the rest of the sheared components (protrudes a touch to the right) which makes
- // it complicated to handle this at a higher level.
- public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => scoresScroll.ReceivePositionalInputAt(screenSpacePos);
-
- protected override bool OnMouseDown(MouseDownEvent e) => true;
-
private Sample? swishSample;
private readonly List<ScheduledDelegate> scoreSfxDelegates = new List<ScheduledDelegate>();
diff --git a/osu.Game/Screens/Select/LeftSideInteractionContainer.cs b/osu.Game/Screens/Select/LeftSideInteractionContainer.cs
index 4b28213f4e..539aebe93b 100644
--- a/osu.Game/Screens/Select/LeftSideInteractionContainer.cs
+++ b/osu.Game/Screens/Select/LeftSideInteractionContainer.cs
@@ -29,8 +29,6 @@ public LeftSideInteractionContainer(Action resetCarouselPosition)
// as those will usually correspond to other interactions like adjusting volume.
protected override bool OnScroll(ScrollEvent e) => !e.ControlPressed && !e.AltPressed && !e.ShiftPressed && !e.SuperPressed;
- protected override bool OnMouseDown(MouseDownEvent e) => true;
-
protected override void LoadComplete()
{
inputManager = GetContainingInputManager()!;
I have particular problems with the ShearedButton change (what does that have to do with fixing the issue?) and the weird unidiomatic corralling of hover states in BeatmapDetailsArea to determine whether to handle or not handle mouse down events.
|
Reverted the
Blocking OnMouseDown in |
…d preview, cleanup history
- It's spelled `background`. - Wait steps are not measured "in seconds". Each wait step takes `TimePerAction` as defined by the test scene. - Actually assert whether the background was hidden or not by checkign the actual state of one of the components affected by the background reveal (footer).
Meant you could reveal the background via clicking in between the tab items which is really strange.
|
I began to fix this up but then discovered this behaviour: Screen.Recording.2026-06-25.at.12.01.42.movI presume this is bad and should not happen but I do not actually know whether my opinion is correct. @peppy please advise. |
|
I think I'd agree with that dead space not revealing background. |
bdach
left a comment
There was a problem hiding this comment.
Requires behavioral changes as described above
Resolves #37977
Currently, long clicking on the empty background space in the beatmap details area does not trigger the background preview like it does on the song select carousel.
This MR reverts the blanket changes in #33748, and replaces them with logic to filter wanted / unwanted OnMouseDown events in BeatmapDetailsArea.
Any feedback here is appreciated!
Before:
2026-06-17.22-27-53.mp4
After:
2026-06-17.22-25-36.mp4