This also allows *all* panels to be re-used based on equality, as
originally intended. Beatmap updates should be handled correctly without
a full (flashing) recreation of panels now.
This is a minimal implementation in order to keep moving forward.
For simplicity I've copied over the old implementation verbatim. Note
that this is beatmap*set* based randomisation, which means that when
panels are split up by difficulty, it is still randomising by set (with
the difficulty choice being left up to the user recommendation system).
I think this is what we want, but if it isn't, any changes can come
later.
This isn't used visually for context menus, but is handy to have when
using this class to convey more general information about actions,
including usages outside of context menus where an icon is relevant to
have.
Previously, carousel panels would appear immediately at their required Y
position. This didn't look great when they appear with other panels
surrounding them.
Now they will spawn in underneath the nearest item before them, making
the animation feel much more correct.
The new carousel implementation was lacking some scroll related
behaviours. This makes sure that post-filter, the selection is
re-centered *unless* the user has scrolled away manually.
This matches the old carousel's behaviour. See
https://github.com/ppy/osu/pull/16647 for original implementation.
Closes https://github.com/ppy/osu/issues/33052.
This also fixes code running in `Update` which shouldn't be, by
consuming the new `NewItemsPresented` callback.
Fields and properties are renamed to knock some sense into things (was
previously called two or three different things).
The original `IEnumerable` flow prioritised slight performance gains,
but a filter's implementation could actually make this detrimental to
overall performance.
I noticed in passing that there were already potentially multiple
enumerations, via `updateYPositions` and the final `ToList` call. Rather
than faffing around, let's keep things simple and require lists.
In benchmarking, the difference is (currently) negiligible. Slight
improvement if anything.