Part of #32584.
Very much inspired by the respective component for displaying profile
pictures on the user overlay
* allow disabling interactivity/tooltips
* add option to show placeholder on null team instead of hiding
component entirely
* move setting corner radius out to respective parent components to
allow for easier overriding
## [Specify `Accept` header in registration
request](https://github.com/ppy/osu/commit/28edb788f78723cda23281a8801acc2065592840)
The lack of it meant that in specific scenarios web would respond with a
chunk of HTML instead of JSON.
## [Allow showing registration error message even if no redirect is
given](https://github.com/ppy/osu/commit/6ad49941ffd7cdf662ccd404836bb52fccec2142)
There are scenarios where this can happen, and if it did, previously the
strict requirement to have both would cause the specific message to be
discarded and replaced with the generic "something happened" one.
More or less covers the first page of client sentry issues sorted by
volume, all of which is pretty much useless for anything because it's
client-specific-failure noise.
This is dodgy as hell but `ShortName` is completely derived from
`OnlineID` anyway so there should be no valid reason to ever attempt to
serialise it anyway.
`VerificationFailureResponse.RequiredSessionVerificationMethod` not
being nullable means that if it was missing in the verification
response, it would not be `null` but default to `TimedOneTimePassword`
instead, therefore showing TOTP-related error messages to users that
never enabled it rather than the user-facing message they were supposed
to.
Most easily tested on a local full-stack environment with
```diff
diff --git a/app/Libraries/SessionVerification/MailState.php b/app/Libraries/SessionVerification/MailState.php
index 305a2794ec0..3c2d15f335b 100644
--- a/app/Libraries/SessionVerification/MailState.php
+++ b/app/Libraries/SessionVerification/MailState.php
@@ -14,7 +14,7 @@ use Carbon\CarbonImmutable;
class MailState
{
- private const KEY_VALID_DURATION = 600;
+ private const KEY_VALID_DURATION = 10;
public readonly CarbonImmutable $expiresAt;
public readonly string $key;
```
applied so that you don't have to wait 10 minutes to trigger the
failure.
Something I've asked to be done for a long time. Relevant because I've
complained about this on every addition of a new piece of user-local
state: friends, blocks, and now favourite beatmaps.
It's just so messy managing all this inside `APIAccess` next to
everything else, IMO.
The "partial" leaderboard logic in `SoloGameplayLeaderboardProvider`
always assumed the online fetch would request 50 scores, which is no
longer the case after https://github.com/ppy/osu/pull/33100.
Reported via e-mails.
The web-side change that wasn't ported here is
https://github.com/ppy/osu-web/pull/11151. I wanted to port it at the
time but then ran into issues because this logic should *ideally* also
be applied to the beatmap set overlay leaderboards, but those are
hard-glued to `ScoreInfo`, cannot be easily weaned off it to use
`SoloScoreInfo` instead, and I did not want to make `ScoreInfo` even
more of a mess than it already is.
This time I'm just ignoring it and adding a TODO instead because I have
no confidence I will get review eyes on any refactor of the beatmap set
overlay. All I'll say that such refactors would have potentially
beneficial effects on results screens too which also (ab)use
`ScoreInfo`.
Fixes startup sounds from potentially being fetched from the wrong
source if API connection establishment takes longer than the intro
screen takes to load.
Closes https://github.com/ppy/osu/issues/22492.
Resolves one part of
https://github.com/ppy/osu/discussions/32568#discussioncomment-12612928
A few caveats:
- Layout is slightly different than web intentionally. Web does things
that I think will be difficult to reproduce or just plain look bad in
client, such as:
- On web, the metadata info box has 200px min height and 300px max
height. I just hardcoded 300 units.
- On web, user tags and mapper tags are individually scrollable, and
the amount of space taken up by each is calculated in a way that
is - as far as I can tell - indeterminate, and probably influenced
by some flexbox magic. I just made the entire thing scrollable
instead.
- Because song select shares controls with the beatmap set overlay, now
song select says "Mapper Tags" in the header instead of just "Tags"
too. I think this is fine, because people asked for user tags to be
shown in song select too.
- Search query syntax lifted from
https://github.com/ppy/osu-web/pull/12047.
- Using hardcoded English strings for now, will update to the
translations after the next osu-resources localisations update.
Flushes are assumed to have already come from a definitive state change
(read: disconnection). Allowing the exceptions that come from failing
the flushed requests to trigger the `Failing` code paths makes
completely incorrect behaviour possible.