-
Notifications
You must be signed in to change notification settings - Fork 781
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
Remove self where not necessary #446
Conversation
Generated by 🚫 Danger |
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.
Well done @SD10
IBAnimatable/Animatable.swift
Outdated
@@ -579,7 +579,7 @@ fileprivate extension Animatable where Self: UIView { | |||
} | |||
|
|||
var screenSize: CGSize { | |||
return self.window?.screen.bounds.size ?? CGSize.zero | |||
return window?.screen.bounds.size ?? CGSize.zero |
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 we can remove CGSize
and just use .zero
.
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.
Done 👍
@@ -21,14 +21,13 @@ public class FlipAnimator: NSObject, AnimatedTransitioning { | |||
fileprivate var horizontal: Bool = false | |||
|
|||
// MARK: - Life cycle | |||
public init(from direction: TransitionAnimationType.Direction, transitionDuration: Duration) { | |||
public init(from direction: TransitionAnimationType.Direction, duration: Duration) { |
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.
That will introduce breaking changes. Please update the CHANGELOG.md
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.
Do I just need to reference this Pull Request or should I actually state the parameter name change? I updated the CHANGELOG but let me know if I should change it. I'm learning what an API breaking change is now 😃
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 don't think you should add an entry for the change of self. since it's only internal changes, but you should add an entry in the API breaking change to explain the prototype change transitionDuration -> duration because that may break for the users.
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.
Ok I did this plus changed the remaining 3 that were not changed as to keep the API consistent. Thank you for clarifying @tbaranes
@SD10 thanks for fixing that in no time ⚡️⚡️⚡️, you rock 🚀. And please have a look at the comment on CHANGELOG.md. |
999a543
to
5046753
Compare
CHANGELOG.md
Outdated
@@ -11,6 +11,8 @@ All notable changes to this project will be documented in this file. | |||
- Replace all `SystemAnimator` classes with `SystemTransitionAnimator` | |||
[#427](https://github.com/IBAnimatable/IBAnimatable/pull/427) by [@SD10](https://github.com/sd10) | |||
- `PresentationDesignable` now supports `contextFrameForPresentation` which allow you to present a controller with a custom configuration over another instead of being in fullscreen. Imitates `UIModalPresentationStyle.currentContext` | |||
- Remove the use of `self` where not necessary |
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.
@SD10 sorry, I don't think we need to put the title as "Remove the use of self
where not necessary" for breaking changes, because it doesn't make sense for the user. I meant we should specify the API changes. something like Change the initializer for PortalAnimator
, NatGeoAnimator
, TurnAnimator
, CardsAnimator
, FlipAnimator
, SlideAnimator
, ZoomAnimator
and DropDownAnimator
. Rename the parameter from transitionDuration
to duration
.
And please add by [@SD10](https://github.com/sd10)
as well.
5046753
to
83da9bb
Compare
CHANGELOG.md
Outdated
@@ -11,6 +11,8 @@ All notable changes to this project will be documented in this file. | |||
- Replace all `SystemAnimator` classes with `SystemTransitionAnimator` | |||
[#427](https://github.com/IBAnimatable/IBAnimatable/pull/427) by [@SD10](https://github.com/sd10) | |||
- `PresentationDesignable` now supports `contextFrameForPresentation` which allow you to present a controller with a custom configuration over another instead of being in fullscreen. Imitates `UIModalPresentationStyle.currentContext` | |||
- transition Animator classes initializer parameter changed from transitionDuration -> duration |
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.
One last point: can you uppercase the first character and credit yourself?
83da9bb
to
fca5b50
Compare
Summary of Pull Request:
Remove use of
self
where not necessary, #445