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

New song select footer design implementation #21491

Merged
merged 28 commits into from
Feb 14, 2023

Conversation

mk56-spn
Copy link
Contributor

@mk56-spn mk56-spn commented Dec 1, 2022

supersedes #20148 and is part of #18890.

Cleaner commit history and isolated test only implementation to allow for merging without concern for other components it needs to work with.

line count is majorly bloated due to it being made as a drag and drop replacement, which is also the reason I put it all in one folder

@mk56-spn mk56-spn changed the title Footer v2 implementation New song select footer design Dec 1, 2022
@peppy peppy self-requested a review December 2, 2022 07:30
osu.Game/Screens/Select/FooterV2/FooterV2.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterV2.cs Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterButtonModsV2.cs Outdated Show resolved Hide resolved
@Gabixel Gabixel mentioned this pull request Jan 3, 2023
1 task
@bdach bdach mentioned this pull request Jan 14, 2023
@frenzibyte frenzibyte changed the title New song select footer design New song select footer design implementation Jan 16, 2023
osu.Game/Screens/Select/FooterV2/FooterButtonFreeModsV2.cs Outdated Show resolved Hide resolved
Comment on lines 159 to 160
protected override bool OnMouseDown(MouseDownEvent e) => !Enabled.Value || base.OnMouseDown(e);
protected override bool OnClick(ClickEvent e) => !Enabled.Value || base.OnClick(e);
Copy link
Member

Choose a reason for hiding this comment

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

I'm very confused by these conditionals. I do not think they should exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what about them to be exact? i took this design pattern from the old footer buttons that were recently updated. although i did inline it prompted by the jetbrains tips, if thats the issue i can revert it, just making sure

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure what the purpose is. Can you explain the purpose? If you can't, then it's probably not a good sign.

One rule to follow is to not blindly copy code, even if you are working with existing code. I believe these conditionals are going to make mouse clicks travel through the button to elements behind them when the buttons are not enabled, which is probably incorrect. I'd expect them to always be blocking mouse down / clicks?

@peppy peppy self-requested a review February 2, 2023 06:46
@peppy peppy self-requested a review February 3, 2023 07:04
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = colour.B5
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about this one. But it matches the design so let's go with it for now. I've left a comment in figma questioning its validity.

Copy link
Member

Choose a reason for hiding this comment

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

This should be colourProvider.Background5.

peppy
peppy previously approved these changes Feb 3, 2023
Copy link
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

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

Seems okay for a first pass.

@Joehuu Joehuu self-requested a review February 12, 2023 21:28
osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs Outdated Show resolved Hide resolved
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = colour.B5
Copy link
Member

Choose a reason for hiding this comment

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

This should be colourProvider.Background5.

osu.Game/Screens/Select/FooterV2/FooterV2.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs Outdated Show resolved Hide resolved
…ur`.

Remove unnecessary `FillFlowContainer`
Adjust shadow radius value to 5 to match figma.
pass ColourProvider in from test, instead of hard coding it in `FooterButtonV2.cs`
Co-authored-by: Joseph Madamba <madamba.joehu@outlook.com>
Joehuu
Joehuu previously approved these changes Feb 13, 2023
Copy link
Member

@Joehuu Joehuu left a comment

Choose a reason for hiding this comment

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

LGTM

@mk56-spn
Copy link
Contributor Author

thanks for all the nitpicks btw joehuu, i need to be more careful

@peppy peppy self-requested a review February 14, 2023 04:46
Comment on lines 20 to 21
public Action NextRandom { get; set; } = null!;
public Action PreviousRandom { get; set; } = null!;
Copy link
Member

Choose a reason for hiding this comment

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

Generally we always make Actions Action? and support nullability, as a pattern.

@peppy peppy enabled auto-merge February 14, 2023 05:01
@peppy peppy disabled auto-merge February 14, 2023 06:22
@peppy peppy merged commit 808d454 into ppy:master Feb 14, 2023
@mk56-spn mk56-spn deleted the footer_V2_implementation branch February 14, 2023 07:57
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.

Small overlap between buttons at the bottom of song select
3 participants