New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add beatmap ID lookup to BeatmapSetOverlay #2350

Merged
merged 13 commits into from Apr 20, 2018

Conversation

2 participants
@naoey
Contributor

naoey commented Apr 4, 2018

naoey added some commits Mar 9, 2018

Add a loading state to BeatmapSetOverlay.
- Handle null value in header and info sections
- Add item to context menu for carousel beatmaps to show details

@peppy peppy added this to the April 2018 milestone Apr 7, 2018

@peppy peppy added the online / API label Apr 7, 2018

@@ -66,10 +96,17 @@ public BeatmapSetOverlay()
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(0.2f)
},
loading = new LoadingAnimation
{
Anchor = Anchor.Centre,

This comment has been minimized.

@peppy

peppy Apr 10, 2018

Member

anchor/origin are already specified in base class

{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Alpha = 1,

This comment has been minimized.

@peppy

peppy Apr 10, 2018

Member

because of the way LoadingAnimation is implemented, i recommend you use State = States.Visible here (and replace the FadeIn/FadeOut calls with Show/Hide.

return;
}
header.BeatmapSet = info.BeatmapSet = beatmapSet;

This comment has been minimized.

@peppy

peppy Apr 10, 2018

Member

i'd rewrite this into

if (beatmapSet == null)
{
...
}
else
{
...
}

with no early return.

Also I'd pass the null down to the header and info components and make them support nulls.

@peppy

peppy approved these changes Apr 20, 2018

@peppy peppy merged commit 6132a5a into ppy:master Apr 20, 2018

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@naoey naoey deleted the naoey:show-beatmap-id branch May 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment