Improve animation of new song select footer buttons (and fix "options" button behaviour)
- Part of #22204
- [x] Depends on #28141 (since
FooterButtonV2is touched in there)
Changed to match animations of ShearedButton. Not a good idea to inherit from it since the footer button designs differ from ShearedButton slightly + we don't want the scale-in effect in footer buttons.
I have also fixed the "options" button not actually hiding when pressing on it while in open state. I'm not entirely sure about my approach but, well...it works™.
Preview:
https://github.com/ppy/osu/assets/22781491/f302043f-aefa-479e-994d-b54ab5dc8ccc
I have also fixed the "options" button not actually hiding when pressing on it while in open state.
When I was implementing that, I mostly was following other popovers triggered by a button (e.g. add preset button). Pressing the button while the popover is open triggers the DismissOnMouseDownContainer on PopoverContainer first then the button action which opens the popover again. I've found that behavior weird and expected toggling like done locally with options button.
Well, yeah, that's what I'm achieving in this PR, having it not open the popover again when clicking on the button while it's already in an open state.
I dunno, I didn't mind it reopening each click personally.
Hmm, to me it's an established behaviour that clicking on anything that opens something should close it if it's already open (e.g. dropdowns, toolbar toggle buttons). In addition, keeping the behaviour as-is will already introduce an inconsistency against the "mods" button, since that also acts like a toggle (closes when clicking if open...or at least that's how it's supposed to behave).
I guess you could make the "options" button not behave like a toggle altogether, but still, it feels off to me.
It's fine to change it. All the places in operating systems which had behaviour similar to how this used to behave (prior to this PR) have disappeared over the last decade so it does seem like the correct direction.
Well, yeah, that's what I'm achieving in this PR, having it not open the popover again when clicking on the button while it's already in an open state.
What I was trying to convey is other popovers opened with buttons should also be changed to this new behavior for consistency.
keeping the behaviour as-is will already introduce an inconsistency against the "mods" button, since that also acts like a toggle (closes when clicking if open...or at least that's how it's supposed to behave
As you said here, the same applies to the add preset button and presets:
https://github.com/ppy/osu/assets/35318437/0f20da05-af2f-412e-9db6-ff38dbbeaed0
I see. For other cases facing the same issue, I would open an issue and/or solve them separately, as long as we agree that the behaviour proposed by this PR is more correct.