Skip to content
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

Use new footer for daily challenge #29165

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Joehuu
Copy link
Member

@Joehuu Joehuu commented Jul 28, 2024

Loosely needed for #29163, so there's feedback that the mods are applied.

The mod display overlap is not the best, but neither is having more dead space on the bottom. Added enough padding so that the actual content is still readable.

Restricted to one right button for the footer as it's already wide in the designs, and I believe we only need one. For multiplayer, we can probably use the left buttons for spectate/timer or somewhere else.

Kapture.2024-07-28.at.00.25.39.mp4

Known issues:

  • Deselect button position not updating (existed before PR and believed someone reported on Discord too)
    Screenshot 2024-07-28 at 12 29 34 AM

@bdach
Copy link
Collaborator

bdach commented Jul 29, 2024

Deselect button position not updating (existed before PR and believed someone reported on Discord too)

You can't seriously PR this sort of stuff and expect it to be merged... Why isn't this fixed? Do you seriously believe I'd push something this obviously broken live?

I'll look into fixing but dear lord. It's a different thing when something's broken on already live UI components, and another when you're pushing UI breakage where there was none before.

@Joehuu
Copy link
Member Author

Joehuu commented Jul 29, 2024

Didn't find a solution at the time, so left it in OP. It uses padding for positioning the deselect button, so you would need to update that every frame somehow.

Maybe a better solution is just not to resize the "free mods" button? That's easier to do.

@peppy
Copy link
Member

peppy commented Jul 29, 2024

Maybe a better solution is just not to resize the "free mods" button? That's easier to do.

This was my original proposal which hasn't yet been acted on.

@bdach
Copy link
Collaborator

bdach commented Jul 29, 2024

This was my original proposal which hasn't yet been acted on.

Where was this and who's supposed to be acting on it?

I'd like to move fast on this if possible because dear lord am I sick of the indolence when attempting to push any sort of design change.

@peppy
Copy link
Member

peppy commented Jul 29, 2024

Go for it. I don't think anyone's acting on it. https://discord.com/channels/188630481301012481/188630652340404224/1260510586442354759

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping I could just fix the free mods button thing and move on but the structure on this is pretty tragic to the point wherein I feel like I need to put a stop to this before things escalate too far to badness of a scale which I do not wish to deal with later

Comment on lines +225 to +262
public void AppearFromLeft(double delay)
{
Content.FinishTransforms();
Content.MoveToX(-300f)
.FadeOut()
.Delay(delay)
.MoveToX(0f, 240, Easing.OutCubic)
.FadeIn(240, Easing.OutCubic);
}

public void AppearFromBottom()
{
Content.FinishTransforms();
Content.MoveToY(100f)
.FadeOut()
.MoveToY(0f, 240, Easing.OutCubic)
.FadeIn(240, Easing.OutCubic);
}

public void DisappearToRight(bool expire)
{
Content.FinishTransforms();
Content.FadeOut(240, Easing.InOutCubic)
.MoveToX(300f, 360, Easing.InOutCubic);

if (expire)
this.Delay(Content.LatestTransformEndTime - Time.Current).Expire();
}

public void DisappearToBottom(bool expire)
{
Content.FinishTransforms();
Content.FadeOut(240, Easing.InOutCubic)
.MoveToY(100f, 240, Easing.InOutCubic);

if (expire)
this.Delay(Content.LatestTransformEndTime - Time.Current).Expire();
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have so many questions. Like:

  • Why is this here?
  • Why are transforms being applied to Content?
  • Why do these have expire bool flags?
  • Why is this button trying to apply transforms to itself rather than the footer animating it?

I guess ScreenFooterButton also does this, which I argue is just as bad? And the fact that this is starting to spread means that it's even worse?

tagging in @frenzibyte since you authored that other stuff

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll answer these set of questions for ScreenFooterButton, I don't agree with this existing here.

  • In ScreenFooterButton context, the button is used exclusively by the footer, so it's either/or whether the animation is defined by the footer or placed in the footer button itself (but it was suggested to put the animation in the button, see Add basic animation to new footer and buttons #28184 (comment))
  • Because the ScreenFooterButton may be placed in a fill flow, at which point the animation will be interrupted by the flow layout code. Compare this to the existence of TopLevelContent in ModSelectColumn to animate it, but I expect you to say it's different because the component is exposing it for the overlay to explicitly apply animation to it, I dunno.
  • I suppose you're asking this because I can supposedly do button.Expire() from the footer and it'll still expire after the animation is applied, but no, because the animation is applied on Content not this.
  • Add basic animation to new footer and buttons #28184 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok well as long as you can delete this stuff from ShearedButton I'll look away from ScreenFooterButton.

Comment on lines +42 to +44
// TODO: this should take the screen's colourProvider instead. hardcode plum for now as daily challenge is the only usage shown to users
[Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Aquamarine);
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Plum);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sort of kicking the can down the road does not inspire confidence, what is the plan with this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the ScreenFooter anywhere other than song select is not something I wanted to happen immediately, I was in the mindset of "we'll cross that bridge when we get to it". But the daily challenge screen came, and I think it's a great idea to try the screen footer there, to resolve the issue of seeing which mods are currently selected, but there are minor concerns like this that I would hope to be left out until follow-up PRs that aim to get the new song select live.

I will try to see if I can address this alongside what I had mentioned in #29165 (comment) already, though.

Comment on lines +347 to +369
private void makeLeftButtonAppearFromLeft(ScreenFooterButton button, int index, int count, float startDelay)
=> button.AppearFromLeft(startDelay + (count - index) * delay_per_button);

private void makeButtonAppearFromBottom(ScreenFooterButton button, int index)
private void makeLeftButtonAppearFromBottom(ScreenFooterButton button, int index)
=> button.AppearFromBottom(index * delay_per_button);

private void makeButtonDisappearToRight(ScreenFooterButton button, int index, int count, bool expire)
private void makeLeftButtonDisappearToRight(ScreenFooterButton button, int index, int count, bool expire)
=> button.DisappearToRight((count - index) * delay_per_button, expire);

private void makeButtonDisappearToBottom(ScreenFooterButton button, int index, int count, bool expire)
private void makeLeftButtonDisappearToBottom(ScreenFooterButton button, int index, int count, bool expire)
=> button.DisappearToBottom((count - index) * delay_per_button, expire);

private void makeRightButtonAppearFromLeft(ShearedButton button, float startDelay)
=> button.AppearFromLeft(startDelay);

private void makeRightButtonAppearFromBottom(ShearedButton button)
=> button.AppearFromBottom();

private void makeRightButtonDisappearToRight(ShearedButton button, bool expire)
=> button.DisappearToRight(expire);

private void makeRightButtonDisappearToBottom(ShearedButton button, bool expire)
=> button.DisappearToBottom(expire);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh and this is also pretty terrible but i am hoping that if the buttons can stop animating themselves for whatever reason we can just get rid of this entire block

@vatei
Copy link

vatei commented Jul 29, 2024

Go for it. I don't think anyone's acting on it. https://discord.com/channels/188630481301012481/188630652340404224/1260510586442354759

Regarding the deselect button, I agree that it feels weird, but maybe it's just because it's out of place there?
I made a small edit where I moved the button, and it feels more natural and in line with the rest of the design to me
(Maybe it should also match the size of the back button to really feel like a button too)

footer

@bdach
Copy link
Collaborator

bdach commented Jul 29, 2024

I made a small edit where I moved the button, and it feels more natural and in line with the rest of the design to me

Disagree. Before you had buttons on the left, non-button content on the right. Your proposal mixes it so it's buttons - not buttons - button again.

@vatei
Copy link

vatei commented Jul 29, 2024

I made a small edit where I moved the button, and it feels more natural and in line with the rest of the design to me

Disagree. Before you had buttons on the left, non-button content on the right. Your proposal mixes it so it's buttons - not buttons - button again.

I'd argue it's thematically separated in the edit, general UI left, and mod select specific UI right
But I see the point

@Tanza3D
Copy link

Tanza3D commented Jul 29, 2024

I'd definitely personally agree when taking into account where the user would expect it to be that it's best to have the deselect button on the right, grouped with the rest of the mod-related info/items, as compared to floating somewhere on the left

@Phippe
Copy link

Phippe commented Jul 30, 2024

Another reply, I'm sorry, but having the button to the bottom right just feels right to me. It's where you'll find the Cancel/OK button on pretty much every OS. Additionally, having the information on the left and the input element on the right is way more common than the other way around. Finally, the button on the bottom right feels properly anchored, whereas the current button is just kind of there, floating in space. For me, the only thing in favour of the current position is that it's close to the Mods button, so you don't have to move the cursor very far to quickly open the Mods menu and deselect everything.

}
}

public void SetRightButton(ShearedButton? button)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is absolutely not how I imagined this to be implemented.

@frenzibyte
Copy link
Member

The direction this PR is heading with the footer code is quite opposite to what I envisioned. A discussion in discord at least would've been nice before you head with this diff.

Main issues to point out:

  • The existing footer button animations are made specifically for the footer button. I would soon move all the footer button animation logic to a FooterButtonFlow class than to keep it in the class and duplicate over it.
  • SetRightButtons should not exist. I'm expecting the content display logic in RegisterActiveOverlayContainer to be expanded to screens instead, making each screen able to offer its set of buttons on the right, left, center, anywhere.

I'll look into this the upcoming days and put what I have in mind into code.

@frenzibyte frenzibyte added the blocked Don't merge this. label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants