-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Conversation
protected override bool OnMouseDown(MouseDownEvent e) => !Enabled.Value || base.OnMouseDown(e); | ||
protected override bool OnClick(ClickEvent e) => !Enabled.Value || base.OnClick(e); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
new Box | ||
{ | ||
RelativeSizeAxes = Axes.Both, | ||
Colour = colour.B5 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
06c27e7
to
48f7e01
Compare
There was a problem hiding this 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.
new Box | ||
{ | ||
RelativeSizeAxes = Axes.Both, | ||
Colour = colour.B5 |
There was a problem hiding this comment.
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
.
…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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
thanks for all the nitpicks btw joehuu, i need to be more careful |
public Action NextRandom { get; set; } = null!; | ||
public Action PreviousRandom { get; set; } = null!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally we always make Action
s Action?
and support nullability, as a pattern.
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