1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-24 05:03:22 +08:00
osu-lazer/osu.Game.Tests/Visual/SongSelect
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
..
BeatmapCarouselV2TestScene.cs Move selected retrieval functions to base class 2025-02-06 16:48:17 +09:00
TestSceneAdvancedStats.cs Decouple AdvancedStats from global mods 2024-10-10 14:22:16 +02:00
TestSceneBeatmapCarousel.cs Remove BeatmapCarousel testing backdoor 2024-12-11 16:28:51 +09:00
TestSceneBeatmapCarouselV2.cs Reorganise tests to make more logical when manually testing 2025-02-06 15:09:41 +09:00
TestSceneBeatmapCarouselV2ArtistGrouping.cs Refactor selection and activation handling 2025-02-06 17:02:44 +09:00
TestSceneBeatmapCarouselV2DifficultyGrouping.cs Refactor selection and activation handling 2025-02-06 17:02:44 +09:00
TestSceneBeatmapCarouselV2NoGrouping.cs Refactor selection and activation handling 2025-02-06 17:02:44 +09:00
TestSceneBeatmapCarouselV2Scrolling.cs Refactor selection and activation handling 2025-02-06 17:02:44 +09:00
TestSceneBeatmapDetails.cs Partial everything 2022-11-27 00:00:27 +09:00
TestSceneBeatmapInfoWedge.cs Update test 2024-11-11 16:25:05 +09:00
TestSceneBeatmapLeaderboard.cs Add test coverage of stores stored in database as well 2023-02-08 15:38:07 +09:00
TestSceneBeatmapMetadataDisplay.cs Apply NRT in MemoryCachingComponent test-only subclasses 2023-06-09 13:48:42 +02:00
TestSceneBeatmapOptionsOverlay.cs Automated pass 2023-06-24 01:00:03 +09:00
TestSceneBeatmapRecommendations.cs Mark recommendation test as flaky 2025-01-07 17:58:12 +09:00
TestSceneFilterControl.cs Remove unused using directive 2024-01-15 12:33:25 +01:00
TestScenePlaySongSelect.cs Remove BeatmapCarousel testing backdoor 2024-12-11 16:28:51 +09:00
TestSceneSongSelectFooter.cs Partial everything 2022-11-27 00:00:27 +09:00
TestSceneTopLocalRank.cs Fix TestSceneTopLocalRank 2023-05-19 14:06:56 +09:00
TestSceneUpdateBeatmapSetButton.cs Remove BeatmapCarousel testing backdoor 2024-12-11 16:28:51 +09:00
TestSceneUserTopScoreContainer.cs Automated pass 2023-06-24 01:00:03 +09:00