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
Auction Banner #1023
Auction Banner #1023
Conversation
prefix operator ^ { } | ||
prefix func ^<T>(closure: T -> Void)(instance: T) { | ||
return apply(closure)(instance: instance) | ||
} |
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 think this is really cool, but I'm a terrible judge of what is cool (see: high school). I'm cool with either a) a different operator, or b) no operator (just a function).
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 think apply
is much better. I’m not a fan of custom operators outside of a DSL or strictly related to the domain they’re used in. Words are handy, as they describe what they mean ;)
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.
Having said that, I do like the operator and could see this pattern being used a lot and thus having the reader learn about 1 operator is a low enough burden.
So let’s do it like this. Either you guarantee to use this operator all over the place over the next few weeks or remove it now and add it back later once apply
is used all over the place.
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.
Cool, I'll take it out for now and we'll see how widely apply is used 👍
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’d like to see some screenshots/videos please. |
Good point! I'll add some shortly. |
OK, so the banner looks like this on iPhone: And this on iPad: Things to note:
I'll remove the |
Oh, and the images are |
assigning to alloy, cause I can |
Delegation awwww yissss |
backgroundImageView.alignToView(self) | ||
darkeningView.alignToView(self) | ||
|
||
logoImageView.constrainWidth(nil, height: "70") |
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.
Is the intent here to not add a width constraint? If so, please just use constrainHeight()
.
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.
👍
Small comments, otherwise good to merge after addressing those 👍 |
Generated by 🚫 danger |
Profile information is unavailable (see: https://github.com/artsy/ohm/issues/275 ) so I've hardcoded some values for now in the view model.
Still to be done for #974 is the countdown timer, alluded to in some
TODO
comments.EDIT: Since this PR has expanded a bit since I opened it, I can now add the following:
Fixes #974.