1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 19:32:55 +08:00
osu-lazer/osu.Game.Tests
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
..
Audio Remove the nullable disable annotation in the test project. 2022-07-31 22:02:07 +08:00
Beatmaps Merge pull request #31306 from bdach/aspire-slider-breakage 2025-01-07 11:50:18 +09:00
Chat Avoid ChatAckRequest failures flooding console in OsuGameTestScenes 2024-05-30 17:37:55 +09:00
Collections/IO Automated pass 2023-06-24 01:00:03 +09:00
Database Merge branch 'master' into beatmap-info-purge 2024-11-22 18:47:32 +09:00
Editing Remove unused method 2025-02-03 14:01:51 +01:00
Extensions Add own fixed copy of defective Humanizer methods 2022-07-18 21:37:31 +02:00
Gameplay Make CreateJudgement public again and add remarks 2024-02-16 20:24:02 +03:00
Input Rename enum to non-plural now that it won't conflict 2024-10-01 19:55:46 +09:00
Localisation Automated pass 2023-06-24 01:00:03 +09:00
Models Make ScoreInfo.BeatmapInfo nullable 2023-07-04 14:50:34 +09:00
Mods Add failing test coverage 2024-07-30 08:39:01 +02:00
NonVisual Add fail cases to unstable rate incremental testing 2025-01-29 17:10:05 +09:00
Online Fix inspection 2025-02-04 18:24:57 +09:00
OnlinePlay Enable NRT for multiplayer and playlists 2024-11-21 20:32:09 +09:00
Resources Move metadata randomisation local to usage 2025-02-06 14:07:50 +09:00
Rulesets Make CreateJudgement public again and add remarks 2024-02-16 20:24:02 +03:00
Scores/IO Add failing tests for looking up users by online ID if present when importing scores 2024-05-06 13:24:24 +02:00
ScrollAlgorithms Automated #nullable processing 2022-06-17 16:37:17 +09:00
Skins Fix skin deserialisation test 2025-01-16 15:34:49 +01:00
Testing Add missing ruleset shader tests 2023-05-02 11:55:05 +03:00
Utils Merge branch 'master' into selection-center 2024-09-27 09:30:36 +02:00
Visual Refactor selection and activation handling 2025-02-06 17:02:44 +09:00
CodeAnalysis.tests.globalconfig Convert legacy ruleset to globalconfig 2024-11-28 19:34:56 +08:00
ImportTest.cs Fix ImportTest.TestOsuGameBase having null ruleset 2024-02-11 11:16:54 +03:00
osu.Game.Tests.csproj Upgrade more packages again 2025-01-08 03:13:11 +09:00
WaveformTestBeatmap.cs Refactor IWorkingBeatmap.Background to GetBackground() 2023-06-08 16:19:32 +09:00