{"action":"created","comment":{"url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/comments/94941125","pull_request_review_id":15483811,"id":94941125,"diff_hunk":"@@ -66,7 +66,34 @@ public extension Animatable where Self: UIView {\n     }\n   }\n \n-  public func animate(animation: AnimationType? = nil, completion: AnimatableCompletion? = nil) {\n+  public func animate(animation: AnimationType) -> AnimationPromise<Self> {\n+    let promise = AnimationPromise(view: self)\n+    return promise.then(animation)\n+  }\n+\n+  public func animate(animation: AnimationType? = nil, completion: AnimatableCompletion? = nil) {// here for retro-compatibility\n+   // self.animate(animation: animation, promise: nil)\n+   // self.animate(animation)\n+    self.animate(animation: animation ?? self.animationType).completion(completion)\n+  }\n+\n+  public func delay(delay: Double) -> AnimationPromise<Self> {","path":"IBAnimatable/Animatable.swift","position":16,"original_position":16,"commit_id":"fefc071b84baf61b3e7de230e243dd034034f891","original_commit_id":"fefc071b84baf61b3e7de230e243dd034034f891","user":{"login":"JakeLin","id":573856,"avatar_url":"https://avatars.githubusercontent.com/u/573856?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeLin","html_url":"https://github.com/JakeLin","followers_url":"https://api.github.com/users/JakeLin/followers","following_url":"https://api.github.com/users/JakeLin/following{/other_user}","gists_url":"https://api.github.com/users/JakeLin/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeLin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeLin/subscriptions","organizations_url":"https://api.github.com/users/JakeLin/orgs","repos_url":"https://api.github.com/users/JakeLin/repos","events_url":"https://api.github.com/users/JakeLin/events{/privacy}","received_events_url":"https://api.github.com/users/JakeLin/received_events","type":"User","site_admin":false},"body":"Does it mean we can call `delay` first like `self.blurEffectView.delay(1).animate(animation: .pop(repeatCount: 1))`? ","created_at":"2017-01-06T12:49:07Z","updated_at":"2017-01-06T12:57:29Z","html_url":"https://github.com/IBAnimatable/IBAnimatable/pull/385#discussion_r94941125","pull_request_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/385","_links":{"self":{"href":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/comments/94941125"},"html":{"href":"https://github.com/IBAnimatable/IBAnimatable/pull/385#discussion_r94941125"},"pull_request":{"href":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/385"}}},"pull_request":{"url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/385","id":100387566,"html_url":"https://github.com/IBAnimatable/IBAnimatable/pull/385","diff_url":"https://github.com/IBAnimatable/IBAnimatable/pull/385.diff","patch_url":"https://github.com/IBAnimatable/IBAnimatable/pull/385.patch","issue_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues/385","number":385,"state":"open","locked":false,"title":"[WIP] Chainable animations","user":{"login":"lastMove","id":4633817,"avatar_url":"https://avatars.githubusercontent.com/u/4633817?v=3","gravatar_id":"","url":"https://api.github.com/users/lastMove","html_url":"https://github.com/lastMove","followers_url":"https://api.github.com/users/lastMove/followers","following_url":"https://api.github.com/users/lastMove/following{/other_user}","gists_url":"https://api.github.com/users/lastMove/gists{/gist_id}","starred_url":"https://api.github.com/users/lastMove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lastMove/subscriptions","organizations_url":"https://api.github.com/users/lastMove/orgs","repos_url":"https://api.github.com/users/lastMove/repos","events_url":"https://api.github.com/users/lastMove/events{/privacy}","received_events_url":"https://api.github.com/users/lastMove/received_events","type":"User","site_admin":false},"body":"This PR is a Prototype of the Chainable feature; It's almost fully working and without breaking changes : \r\n\r\n```Swift\r\n self.blurEffectView.animate(animation: .pop(repeatCount: 1))\r\n      .delay(1)\r\n      .then( .slide(way: .out, direction: .left))\r\n      .delay(1)\r\n      .then(.slide(way: .in, direction: .left))\r\n      .then(.pop(repeatCount: 1))\r\n      .completion {\r\n\tprint(\"Completed !\");\r\n    }\r\n```\r\n\r\nHowever I am not entirely satisfy by some points.  I need your help :\r\n\r\n1 - Should The view property of AnimationPromise be `weak` (or maybe `unowned`)  ? \r\n\r\n2 - I wanted to say that the argument of AnimationPromise `initalizer` has to be an UIView implementing Animatable.  The only way I fond is by using Generics. \r\nIs there another solution ?  I need that because the animate Method was defined inside zextension Animatable where Self: UIView` \r\n\r\n3 - when doing view.animate(animation: .pop).delay(2).delay(3).then(.squash) \r\nthe delay applied is 3s. What do you think about that, is it  okay ? \r\n\r\n4 - Coherence issue about   those methods : \r\n\r\n````Swift     public func zoom(_ way: AnimationType.Way, invert: @autoclosure @escaping Bool = default, completion: @autoclosure AnimatableCompletion? = default)\r\n\r\n    public func flip(axis: AnimationType.Axis, completion: @autoclosure @escaping AnimatableCompletion? = default)\r\n````\r\netc\r\nPresently thes methods are publicand not chainable.  Should we put these method privates and encourage the usage of .animate().completion ? \r\n\r\n5 - To avoid editing a lot of methods i did : \r\n\r\n```Swift\r\n    self.duration = configuration.duration\r\n    self.delay = configuration.delay\r\n    self.damping = configuration.damping\r\n    self.velocity = configuration.velocity\r\n    self.force = configuration.force\r\n````\r\nBefore Each Animation i modify, theses properties from the view. It can be confusing, or break working code I guess.","created_at":"2017-01-06T00:00:14Z","updated_at":"2017-01-06T12:57:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"080ca3f4042b68be35b9b8fe6f0edbff2d5a7d81","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/385/commits","review_comments_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/385/comments","review_comment_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues/385/comments","statuses_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/statuses/fefc071b84baf61b3e7de230e243dd034034f891","head":{"label":"IBAnimatable:feature/chainable_animations","ref":"feature/chainable_animations","sha":"fefc071b84baf61b3e7de230e243dd034034f891","user":{"login":"IBAnimatable","id":20221209,"avatar_url":"https://avatars.githubusercontent.com/u/20221209?v=3","gravatar_id":"","url":"https://api.github.com/users/IBAnimatable","html_url":"https://github.com/IBAnimatable","followers_url":"https://api.github.com/users/IBAnimatable/followers","following_url":"https://api.github.com/users/IBAnimatable/following{/other_user}","gists_url":"https://api.github.com/users/IBAnimatable/gists{/gist_id}","starred_url":"https://api.github.com/users/IBAnimatable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBAnimatable/subscriptions","organizations_url":"https://api.github.com/users/IBAnimatable/orgs","repos_url":"https://api.github.com/users/IBAnimatable/repos","events_url":"https://api.github.com/users/IBAnimatable/events{/privacy}","received_events_url":"https://api.github.com/users/IBAnimatable/received_events","type":"Organization","site_admin":false},"repo":{"id":46383222,"name":"IBAnimatable","full_name":"IBAnimatable/IBAnimatable","owner":{"login":"IBAnimatable","id":20221209,"avatar_url":"https://avatars.githubusercontent.com/u/20221209?v=3","gravatar_id":"","url":"https://api.github.com/users/IBAnimatable","html_url":"https://github.com/IBAnimatable","followers_url":"https://api.github.com/users/IBAnimatable/followers","following_url":"https://api.github.com/users/IBAnimatable/following{/other_user}","gists_url":"https://api.github.com/users/IBAnimatable/gists{/gist_id}","starred_url":"https://api.github.com/users/IBAnimatable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBAnimatable/subscriptions","organizations_url":"https://api.github.com/users/IBAnimatable/orgs","repos_url":"https://api.github.com/users/IBAnimatable/repos","events_url":"https://api.github.com/users/IBAnimatable/events{/privacy}","received_events_url":"https://api.github.com/users/IBAnimatable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IBAnimatable/IBAnimatable","description":"Design and prototype customized UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable.","fork":false,"url":"https://api.github.com/repos/IBAnimatable/IBAnimatable","forks_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/forks","keys_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/teams","hooks_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/hooks","issue_events_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues/events{/number}","events_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/events","assignees_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/assignees{/user}","branches_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/branches{/branch}","tags_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/tags","blobs_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/refs{/sha}","trees_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/statuses/{sha}","languages_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/languages","stargazers_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/stargazers","contributors_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/contributors","subscribers_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/subscribers","subscription_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/subscription","commits_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/commits{/sha}","git_commits_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/commits{/sha}","comments_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/comments{/number}","issue_comment_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues/comments{/number}","contents_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/contents/{+path}","compare_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/merges","archive_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/downloads","issues_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues{/number}","pulls_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls{/number}","milestones_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/milestones{/number}","notifications_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/labels{/name}","releases_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/releases{/id}","deployments_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/deployments","created_at":"2015-11-17T23:55:21Z","updated_at":"2017-01-05T21:06:19Z","pushed_at":"2017-01-06T00:00:15Z","git_url":"git://github.com/IBAnimatable/IBAnimatable.git","ssh_url":"git@github.com:IBAnimatable/IBAnimatable.git","clone_url":"https://github.com/IBAnimatable/IBAnimatable.git","svn_url":"https://github.com/IBAnimatable/IBAnimatable","homepage":"","size":25620,"stargazers_count":5796,"watchers_count":5796,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":514,"mirror_url":null,"open_issues_count":44,"forks":514,"open_issues":44,"watchers":5796,"default_branch":"master"}},"base":{"label":"IBAnimatable:master","ref":"master","sha":"9e962d8ad49cd6edca460de68400d6d7fa8b6a07","user":{"login":"IBAnimatable","id":20221209,"avatar_url":"https://avatars.githubusercontent.com/u/20221209?v=3","gravatar_id":"","url":"https://api.github.com/users/IBAnimatable","html_url":"https://github.com/IBAnimatable","followers_url":"https://api.github.com/users/IBAnimatable/followers","following_url":"https://api.github.com/users/IBAnimatable/following{/other_user}","gists_url":"https://api.github.com/users/IBAnimatable/gists{/gist_id}","starred_url":"https://api.github.com/users/IBAnimatable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBAnimatable/subscriptions","organizations_url":"https://api.github.com/users/IBAnimatable/orgs","repos_url":"https://api.github.com/users/IBAnimatable/repos","events_url":"https://api.github.com/users/IBAnimatable/events{/privacy}","received_events_url":"https://api.github.com/users/IBAnimatable/received_events","type":"Organization","site_admin":false},"repo":{"id":46383222,"name":"IBAnimatable","full_name":"IBAnimatable/IBAnimatable","owner":{"login":"IBAnimatable","id":20221209,"avatar_url":"https://avatars.githubusercontent.com/u/20221209?v=3","gravatar_id":"","url":"https://api.github.com/users/IBAnimatable","html_url":"https://github.com/IBAnimatable","followers_url":"https://api.github.com/users/IBAnimatable/followers","following_url":"https://api.github.com/users/IBAnimatable/following{/other_user}","gists_url":"https://api.github.com/users/IBAnimatable/gists{/gist_id}","starred_url":"https://api.github.com/users/IBAnimatable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBAnimatable/subscriptions","organizations_url":"https://api.github.com/users/IBAnimatable/orgs","repos_url":"https://api.github.com/users/IBAnimatable/repos","events_url":"https://api.github.com/users/IBAnimatable/events{/privacy}","received_events_url":"https://api.github.com/users/IBAnimatable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IBAnimatable/IBAnimatable","description":"Design and prototype customized UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable.","fork":false,"url":"https://api.github.com/repos/IBAnimatable/IBAnimatable","forks_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/forks","keys_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/teams","hooks_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/hooks","issue_events_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues/events{/number}","events_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/events","assignees_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/assignees{/user}","branches_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/branches{/branch}","tags_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/tags","blobs_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/refs{/sha}","trees_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/statuses/{sha}","languages_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/languages","stargazers_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/stargazers","contributors_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/contributors","subscribers_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/subscribers","subscription_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/subscription","commits_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/commits{/sha}","git_commits_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/git/commits{/sha}","comments_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/comments{/number}","issue_comment_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues/comments{/number}","contents_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/contents/{+path}","compare_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/merges","archive_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/downloads","issues_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues{/number}","pulls_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls{/number}","milestones_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/milestones{/number}","notifications_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/labels{/name}","releases_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/releases{/id}","deployments_url":"https://api.github.com/repos/IBAnimatable/IBAnimatable/deployments","created_at":"2015-11-17T23:55:21Z","updated_at":"2017-01-05T21:06:19Z","pushed_at":"2017-01-06T00:00:15Z","git_url":"git://github.com/IBAnimatable/IBAnimatable.git","ssh_url":"git@github.com:IBAnimatable/IBAnimatable.git","clone_url":"https://github.com/IBAnimatable/IBAnimatable.git","svn_url":"https://github.com/IBAnimatable/IBAnimatable","homepage":"","size":25620,"stargazers_count":5796,"watchers_count":5796,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":514,"mirror_url":null,"open_issues_count":44,"forks":514,"open_issues":44,"watchers":5796,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/385"},"html":{"href":"https://github.com/IBAnimatable/IBAnimatable/pull/385"},"issue":{"href":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues/385"},"comments":{"href":"https://api.github.com/repos/IBAnimatable/IBAnimatable/issues/385/comments"},"review_comments":{"href":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/385/comments"},"review_comment":{"href":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IBAnimatable/IBAnimatable/pulls/385/commits"},"statuses":{"href":"https://api.github.com/repos/IBAnimatable/IBAnimatable/statuses/fefc071b84baf61b3e7de230e243dd034034f891"}}}}
{"actor":{"display_login":"JakeLin"}}