"Show More" button is incorrectly displayed when item count equals InitialItemsCount · Issue #33069 · ppy/osu · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
English is not my first language, so I've used machine translation to help write this :(
In the game's player info page, lists default to displaying 5 items. If there are more than 5 items, a SHOW MORE button appears, which can be clicked to load more. (For Beatmaps-related content, this is 6 items, and for Graveyarded Beatmaps, it's 2 items).
In Lazer, if the number of items loaded is exactly equal to the InitialItemsCount (e.g. when a user's 'Recent Plays' has exactly 5 items, or 'Favorite Beatmaps' has exactly 6 items as per the screenshots), the Show More button is incorrectly displayed.
While on the osu! website, the button would be correctly hidden under the same circumstances.
Even when the button is clicked, it stays visible and gets stuck in the loading state.
// even if the "Show More" button is incorrectly displayed, clicking it will at least make it disappear.
- if (!items.Any() && CurrentPage?.Offset == 0)+ if (!items.Any())
This approach seems closer to addressing the root cause. It relies on accessing the total count stored in header.Current.Value from the ProfileSubsection class. It need to be changed header accessible from private to protected.
I'm not sure if this is appropriate? If I directly changing header to protected triggers a naming convention warning: "Name 'header' does not match rule 'public_members_pascalcase'. Suggested name is 'Header'. So I tried adding a new protected property.
- moreButton.FadeTo(items.Count == CurrentPage?.Limit ? 1 : 0);+ moreButton.FadeTo(items.Count == CurrentPage?.Limit && items.Count != TotalCount ? 1 : 0);
(or)
// instead of adding an extra protected property, if you directly make header protected, use this
+ moreButton.FadeTo(items.Count == CurrentPage?.Limit && items.Count != header.Current.Value ? 1 : 0);
I'm not entirely sure which modification would best align with the project's coding style and design patterns. If there's a clear direction for a solution, I'd be happy to submit a Pull Request to help fix this issue.
Uh oh!
There was an error while loading. Please reload this page.
Type
Cosmetic
Bug description
English is not my first language, so I've used machine translation to help write this :(
In the game's
player info
page, lists default to displaying 5 items. If there are more than 5 items, aSHOW MORE
button appears, which can be clicked to load more. (For Beatmaps-related content, this is 6 items, and for Graveyarded Beatmaps, it's 2 items).osu/osu.Game/Overlays/Profile/Sections/PaginatedProfileSubsection.cs
Line 33 in 045fd47
osu/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs
Line 23 in 045fd47
In Lazer, if the number of items loaded is exactly equal to the InitialItemsCount (e.g. when a user's 'Recent Plays' has exactly 5 items, or 'Favorite Beatmaps' has exactly 6 items as per the screenshots), the
Show More
button is incorrectly displayed.While on the osu! website, the button would be correctly hidden under the same circumstances.
Even when the button is clicked, it stays visible and gets stuck in the loading state.
The issue is in the following code:
osu/osu.Game/Overlays/Profile/Sections/PaginatedProfileSubsection.cs
Lines 125 to 149 in 045fd47
Some ideas I've explored:
osu/osu.Game/Overlays/Profile/Sections/PaginatedProfileSubsection.cs
Line 129 in 045fd47
header.Current.Value
from theProfileSubsection
class. It need to be changedheader
accessible from private to protected.osu/osu.Game/Overlays/Profile/Sections/ProfileSubsection.cs
Line 19 in 045fd47
private ProfileSubsectionHeader header = null!; + protected int TotalCount => header.Current.Value;
I'm not sure if this is appropriate? If I directly changing header to protected triggers a naming convention warning: "Name 'header' does not match rule 'public_members_pascalcase'. Suggested name is 'Header'. So I tried adding a new protected property.
osu/osu.Game/Overlays/Profile/Sections/PaginatedProfileSubsection.cs
Line 144 in 045fd47
I'm not entirely sure which modification would best align with the project's coding style and design patterns. If there's a clear direction for a solution, I'd be happy to submit a Pull Request to help fix this issue.
Screenshots or videos
osu/osu.Game/Overlays/Profile/Sections/PaginatedProfileSubsection.cs
Line 33 in 045fd47
osu/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs
Line 23 in 045fd47
Version
Lazer 2025.424.0
Logs
N/A
The text was updated successfully, but these errors were encountered: