Skip to content
This repository was archived by the owner on Aug 13, 2021. It is now read-only.

Commit eedf8eb

Browse files
author
Jeff Verkoeyen
committed
Initial pass at release notes.
1 parent 6708200 commit eedf8eb

File tree

1 file changed

+315
-2
lines changed

1 file changed

+315
-2
lines changed

CHANGELOG.md

Lines changed: 315 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,320 @@
1-
# #develop#
1+
# 2.0.0
22

3-
TODO: Enumerate changes.
3+
## Breaking changes
44

5+
• The `IndefiniteObservable` dependency has been bumped to 4.0.0. [View the release notes](https://github.com/material-motion/indefinite-observable-swift/releases/tag/v4.0.0).
6+
7+
• The `Metadata` and `Inspectable` types have been removed from Material Motion. All related APIs have been simplified accordingly.
8+
9+
• The `MotionRuntime.toGraphViz` API has been removed. There is no replacement API.
10+
11+
`Tossable`'s `init(system:draggable:)` has been removed. Use `init(spring:draggable:)` instead.
12+
13+
`SelfDismissingTransition`'s `willPresent(fore:dismisser:)` is no longer a static method. Implement the method as an instance method instead.
14+
15+
`Transition` is now a class protocol. This means that only object-types can conform to `Transition`.
16+
17+
`TransitionController`'s `dismisser` has been removed. All methods have been moved directly to the TransitionController object.
18+
19+
`Tween`'s `keyPositions` has been removed. Use `offsets` instead.
20+
21+
`MotionRuntime`'s `interactions(for:filter:)` has been removed. Use `interactions(ofType:for:)` instead.
22+
23+
## New features
24+
25+
### Reactive architecture
26+
27+
• Subscriptions no longer automatically unsubscribe when the Subscription object is released. Subscriptions will stay active for as long as the head of the stream is alive.
28+
29+
• Reactive types are now global and shared across all instances of MotionRuntime. You can use `Reactive(object)` to fetch a cached reactive version of a supported type.
30+
31+
• MotionRuntime now supports a `.get` for UISlider instances. This will return an Observable of the slider's value.
32+
33+
• New operator `ignoreUntil`.
34+
35+
• New reactive variant of operator `rubberBanded(outsideOf:maxLength:)`.
36+
37+
• New operator for float types `toString(format:)`.
38+
39+
• New `ReactiveScrollViewDelegate` API turns UIScrollViewDelegate events into observable streams.
40+
41+
For example, the delegate itself is an observable on the scroll view's content offset:
42+
43+
```swift
44+
let delegate = ReactiveScrollViewDelegate()
45+
scrollView.delegate = delegate
46+
delegate.x().subscribeToValue { contentOffset in
47+
print(contentOffset)
48+
}
49+
```
50+
51+
• New `ReactiveButtonTarget` API for building reactive UIButtons.
52+
53+
`MotionRuntime` has a new API `start(_:when:is:)` for starting interactions when another interaction reaches a given state.
54+
55+
`MotionRuntime` has a new `isBeingManipulated` stream. This stream emits true when any `Manipulable` interaction becomes active and false when all `Manipulable` interactions come to rest.
56+
57+
### Interactions
58+
59+
`MotionRuntime` now has a new `isBeingManipulated` property that indicates whether any manipulation interaction is active.
60+
61+
Any interaction that conforms to the new `Manipulation` type will affect the runtime's `isBeingManipulated` property.
62+
63+
`Draggable` now has a `resistance` property that can be used to create drag resistance beyond a draggable region.
64+
65+
```swift
66+
draggable.resistance.perimeter.value = someRect
67+
```
68+
69+
`Tween` has new properties for creating repeating animations: `repeatCount`, `repeatDuration`, and `autoreverses`.
70+
71+
These properties directly map to the corresponding properties in Core Animation.
72+
73+
### Transitions
74+
75+
• New `TransitionWithFallback` protocol allows transitions to swap themselves out for another transition instance.
76+
77+
• New `TransitionWithPresentation` protocol allows transitions to customize their presentation using an iOS presentation controller. See the modal dialog case study for an example of using this new functionality.
78+
79+
• New `TransitionWithTermination` protocol allows transitions to perform cleanup logic at the end of a transition.
80+
81+
`TransitionContext`'s `gestureRecognizers` is now settable. This makes it possible to add arbitrary gesture recognizers to a transition.
82+
83+
## Source changes
84+
85+
* [Attempt to reduce the flakiness of the PropertiesNotReleasedWhenDereferenced test.](https://github.com/material-motion/material-motion-swift/commit/e0090c9c0175a1dd2cee7a20edde951faed577bf) (Jeff Verkoeyen)
86+
* [Move fallback calculations to later in the transition lifecycle.](https://github.com/material-motion/material-motion-swift/commit/7ae1b04bbd458c65c7c4d09152c90464ef2fd5bc) (Jeff Verkoeyen)
87+
* [Add a backgroundColor property to Reactive+CALayer.](https://github.com/material-motion/material-motion-swift/commit/9c40e0b8e045312a1c9b256f8fd166a86e70bb2d) (Jeff Verkoeyen)
88+
* [Add a defaultModalPresentationStyle API for transitions with presentation.](https://github.com/material-motion/material-motion-swift/commit/c11949ebad03e306a755325e4f27bfe517485bdf) (Jeff Verkoeyen)
89+
* [Allow TransitionWithPresentation to return nil for conditional presentation.](https://github.com/material-motion/material-motion-swift/commit/5a6570a1e4fe8eef29d3fcffd4d1219fdff47590) (Jeff Verkoeyen)
90+
* [Add support for fallback transitions.](https://github.com/material-motion/material-motion-swift/commit/12acff94e9d0070014c41dd39a7083d57dd4ff5f) (Jeff Verkoeyen)
91+
* [Make TransitionWithPresentation's method an instance method.](https://github.com/material-motion/material-motion-swift/commit/4ad2c55e1cc1f9b5efd50f39195b0d23085b2af4) (Jeff Verkoeyen)
92+
* [Don't attempt to slow down CASpringAnimation animations when slow-motion animations is enabled.](https://github.com/material-motion/material-motion-swift/commit/9d796f374bfb859f5bff1170ca2c1da407373a9d) (Jeff Verkoeyen)
93+
* [Add support for pre/post delay to TransitionTween.](https://github.com/material-motion/material-motion-swift/commit/c0b341672856aa7447f339688bba067e9868679d) (Jeff Verkoeyen)
94+
* [Also slow down the beginTime for tweens when simulator slow motion is enabled.](https://github.com/material-motion/material-motion-swift/commit/fa28ef906310d1ae6794959037d48de98339227b) (Jeff Verkoeyen)
95+
* [When emitting Tweens with a delay, set the fill mode to backward.](https://github.com/material-motion/material-motion-swift/commit/b3908da854352e882b6084a7939e00175d57097b) (Jeff Verkoeyen)
96+
* [Resolve new Xcode 8.3.2 warnings.](https://github.com/material-motion/material-motion-swift/commit/ad99804c4c0c3723e0d3ab7e6ee5a8f7581fee73) (Jeff Verkoeyen)
97+
* [Remove all deprecated APIs in preparation for major release.](https://github.com/material-motion/material-motion-swift/commit/715c97222ab8c73c2432f01033d1a3b12bd616b8) (Jeff Verkoeyen)
98+
* [Remove Metadata.](https://github.com/material-motion/material-motion-swift/commit/fddbc7e888f41e4ac0e10803c365d8116d245b57) (Jeff Verkoeyen)
99+
* [Rename keyPositions to offsets](https://github.com/material-motion/material-motion-swift/commit/8d73d04ff707851e639e11c48f88ec1a363a66e3) (Eric Tang)
100+
* [Add a reactive button target type and an initial isHighlighted stream.](https://github.com/material-motion/material-motion-swift/commit/af75058c6896195a689873eab06613a2adec2798) (Jeff Verkoeyen)
101+
* [Add format support to the toString operator for numerical types.](https://github.com/material-motion/material-motion-swift/commit/6c9d84da86f4d5e614c6e1b9e9cc5baed685a1be) (Jeff Verkoeyen)
102+
* [Add runtime.get for UISlider instances.](https://github.com/material-motion/material-motion-swift/commit/0bcd0f14adcfd4d0f5aa92bfe56647e00372cf2d) (Jeff Verkoeyen)
103+
* [Add reactive UILabel type with text property.](https://github.com/material-motion/material-motion-swift/commit/5bef83680ad50d7b683f7f61e923274e6996ef08) (Jeff Verkoeyen)
104+
* [When using a transition with presentation, use the .custom modal presentation style.](https://github.com/material-motion/material-motion-swift/commit/b0be085ca0a5474e3c27a0ba1bf1029161e28471) (Jeff Verkoeyen)
105+
* [Allow transition types to be instantiated and stored on the transition controller.](https://github.com/material-motion/material-motion-swift/commit/5b6149d5646e3fab1188e8e2c1714d02dc5d0ce8) (Jeff Verkoeyen)
106+
* [Remove the foreAlignmentEdge property from the transition controller.](https://github.com/material-motion/material-motion-swift/commit/235a3e7f3a4b78678b6e841c6e196471436555f4) (Jeff Verkoeyen)
107+
* [Add support for customizing transition presentation.](https://github.com/material-motion/material-motion-swift/commit/d93233e8e433592d6445da9a5bfc382d5f622f44) (Jeff Verkoeyen)
108+
* [Avoid excessive TransitionTween emissions when the transition direction changes.](https://github.com/material-motion/material-motion-swift/commit/33f60d7b260f3c4b9f0c8ad64230bfd68d643e71) (Jeff Verkoeyen)
109+
* [Added ignoreUntil and simplified slop](https://github.com/material-motion/material-motion-swift/commit/86bf12b91ee6d2f1857160a30582221a8a9c4ce7) (Eric Tang)
110+
* [Added unit test](https://github.com/material-motion/material-motion-swift/commit/cb8ba4ff8387d688e47f84cd3e5980ef6ab8d030) (Eric Tang)
111+
* [Swap params for runtime.interactions() API](https://github.com/material-motion/material-motion-swift/commit/7fe07b0f1e3d599aba8727645367df0b553df529) (Eric Tang)
112+
* [Fix build failure.](https://github.com/material-motion/material-motion-swift/commit/98065f2504dec4da267e6f60c7bdd3b7809b3215) (Jeff Verkoeyen)
113+
* [Add a ReactiveScrollViewDelegate and replace usage of the MotionRuntime in the carousel demo.](https://github.com/material-motion/material-motion-swift/commit/db2d5bc8540b282e7dcc72271db62ff3d9565071) (Jeff Verkoeyen)
114+
* [Mark all MotionObservable subscribe methods with @discardableResult.](https://github.com/material-motion/material-motion-swift/commit/ffc8f8c7d3557587721db5e2f1cff0d37ceee0f5) (Jeff Verkoeyen)
115+
* [Add a new Reactive type for querying reactive properties.](https://github.com/material-motion/material-motion-swift/commit/be0ea019c4d2db5ec63e625895f64ec73ca7b702) (Jeff Verkoeyen)
116+
* [Shorten the delayBy test delay.](https://github.com/material-motion/material-motion-swift/commit/67cb7b18dccce117e1a7d248e0919b4f9edb613d) (Jeff Verkoeyen)
117+
* [Added new start function to MotionRuntime](https://github.com/material-motion/material-motion-swift/commit/9c5010e54b8380eae6ce337408aeb1778fc39cc8) (Eric Tang)
118+
* [Reduce flakiness of delay test.](https://github.com/material-motion/material-motion-swift/commit/d584666c449e5a6304a22e8f2fcdcb1d66b6e56a) (Jeff Verkoeyen)
119+
* [Move Timeline to a timeline folder.](https://github.com/material-motion/material-motion-swift/commit/f83c027067fe0ebcc0792d69648362660bcb3279) (Jeff Verkoeyen)
120+
* [Bump IndefiniteObservable to 4.0 and add explicit unsubscriptions to the runtime.](https://github.com/material-motion/material-motion-swift/commit/7adfe179843218713e11001a7839144b0203124f) (Jeff Verkoeyen)
121+
* [Add repeat APIs to Tween](https://github.com/material-motion/material-motion-swift/commit/5022aad2777f16fcb373e2c155e1f0d47ada9a36) (Eric Tang)
122+
* [Change runtime.interactions API to use an ofType: argument instead of a block.](https://github.com/material-motion/material-motion-swift/commit/d6ab9d281ea15f388fe0d099686bb812df3caba8) (Jeff Verkoeyen)
123+
* [Add a resistance property to Draggable.](https://github.com/material-motion/material-motion-swift/commit/dbff13d9018514e67d54742cac1dd4e176ac2b30) (Jeff Verkoeyen)
124+
* [Add a Manipulation type and implement UIKit view controller transitioning interactivity APIs.](https://github.com/material-motion/material-motion-swift/commit/9fa2b22dabc9a7fcd7bfb9a702007db1680d8fd4) (Jeff Verkoeyen)
125+
* [View controllers are only interactive if at least one gesture recognizer is active.](https://github.com/material-motion/material-motion-swift/commit/a921f721ffc5c8b9cc75dc27b589eb949f5c7112) (Jeff Verkoeyen)
126+
* [Ensure that system animations take effect during view controller transitions.](https://github.com/material-motion/material-motion-swift/commit/9b2347005135d11a7c28a5b27af8730c6467724b) (Jeff Verkoeyen)
127+
* [Operators that use _map no longer transform velocity by default.](https://github.com/material-motion/material-motion-swift/commit/dab2e7de73cb8b4485b548b3ca192b9b9484db88) (Jeff Verkoeyen)
128+
* [When no gesture recognizer is provided to a gestural interaction that expects one, the interaction now does nothing.](https://github.com/material-motion/material-motion-swift/commit/d43a5f69cdcf1029273f8873f225845c62a994d1) (Jeff Verkoeyen)
129+
* [Fix build failure.](https://github.com/material-motion/material-motion-swift/commit/3e471897d3b9f2d401ba6d125b480bf1c621405e) (Jeff Verkoeyen)
130+
* [Add foreAlignmentEdge property to TransitionController.](https://github.com/material-motion/material-motion-swift/commit/3498a0f8e7d177e21e89fc2934c371423e79f1f2) (Jeff Verkoeyen)
131+
* [Deprecate transitionController.dismisser and move the APIs into TransitionController.](https://github.com/material-motion/material-motion-swift/commit/e2ad598ae466e4dfe034be751796fd96a82cb37b) (Jeff Verkoeyen)
132+
* [Add missing imports.](https://github.com/material-motion/material-motion-swift/commit/3f16a4d90fc842999fb23b3af7954c69bf6c64a2) (Jeff Verkoeyen)
133+
* [Add missing Foundation import.](https://github.com/material-motion/material-motion-swift/commit/b31c1361ca6744c0c069db98bb6c6b89e3ffbb4b) (Jeff Verkoeyen)
134+
* [Add Togglable conformity to Rotatable and Scalable.](https://github.com/material-motion/material-motion-swift/commit/f90e15b7d62b7f7102e7827a5a850bcbfa7a0451) (Jeff Verkoeyen)
135+
136+
## API changes
137+
138+
Auto-generated by running:
139+
140+
apidiff origin/stable release-candidate swift MaterialMotion.xcworkspace MaterialMotion
141+
142+
### Debugging
143+
144+
#### Inspectable
145+
146+
*removed* protocol: `Inspectable`
147+
148+
#### Metadata
149+
150+
*removed* class: `Metadata`
151+
152+
### Interactions
153+
154+
#### Draggable
155+
156+
*new* var: `resistance` in `Draggable`
157+
158+
*modified* class: `Draggable`
159+
160+
| Type of change: | Declaration |
161+
|---|---|
162+
| From: | `public final class Draggable : Gesturable<UIPanGestureRecognizer>, Interaction, Togglable, Stateful` |
163+
| To: | `public final class Draggable : Gesturable<UIPanGestureRecognizer>, Interaction, Togglable, Manipulation` |
164+
165+
#### Manipulation
166+
167+
*new* protocol: `Manipulation`
168+
169+
#### Rotatable
170+
171+
*modified* class: `Rotatable`
172+
173+
| Type of change: | Declaration |
174+
|---|---|
175+
| From: | `public final class Rotatable : Gesturable<UIRotationGestureRecognizer>, Interaction, Togglable, Stateful` |
176+
| To: | `public final class Rotatable : Gesturable<UIRotationGestureRecognizer>, Interaction, Togglable, Manipulation` |
177+
178+
#### Scalable
179+
180+
*modified* class: `Scalable`
181+
182+
| Type of change: | Declaration |
183+
|---|---|
184+
| From: | `public final class Scalable : Gesturable<UIPinchGestureRecognizer>, Interaction, Togglable, Stateful` |
185+
| To: | `public final class Scalable : Gesturable<UIPinchGestureRecognizer>, Interaction, Togglable, Manipulation` |
186+
187+
#### Tossable
188+
189+
*removed* method: `init(system:draggable:)` in `Tossable`
190+
191+
#### Tween
192+
193+
*new* var: `offsets` in `Tween`
194+
195+
*new* var: `repeatCount` in `Tween`
196+
197+
*new* var: `repeatDuration` in `Tween`
198+
199+
*new* var: `autoreverses` in `Tween`
200+
201+
*removed* var: `keyPositions` in `Tween`
202+
203+
### Reactive architecture
204+
205+
#### MotionObservableConvertible
206+
207+
*new* method: `ignoreUntil(_:)` in `MotionObservableConvertible`
208+
209+
*new* method: `rubberBanded(outsideOf:maxLength:)` in `MotionObservableConvertible`
210+
211+
*new* method: `toString(format:)` in `MotionObservableConvertible`
212+
213+
#### MotionRuntime
214+
215+
*new* method: `interactions(ofType:for:)` in `MotionRuntime`
216+
217+
*new* method: `start(_:when:is:)` in `MotionRuntime`
218+
219+
*new* var: `isBeingManipulated` in `MotionRuntime`
220+
221+
*removed* method: `interactions(for:filter:)` in `MotionRuntime`
222+
223+
*removed* method: `asGraphviz()` in `MotionRuntime`
224+
225+
#### ReactiveButtonTarget
226+
227+
*new* class: `ReactiveButtonTarget`
228+
229+
*new* var: `didHighlight` in `ReactiveButtonTarget`
230+
231+
#### ReactiveUIView
232+
233+
*removed* class: `ReactiveUIView`
234+
235+
#### ReactiveCAShapeLayer
236+
237+
*removed* class: `ReactiveCAShapeLayer`
238+
239+
#### ReactiveScrollViewDelegate
240+
241+
*new* class: `ReactiveScrollViewDelegate`
242+
243+
### Transitions
244+
245+
#### SelfDismissingTransition
246+
247+
*new* method: `willPresent(fore:dismisser:)` in `SelfDismissingTransition`
248+
249+
*removed* static method: `willPresent(fore:dismisser:)` in `SelfDismissingTransition`
250+
251+
#### Transition
252+
253+
*removed* method: `init()` in `Transition`
254+
255+
*modified* protocol: `Transition`
256+
257+
| Type of change: | Declaration |
258+
|---|---|
259+
| From: | `public protocol Transition` |
260+
| To: | `public protocol Transition : class` |
261+
262+
#### TransitionWithFallback
263+
264+
*new* protocol: `TransitionWithFallback`
265+
266+
*new* method: `fallbackTansition(withContext:)` in `TransitionWithFallback`
267+
268+
#### TransitionWithPresentation
269+
270+
*new* protocol: `TransitionWithPresentation`
271+
272+
*new* method: `presentationController(forPresented:presenting:source:)` in `TransitionWithPresentation`
273+
274+
*new* method: `defaultModalPresentationStyle()` in `TransitionWithPresentation`
275+
276+
#### TransitionWithTermination
277+
278+
*new* protocol: `TransitionWithTermination`
279+
280+
*new* method: `didEndTransition(withContext:runtime:)` in `TransitionWithTermination`
281+
282+
#### TransitionContext
283+
284+
*modified* var: `gestureRecognizers` in `TransitionContext`
285+
286+
| Type of change: | Declaration |
287+
|---|---|
288+
| From: | `public var gestureRecognizers: Set<UIGestureRecognizer> { get }` |
289+
| To: | `public let gestureRecognizers: Set<UIGestureRecognizer>` |
290+
291+
#### TransitionController
292+
293+
*new* method: `disableSimultaneousRecognition(of:)` in `TransitionController`
294+
295+
*new* var: `presentationController` in `TransitionController`
296+
297+
*new* method: `topEdgeDismisserDelegate(for:)` in `TransitionController`
298+
299+
*new* var: `gestureRecognizers` in `TransitionController`
300+
301+
*new* var: `transition` in `TransitionController`
302+
303+
*new* var: `gestureDelegate` in `TransitionController`
304+
305+
*new* method: `dismissWhenGestureRecognizerBegins(_:)` in `TransitionController`
306+
307+
*removed* var: `transitionType` in `TransitionController`
308+
309+
*removed* var: `dismisser` in `TransitionController`
310+
311+
## Non-source changes
312+
313+
* [Update modal dialog example to make use of a presentation controller.](https://github.com/material-motion/material-motion-swift/commit/40decaf295aa1e41417e7f4dec8a7391c29e27ab) (Jeff Verkoeyen)
314+
* [Update CocoaPods to 1.2.1.](https://github.com/material-motion/material-motion-swift/commit/483d52bf017a4c760c83a0d0a6150559d9c5f9e8) (Jeff Verkoeyen)
315+
* [Add Discord badge](https://github.com/material-motion/material-motion-swift/commit/7b5e51f534a206f054b40a9a61a1bdd03a8da957) (Brenton Simpson)
316+
* [Remove use of Reactive type in carousel example.](https://github.com/material-motion/material-motion-swift/commit/27edf6b1f12c2587fa096c22ed9d3d484fc0ca39) (Jeff Verkoeyen)
317+
* [Make both push back case studies use a light status bar in the modal view.](https://github.com/material-motion/material-motion-swift/commit/eaecd862aabb193de5a45024f52365fa1fbcb027) (Jeff Verkoeyen)
5318

6319
# 1.3.0
7320

0 commit comments

Comments
 (0)