Commit Graph

47698 Commits

Author SHA1 Message Date
12c3e56881 Fix IPCLocationTest not waiting for load of component
As seen at
https://github.com/ppy/osu/runs/4731480384?check_suite_focus=true.
2022-01-07 19:01:06 +09:00
bf328dc9e0 Merge pull request #16291 from peppy/fix-mods-mutated-outside-lease
Fix `MultiplayerMatchSubScreen` mutating mods outside of bindable lease
2022-01-07 17:12:12 +09:00
ee0a2ce54c Merge pull request #16347 from bdach/fix-toolbox-expand-button
Fix settings toolbox toggle button starting in incorrect state
2022-01-07 11:17:23 +09:00
8f744c99ee Fix settings toolbox toggle button starting in incorrect state
While displaying replays, the colour of the toolbox toggle button would
not match the actual state of the rest of the toolbox, i.e. both buttons
would be white, even though the "playback settings" section was expanded
and as such should have a yellow toggle button.

In the case of the replay player, the failure scenario was as follows:

1. `SettingsToolboxGroup` calls `updateExpanded()` in its BDL to update
   the initial state of the toolbox, including the toggle button
   colour, by adding a colour fade transform.

2. An ancestor of both the toolbox groups - `PlayerSettingsOverlay`,
   which is a `VisibilityContainer` - calls `FinishTransforms(true)` in
   its `LoadCompleteAsync()`, therefore instantly applying the colour
   from point (1) to the toggle button instantly.

3. However, `IconButton` inherits from `OsuAnimatedButton`. And
   `OsuAnimatedButton` changes its colour in `LoadComplete()`, therefore
   undoing the instant application from point (2).

This conjunction of circumstances is instrumental to reproducing the
bug, because if the `FinishTransforms(true)` call wasn't there, point
(3) wouldn't matter - the transform would get applied at some
indeterminate point in the future, ignoring the write from
`OsuAnimatedButton`.

As for the fix, move the `updateExpanded()` call in
`SettingsToolboxGroup` to `LoadComplete()` to avoid the above
unfortunate order. Applying initial visual state in `LoadComplete()` is
the idiomatic style of doing things these days anyhow.
2022-01-06 20:45:56 +01:00
32b6bf64d0 Merge pull request #16342 from peppy/editor-toolbox-expand
Contract editor toolboxes when not in use
2022-01-06 19:31:41 +01:00
f5742d3d2a Merge branch 'master' into editor-toolbox-expand 2022-01-06 19:01:02 +01:00
e02863f780 Avoid accessing DrawWidth from invalidation 2022-01-07 01:24:30 +09:00
f703c5f038 Add comment and reduce how often ChildrenOfType is invoked in ExpandingButtonContainer 2022-01-06 23:38:54 +09:00
5aca2dd4ce Hide header text when it won't fit in the toolbox group 2022-01-06 23:08:50 +09:00
690b425380 Move enum local to usage 2022-01-06 22:56:56 +09:00
cea9cab4dc Use ExpandingButtonContainer in editor composer 2022-01-06 21:10:45 +09:00
5baaf356aa Split out SettingsToolboxGroup from PlayerSettingsGroup 2022-01-06 21:05:00 +09:00
77980196c5 Split out expanding container logic from settings sidebar 2022-01-06 21:02:29 +09:00
a9e4a0fd61 Merge pull request #16328 from peppy/editor-flip-over-origin
Change editor flip hotkeys to perform flips around origin
2022-01-06 10:26:14 +01:00
f0797d4066 Merge branch 'master' into editor-flip-over-origin 2022-01-06 09:59:18 +01:00
1d69eb629c Merge pull request #16327 from peppy/fix-editor-playfield-centering
Fix editor playfield not being centered correctly
2022-01-06 16:11:12 +09:00
243a1a3cf7 Fix incorrect origin specification for SkinSelectionHandler flips 2022-01-06 14:47:44 +09:00
5c0494f3ba Remove unnecessary precondition check and disallow vertical catch flips for now 2022-01-06 14:39:29 +09:00
ee24713002 Fix single sliders not being flippable due to incorrect precondition 2022-01-06 14:37:13 +09:00
e232c7bc85 Merge pull request #6035 from EVAST9919/page-selector
Implement PageSelector component
2022-01-05 22:50:04 +01:00
7d195c4344 Merge branch 'master' into page-selector 2022-01-05 22:23:10 +01:00
6779503e57 Refactor logic to avoid TimelineSelectionHandler having to block base calls 2022-01-05 16:56:54 +09:00
866ae3472b Add global flip hotkeys 2022-01-05 16:48:07 +09:00
13cce50fa7 Remove existing handling of flip hotkeys 2022-01-05 16:30:42 +09:00
ef2a4aed9a Fix editor playfield not being centered correctly
This has come up multiple times, with mappers citing that they have
muscle memory for mapping based on the centre of the playfield being in
the centre of the window.

The original plan was to have a second toolbar on the right hand side of
the screen to balance the padding, but we're not at that point yet.
Easiest solution is to do what stable does and allow the left-hand
toolbar items to overlap the playfield underneath it.

In edge cases where the user is running at an aspect ratio that causes
overlaps, they can choose to collapse the toolbars down. We can probably
work on this UI/UX a bit more as we update designs to be more friendly
to such cases.
2022-01-05 16:05:18 +09:00
2bf6b55b19 Fix failing test due to changed reset page logic 2022-01-05 14:53:32 +09:00
93bcebbcd5 Merge pull request #16321 from peppy/fix-cursor-culture-incorrect
Fix cursors sent to osu-web being potentially string formatted in incorrect culture
2022-01-04 19:27:14 +01:00
5ed69338a6 Add omission of pages when there are too many 2022-01-04 19:05:14 +09:00
86f72b71b1 Prepare tests and general structure to support omission of pages 2022-01-04 18:46:44 +09:00
e75c9519f3 Adjust font weighting on selection 2022-01-04 18:19:23 +09:00
5a11ee7810 Use OverlayColourProvider and fix font weight 2022-01-04 18:14:42 +09:00
d10b8c79b3 Remove pointless test coverage of DrawablePage 2022-01-04 17:53:24 +09:00
ee4f5c0e79 Rename button classes to make more sense 2022-01-04 17:52:40 +09:00
db58f5de8e Clean up unnecessary complexity 2022-01-04 17:51:37 +09:00
5736b7d978 Fix cursors sent to osu-web being potentially string formatted in incorrect culture
Fixed as per solution at https://github.com/JamesNK/Newtonsoft.Json/issues/874.

Note that due to the use of `JsonExtensionDataAttribute` it's not
feasible to change the actual specification to `JValue` in the
`Dictionary`.

In discussion with the osu-web team, it may be worthwhile to change the cursor
to a string format where parsing is not required at our end. We could already
do this in fact, but there are tests that rely on it being a `JToken` so the
switch to `JValue` seems like the easier path right now.
2022-01-04 17:20:46 +09:00
1c899e4402 Fix post-merge issues 2022-01-04 16:46:42 +09:00
69e7ee0f48 Merge branch 'master' into page-selector 2022-01-04 16:44:22 +09:00
39650ce7e9 Merge pull request #16307 from peppy/beatmap-listing-bottom-padding
Add padding to the bottom of the beatmap listing overlay to avoid hovered panels exceeding visible bounds
2022-01-04 14:14:42 +09:00
374dac57f2 Change expanded card content height to 200 2022-01-04 13:22:00 +09:00
2b258e786a Merge pull request #16313 from bdach/fix-listing-terminal-breakage
Fix beatmap listing overlay not expiring content from previous searches
2022-01-04 12:22:47 +09:00
f6b1405fa0 Merge branch 'master' into fix-listing-terminal-breakage 2022-01-04 11:49:02 +09:00
17d56d117e Merge pull request #16314 from bdach/submission-on-exit-test-coverage
Add test coverage of score submission if player is exited during import
2022-01-04 11:46:22 +09:00
7cdba2f7c3 Add test coverage of score submission if player is exited during import 2022-01-03 22:00:47 +01:00
8f335c333c Merge pull request #16278 from peppy/fix-skin-editor-overlay-show-thread-safetyu
Fix calling `SkinEditorOverlay.Show` before the overlay is loaded causing an exception
2022-01-03 20:41:48 +01:00
87fbac15fd Merge branch 'master' into fix-skin-editor-overlay-show-thread-safetyu 2022-01-03 20:12:18 +01:00
de33b420ab Add safety against performing operation on non-alive foundContent 2022-01-03 20:02:46 +01:00
586f158920 Remove initial foundContent value
It always is replaced on the first search anyway, and just remains
forever in the overlay otherwise.
2022-01-03 19:52:42 +01:00
6650a468e0 Fix and simplify very broken beatmap listing content swap-out logic
The beatmap listing content swap-out logic was already a source of
several problems, and several attempts of fixing it were made. But as it
turns out it was terminally broken in several aspects.

* The `BypassAutoSizeAxes` juggling was finicky and ugly, and didn't
  really look much different than an instant fade. Therefore, all fade
  durations and manipulations of `BypassAutoSizeAxes` are removed.

* The transform sequence juggling the `BypassAutoSizeAxes` manipulations
  was enqueued on the content which is being in the process of fading
  out. That was partially fixed in 25e38560, but as it turns out, that
  only works if `lastContent` is one of the two placeholder drawables
  (results not found / supporter required to use filter).

  It would not work if `lastContent` is a
  `ReverseChildIDFillFlowContainer` with cards from a previous search in
  it.
2022-01-03 19:51:46 +01:00
ef9f56e585 Fix bad check if content is placeholder
The `lastContent == foundContent` check, last touched in a49a4329, is
terminally broken, as it would always be false. `foundContent` is
mutated when a new card load task is started in `onSearchFinished()`,
which is *before* the aforementioned check.

The code prior to a49a4329 was checking against the two static reused
placeholder drawables which was the correct check to apply, and this
commit reverts to using a variant of that check.
2022-01-03 19:51:20 +01:00
97439c3df1 Rename method to reflect what it actually does 2022-01-03 19:30:17 +01:00