1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-12 15:37:18 +08:00

13 Commits

Author SHA1 Message Date
Dean Herbert
d8f3dbf988
Merge branch 'master' into carousel-v2-implement-designs 2025-02-07 19:37:06 +09:00
Dean Herbert
024fbde0fd
Refactor selection and activation handling
I had a bit of a struggle getting header traversal logic to work well.
The constraints I had in place were a bit weird:

- Group panels should toggle or potentially fall into the prev/next
  group
- Set panels should just traverse around them

The current method of using `CheckValidForGroupSelection` return type
for traversal did not mesh with the above two cases. Just trust me on
this one since it's quite hard to explain in words.

After some re-thinking, I've gone with a simpler approach with one
important change to UX: Now when group traversing with a beatmap set
header currently keyboard focused, the first operation will be to reset
keyboard selection to the selected beatmap, rather than traverse.

I find this non-offensive – at most it means a user will need to press
their group traversal key one extra time.

I've also changed group headers to always toggle expansion when doing
group traversal with them selected.

To make all this work, the meaning of `Activation` has changed somewhat.
It is now the primary path for carousel implementations to change
selection of an item. It is what the `Drawable` panels call when they
are clicked.

Selection changes are not performed implicitly by `Carousel` – an
implementation should decide when it actually wants to change the
selection, usually in `HandleItemActivated`.

Having less things mutating `CurrentSelection` is better in my eyes, as
we see this variable as only being mutated internally when utmost
required (ie the user has requested the change). With this change,
`CurrentSelection` can no longer become of a non-`T` type (in the
beatmap carousel implementation at least).

This might pave a path forward for making `CurrentSelection` typed, but
that comes with a few other concerns so I'll look at that as a
follow-up.
2025-02-06 17:02:44 +09:00
Salman Alshamrani
78cd093a47 Fix broken input handling with structural changes 2025-02-06 02:44:40 -05:00
Salman Alshamrani
134e62c39a Abstractify beatmap panel piece and update all panel implementations 2025-02-06 02:21:34 -05:00
Salman Alshamrani
aab4a79ce4 Push all beatmap panels to hide their tails 2025-02-05 22:37:03 -05:00
Salman Alshamrani
72a62b70c4 Simplify some code 2025-02-05 22:25:39 -05:00
Salman Alshamrani
206b5c93c0 Implement beatmap set header design 2025-02-05 08:16:41 -05:00
Salman Alshamrani
c389dbc711 Extend panel input area to cover gaps 2025-02-05 05:20:26 -05:00
Dean Herbert
599b59cb14
Add expanded state to sample drawable representations 2025-02-04 18:06:16 +09:00
Dean Herbert
d74939e6e9
Fix backwards traversal of groupings and allow toggling groups without updating selection 2025-02-03 02:24:27 +09:00
Bartłomiej Dach
55ab3c72f6
Remove unused field 2025-01-24 15:15:50 +01:00
Dean Herbert
82c5f37c2c
Remove selection animation on set panel 2025-01-24 22:45:08 +09:00
Dean Herbert
175eb82ccf
Split out beatmaps and set panels into two separate classes 2025-01-24 20:10:41 +09:00