From c9c39ecb2f616b27b088bb455d5c122323127b10 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Fri, 9 Feb 2024 15:15:27 -0800 Subject: [PATCH 1/7] Add `RankHighest` to `APIUser` --- .../Visual/Online/TestSceneUserProfileOverlay.cs | 5 +++++ osu.Game/Online/API/Requests/Responses/APIUser.cs | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs index bc8f75d4ce..020e020b10 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs @@ -137,6 +137,11 @@ namespace osu.Game.Tests.Visual.Online @"top_ranks", @"medals" }, + RankHighest = new APIUser.UserRankHighest + { + Rank = 1, + UpdatedAt = DateTimeOffset.Now, + }, Statistics = new UserStatistics { IsRanked = true, diff --git a/osu.Game/Online/API/Requests/Responses/APIUser.cs b/osu.Game/Online/API/Requests/Responses/APIUser.cs index 56eec19fa1..4a31718f28 100644 --- a/osu.Game/Online/API/Requests/Responses/APIUser.cs +++ b/osu.Game/Online/API/Requests/Responses/APIUser.cs @@ -34,6 +34,19 @@ namespace osu.Game.Online.API.Requests.Responses [JsonProperty(@"previous_usernames")] public string[] PreviousUsernames; + [JsonProperty(@"rank_highest")] + [CanBeNull] + public UserRankHighest RankHighest; + + public class UserRankHighest + { + [JsonProperty(@"rank")] + public int Rank; + + [JsonProperty(@"updated_at")] + public DateTimeOffset UpdatedAt; + } + [JsonProperty(@"country_code")] private string countryCodeString; From 8d1d65a469c717f29115743ab231ce791930668d Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Fri, 9 Feb 2024 15:17:34 -0800 Subject: [PATCH 2/7] Add `ContentTooltipText` to `ProfileValueDisplay` --- .../Header/Components/ProfileValueDisplay.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Profile/Header/Components/ProfileValueDisplay.cs b/osu.Game/Overlays/Profile/Header/Components/ProfileValueDisplay.cs index 4b1a0409a3..b2c23458b1 100644 --- a/osu.Game/Overlays/Profile/Header/Components/ProfileValueDisplay.cs +++ b/osu.Game/Overlays/Profile/Header/Components/ProfileValueDisplay.cs @@ -4,6 +4,7 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Cursor; using osu.Framework.Localisation; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; @@ -13,7 +14,7 @@ namespace osu.Game.Overlays.Profile.Header.Components public partial class ProfileValueDisplay : CompositeDrawable { private readonly OsuSpriteText title; - private readonly OsuSpriteText content; + private readonly ContentText content; public LocalisableString Title { @@ -25,6 +26,11 @@ namespace osu.Game.Overlays.Profile.Header.Components set => content.Text = value; } + public LocalisableString ContentTooltipText + { + set => content.TooltipText = value; + } + public ProfileValueDisplay(bool big = false, int minimumWidth = 60) { AutoSizeAxes = Axes.Both; @@ -38,9 +44,9 @@ namespace osu.Game.Overlays.Profile.Header.Components { Font = OsuFont.GetFont(size: 12) }, - content = new OsuSpriteText + content = new ContentText { - Font = OsuFont.GetFont(size: big ? 30 : 20, weight: FontWeight.Light) + Font = OsuFont.GetFont(size: big ? 30 : 20, weight: FontWeight.Light), }, new Container // Add a minimum size to the FillFlowContainer { @@ -56,5 +62,10 @@ namespace osu.Game.Overlays.Profile.Header.Components title.Colour = colourProvider.Content1; content.Colour = colourProvider.Content2; } + + private partial class ContentText : OsuSpriteText, IHasTooltip + { + public LocalisableString TooltipText { get; set; } + } } } From ae89b89928af680dc921cfc4880241aa787e44ce Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Fri, 9 Feb 2024 15:33:49 -0800 Subject: [PATCH 3/7] Centralise global rank display logic to new class --- .../Header/Components/GlobalRankDisplay.cs | 32 +++++++++++++++++++ .../Profile/Header/Components/MainDetails.cs | 9 ++---- osu.Game/Users/UserRankPanel.cs | 6 ++-- 3 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs diff --git a/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs b/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs new file mode 100644 index 0000000000..290b052e27 --- /dev/null +++ b/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs @@ -0,0 +1,32 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Framework.Bindables; +using osu.Framework.Extensions.LocalisationExtensions; +using osu.Framework.Localisation; +using osu.Game.Resources.Localisation.Web; +using osu.Game.Users; + +namespace osu.Game.Overlays.Profile.Header.Components +{ + public partial class GlobalRankDisplay : ProfileValueDisplay + { + public readonly Bindable UserStatistics = new Bindable(); + + public GlobalRankDisplay() + : base(true) + { + Title = UsersStrings.ShowRankGlobalSimple; + } + + protected override void LoadComplete() + { + base.LoadComplete(); + + UserStatistics.BindValueChanged(s => + { + Content = s.NewValue?.GlobalRank?.ToLocalisableString("\\##,##0") ?? (LocalisableString)"-"; + }, true); + } + } +} diff --git a/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs b/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs index b89973c5e5..2aea897451 100644 --- a/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs +++ b/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs @@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Profile.Header.Components private readonly Dictionary scoreRankInfos = new Dictionary(); private ProfileValueDisplay medalInfo = null!; private ProfileValueDisplay ppInfo = null!; - private ProfileValueDisplay detailGlobalRank = null!; + private GlobalRankDisplay detailGlobalRank = null!; private ProfileValueDisplay detailCountryRank = null!; private RankGraph rankGraph = null!; @@ -52,10 +52,7 @@ namespace osu.Game.Overlays.Profile.Header.Components Spacing = new Vector2(20), Children = new Drawable[] { - detailGlobalRank = new ProfileValueDisplay(true) - { - Title = UsersStrings.ShowRankGlobalSimple, - }, + detailGlobalRank = new GlobalRankDisplay(), detailCountryRank = new ProfileValueDisplay(true) { Title = UsersStrings.ShowRankCountrySimple, @@ -142,7 +139,7 @@ namespace osu.Game.Overlays.Profile.Header.Components foreach (var scoreRankInfo in scoreRankInfos) scoreRankInfo.Value.RankCount = user?.Statistics?.GradesCount[scoreRankInfo.Key] ?? 0; - detailGlobalRank.Content = user?.Statistics?.GlobalRank?.ToLocalisableString("\\##,##0") ?? (LocalisableString)"-"; + detailGlobalRank.UserStatistics.Value = user?.Statistics; detailCountryRank.Content = user?.Statistics?.CountryRank?.ToLocalisableString("\\##,##0") ?? (LocalisableString)"-"; rankGraph.Statistics.Value = user?.Statistics; diff --git a/osu.Game/Users/UserRankPanel.cs b/osu.Game/Users/UserRankPanel.cs index 84ff3114fc..ba9ef1eee4 100644 --- a/osu.Game/Users/UserRankPanel.cs +++ b/osu.Game/Users/UserRankPanel.cs @@ -27,7 +27,6 @@ namespace osu.Game.Users [Resolved] private IAPIProvider api { get; set; } = null!; - private ProfileValueDisplay globalRankDisplay = null!; private ProfileValueDisplay countryRankDisplay = null!; private readonly IBindable statistics = new Bindable(); @@ -47,7 +46,6 @@ namespace osu.Game.Users statistics.BindTo(api.Statistics); statistics.BindValueChanged(stats => { - globalRankDisplay.Content = stats.NewValue?.GlobalRank?.ToLocalisableString("\\##,##0") ?? "-"; countryRankDisplay.Content = stats.NewValue?.CountryRank?.ToLocalisableString("\\##,##0") ?? "-"; }, true); } @@ -163,9 +161,9 @@ namespace osu.Game.Users { new Drawable[] { - globalRankDisplay = new ProfileValueDisplay(true) + new GlobalRankDisplay { - Title = UsersStrings.ShowRankGlobalSimple, + UserStatistics = { BindTarget = statistics }, }, countryRankDisplay = new ProfileValueDisplay(true) { From ffd0d9bb3994f7471746921f63a3594efc16c49d Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Fri, 9 Feb 2024 15:36:15 -0800 Subject: [PATCH 4/7] Add highest rank tooltip to global rank display --- .../Profile/Header/Components/GlobalRankDisplay.cs | 12 ++++++++++++ .../Profile/Header/Components/MainDetails.cs | 1 + osu.Game/Users/UserRankPanel.cs | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs b/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs index 290b052e27..dcd4129b45 100644 --- a/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs +++ b/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs @@ -4,6 +4,7 @@ using osu.Framework.Bindables; using osu.Framework.Extensions.LocalisationExtensions; using osu.Framework.Localisation; +using osu.Game.Online.API.Requests.Responses; using osu.Game.Resources.Localisation.Web; using osu.Game.Users; @@ -12,6 +13,7 @@ namespace osu.Game.Overlays.Profile.Header.Components public partial class GlobalRankDisplay : ProfileValueDisplay { public readonly Bindable UserStatistics = new Bindable(); + public readonly Bindable User = new Bindable(); public GlobalRankDisplay() : base(true) @@ -27,6 +29,16 @@ namespace osu.Game.Overlays.Profile.Header.Components { Content = s.NewValue?.GlobalRank?.ToLocalisableString("\\##,##0") ?? (LocalisableString)"-"; }, true); + + // needed as statistics doesn't populate User + User.BindValueChanged(u => + { + var rankHighest = u.NewValue?.RankHighest; + + ContentTooltipText = rankHighest != null + ? UsersStrings.ShowRankHighest(rankHighest.Rank.ToLocalisableString("\\##,##0"), rankHighest.UpdatedAt.ToLocalisableString(@"d MMM yyyy")) + : string.Empty; + }, true); } } } diff --git a/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs b/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs index 2aea897451..ffdf8edc21 100644 --- a/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs +++ b/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs @@ -140,6 +140,7 @@ namespace osu.Game.Overlays.Profile.Header.Components scoreRankInfo.Value.RankCount = user?.Statistics?.GradesCount[scoreRankInfo.Key] ?? 0; detailGlobalRank.UserStatistics.Value = user?.Statistics; + detailGlobalRank.User.Value = user; detailCountryRank.Content = user?.Statistics?.CountryRank?.ToLocalisableString("\\##,##0") ?? (LocalisableString)"-"; rankGraph.Statistics.Value = user?.Statistics; diff --git a/osu.Game/Users/UserRankPanel.cs b/osu.Game/Users/UserRankPanel.cs index ba9ef1eee4..4a00583094 100644 --- a/osu.Game/Users/UserRankPanel.cs +++ b/osu.Game/Users/UserRankPanel.cs @@ -30,6 +30,7 @@ namespace osu.Game.Users private ProfileValueDisplay countryRankDisplay = null!; private readonly IBindable statistics = new Bindable(); + private readonly IBindable user = new Bindable(); public UserRankPanel(APIUser user) : base(user) @@ -48,6 +49,8 @@ namespace osu.Game.Users { countryRankDisplay.Content = stats.NewValue?.CountryRank?.ToLocalisableString("\\##,##0") ?? "-"; }, true); + + user.BindTo(api.LocalUser!); } protected override Drawable CreateLayout() @@ -164,6 +167,9 @@ namespace osu.Game.Users new GlobalRankDisplay { UserStatistics = { BindTarget = statistics }, + // TODO: make highest rank update, as api.LocalUser doesn't update + // maybe move to statistics in api, so `SoloStatisticsWatcher` can update the value + User = { BindTarget = user }, }, countryRankDisplay = new ProfileValueDisplay(true) { From 7b0b39dbaa515e5d2455de0da7e9884d222fc601 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Fri, 9 Feb 2024 15:46:14 -0800 Subject: [PATCH 5/7] Fix total play time tooltip area including label --- .../Profile/Header/Components/TotalPlayTime.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/osu.Game/Overlays/Profile/Header/Components/TotalPlayTime.cs b/osu.Game/Overlays/Profile/Header/Components/TotalPlayTime.cs index 08ca59d89b..a3c22d61d2 100644 --- a/osu.Game/Overlays/Profile/Header/Components/TotalPlayTime.cs +++ b/osu.Game/Overlays/Profile/Header/Components/TotalPlayTime.cs @@ -5,25 +5,19 @@ using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Cursor; -using osu.Framework.Localisation; using osu.Game.Resources.Localisation.Web; namespace osu.Game.Overlays.Profile.Header.Components { - public partial class TotalPlayTime : CompositeDrawable, IHasTooltip + public partial class TotalPlayTime : CompositeDrawable { public readonly Bindable User = new Bindable(); - public LocalisableString TooltipText { get; set; } - private ProfileValueDisplay info = null!; public TotalPlayTime() { AutoSizeAxes = Axes.Both; - - TooltipText = "0 hours"; } [BackgroundDependencyLoader] @@ -32,6 +26,7 @@ namespace osu.Game.Overlays.Profile.Header.Components InternalChild = info = new ProfileValueDisplay(minimumWidth: 140) { Title = UsersStrings.ShowStatsPlayTime, + ContentTooltipText = "0 hours", }; User.BindValueChanged(updateTime, true); @@ -40,7 +35,7 @@ namespace osu.Game.Overlays.Profile.Header.Components private void updateTime(ValueChangedEvent user) { int? playTime = user.NewValue?.User.Statistics?.PlayTime; - TooltipText = (playTime ?? 0) / 3600 + " hours"; + info.ContentTooltipText = (playTime ?? 0) / 3600 + " hours"; info.Content = formatTime(playTime); } From a03835bf1c472a477dc992b7c2d05357e1b07da4 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Wed, 14 Feb 2024 20:13:27 -0800 Subject: [PATCH 6/7] Improve comments --- .../Overlays/Profile/Header/Components/GlobalRankDisplay.cs | 2 +- osu.Game/Users/UserRankPanel.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs b/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs index dcd4129b45..d32f56ab1b 100644 --- a/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs +++ b/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs @@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Profile.Header.Components Content = s.NewValue?.GlobalRank?.ToLocalisableString("\\##,##0") ?? (LocalisableString)"-"; }, true); - // needed as statistics doesn't populate User + // needed as `UserStatistics` doesn't populate `User` User.BindValueChanged(u => { var rankHighest = u.NewValue?.RankHighest; diff --git a/osu.Game/Users/UserRankPanel.cs b/osu.Game/Users/UserRankPanel.cs index 4a00583094..0b8a5166e6 100644 --- a/osu.Game/Users/UserRankPanel.cs +++ b/osu.Game/Users/UserRankPanel.cs @@ -167,8 +167,8 @@ namespace osu.Game.Users new GlobalRankDisplay { UserStatistics = { BindTarget = statistics }, - // TODO: make highest rank update, as api.LocalUser doesn't update - // maybe move to statistics in api, so `SoloStatisticsWatcher` can update the value + // TODO: make highest rank update, as `api.LocalUser` doesn't update + // maybe move to `UserStatistics` in api, so `SoloStatisticsWatcher` can update the value User = { BindTarget = user }, }, countryRankDisplay = new ProfileValueDisplay(true) From 2ff8667dd2e433fd7abb832cc8bb91def14c44d1 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Mon, 19 Feb 2024 12:11:12 -0800 Subject: [PATCH 7/7] Revert "Centralise global rank display logic to new class" Also don't show on `LoginOverlay` usage for now. --- .../Header/Components/GlobalRankDisplay.cs | 44 ------------------- .../Profile/Header/Components/MainDetails.cs | 17 +++++-- osu.Game/Users/UserRankPanel.cs | 13 +++--- 3 files changed, 19 insertions(+), 55 deletions(-) delete mode 100644 osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs diff --git a/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs b/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs deleted file mode 100644 index d32f56ab1b..0000000000 --- a/osu.Game/Overlays/Profile/Header/Components/GlobalRankDisplay.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using osu.Framework.Bindables; -using osu.Framework.Extensions.LocalisationExtensions; -using osu.Framework.Localisation; -using osu.Game.Online.API.Requests.Responses; -using osu.Game.Resources.Localisation.Web; -using osu.Game.Users; - -namespace osu.Game.Overlays.Profile.Header.Components -{ - public partial class GlobalRankDisplay : ProfileValueDisplay - { - public readonly Bindable UserStatistics = new Bindable(); - public readonly Bindable User = new Bindable(); - - public GlobalRankDisplay() - : base(true) - { - Title = UsersStrings.ShowRankGlobalSimple; - } - - protected override void LoadComplete() - { - base.LoadComplete(); - - UserStatistics.BindValueChanged(s => - { - Content = s.NewValue?.GlobalRank?.ToLocalisableString("\\##,##0") ?? (LocalisableString)"-"; - }, true); - - // needed as `UserStatistics` doesn't populate `User` - User.BindValueChanged(u => - { - var rankHighest = u.NewValue?.RankHighest; - - ContentTooltipText = rankHighest != null - ? UsersStrings.ShowRankHighest(rankHighest.Rank.ToLocalisableString("\\##,##0"), rankHighest.UpdatedAt.ToLocalisableString(@"d MMM yyyy")) - : string.Empty; - }, true); - } - } -} diff --git a/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs b/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs index ffdf8edc21..2505c1bc8c 100644 --- a/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs +++ b/osu.Game/Overlays/Profile/Header/Components/MainDetails.cs @@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Profile.Header.Components private readonly Dictionary scoreRankInfos = new Dictionary(); private ProfileValueDisplay medalInfo = null!; private ProfileValueDisplay ppInfo = null!; - private GlobalRankDisplay detailGlobalRank = null!; + private ProfileValueDisplay detailGlobalRank = null!; private ProfileValueDisplay detailCountryRank = null!; private RankGraph rankGraph = null!; @@ -52,7 +52,10 @@ namespace osu.Game.Overlays.Profile.Header.Components Spacing = new Vector2(20), Children = new Drawable[] { - detailGlobalRank = new GlobalRankDisplay(), + detailGlobalRank = new ProfileValueDisplay(true) + { + Title = UsersStrings.ShowRankGlobalSimple, + }, detailCountryRank = new ProfileValueDisplay(true) { Title = UsersStrings.ShowRankCountrySimple, @@ -139,8 +142,14 @@ namespace osu.Game.Overlays.Profile.Header.Components foreach (var scoreRankInfo in scoreRankInfos) scoreRankInfo.Value.RankCount = user?.Statistics?.GradesCount[scoreRankInfo.Key] ?? 0; - detailGlobalRank.UserStatistics.Value = user?.Statistics; - detailGlobalRank.User.Value = user; + detailGlobalRank.Content = user?.Statistics?.GlobalRank?.ToLocalisableString("\\##,##0") ?? (LocalisableString)"-"; + + var rankHighest = user?.RankHighest; + + detailGlobalRank.ContentTooltipText = rankHighest != null + ? UsersStrings.ShowRankHighest(rankHighest.Rank.ToLocalisableString("\\##,##0"), rankHighest.UpdatedAt.ToLocalisableString(@"d MMM yyyy")) + : string.Empty; + detailCountryRank.Content = user?.Statistics?.CountryRank?.ToLocalisableString("\\##,##0") ?? (LocalisableString)"-"; rankGraph.Statistics.Value = user?.Statistics; diff --git a/osu.Game/Users/UserRankPanel.cs b/osu.Game/Users/UserRankPanel.cs index 0b8a5166e6..b440261a4c 100644 --- a/osu.Game/Users/UserRankPanel.cs +++ b/osu.Game/Users/UserRankPanel.cs @@ -27,10 +27,10 @@ namespace osu.Game.Users [Resolved] private IAPIProvider api { get; set; } = null!; + private ProfileValueDisplay globalRankDisplay = null!; private ProfileValueDisplay countryRankDisplay = null!; private readonly IBindable statistics = new Bindable(); - private readonly IBindable user = new Bindable(); public UserRankPanel(APIUser user) : base(user) @@ -47,10 +47,9 @@ namespace osu.Game.Users statistics.BindTo(api.Statistics); statistics.BindValueChanged(stats => { + globalRankDisplay.Content = stats.NewValue?.GlobalRank?.ToLocalisableString("\\##,##0") ?? "-"; countryRankDisplay.Content = stats.NewValue?.CountryRank?.ToLocalisableString("\\##,##0") ?? "-"; }, true); - - user.BindTo(api.LocalUser!); } protected override Drawable CreateLayout() @@ -164,12 +163,12 @@ namespace osu.Game.Users { new Drawable[] { - new GlobalRankDisplay + globalRankDisplay = new ProfileValueDisplay(true) { - UserStatistics = { BindTarget = statistics }, - // TODO: make highest rank update, as `api.LocalUser` doesn't update + Title = UsersStrings.ShowRankGlobalSimple, + // TODO: implement highest rank tooltip + // `RankHighest` resides in `APIUser`, but `api.LocalUser` doesn't update // maybe move to `UserStatistics` in api, so `SoloStatisticsWatcher` can update the value - User = { BindTarget = user }, }, countryRankDisplay = new ProfileValueDisplay(true) {