-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Mod customization header/panel changes #29626
Conversation
@Fabep any reason this is marked as a draft? |
I have big suspicions this just straight up breaks mobile btw. Haven't confirmed yet. |
@peppy I have no clue 😎 I probably should have attempted at adding some sort of expansion of the panel with the touchdown / touchend? event, but it didn't cross my mind until I read bdach's comment just now. |
Reading it, I can't see how it would break mobile. But either way let's just undraft it for proper review. |
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.
Haven't tested mobile but seems fine otherwise?
Touch was likely working only by way of the touch-to-synthesised-click pathway, which is evidenced further by stuff like this: osu/osu.Game/Overlays/Mods/ModCustomisationHeader.cs Lines 117 to 121 in 363fc0d
osu/osu.Game/Overlays/Mods/ModCustomisationHeader.cs Lines 132 to 133 in 363fc0d
So if my hunch is correct then the panel just won't open on mobile at all. |
As expected the previous touch handling would prevent the header from working entirely when click handling was removed from the header.
As I suspected, this just broke touch completely. 5211e60 should bring the behaviour more or less to parity with desktop: Record_2024-09-02-11-37-04_25a1a32208bbcdc1d450b7aa854bb161.mp4tl;dr: you have to touch the dropdown to open it if it's not forced open by a mod, and touch away from it to close it. Touching the dropdown header when open does nothing which matches desktop. @peppy requesting re-check to make sure this is the UX you are looking for. |
Personally for UI purposes, I believe this to be the only thing that could be improved upon. The hover color is now redundant due to the fact that the only way to open the mod customization panel is through the hover (or force open by mod). It would be more clear and "cleaner" to bind the color to it being active or not, e.g dark when collapsed and light when expanded. I've tried implementing it with the following code snippet inside of the ModCustomisationHeader class. protected override void LoadComplete()
{
...
panel.ExpandedState.BindValueChanged(v =>
{
IdleColour = v.NewValue switch
{
ModCustomisationPanelState.Expanded or
ModCustomisationPanelState.ExpandedByMod => colourProvider.Light4,
_ => colourProvider.Dark3,
};
}, true);
...
} However when I try it functionally it works like the following: 2024-09-02.13-33-22.mp4This could probably be it's own PR if it's not an easy implementation or just not implemented at all it's just a preference after all 😃 |
…el rather than the hover of the container.
… here into the commit instead ;
I'm reverting the colour changes. Please make them in a separate PR or something. They look weird and your code formatting is wrong. |
Removed on click event for the mod customization header, As of #29618 .
Renamed ModCustomisationPanelState, since only mods set the "old" Expanded panel state.
Further suggestions that could be applied to this area: