-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ios, macos] Add enablePlacementTransitions to MGLStyle. #13565
Conversation
self.style.transition = transitionTest; | ||
|
||
XCTAssert(self.style.transition.delay == transitionTest.delay); | ||
XCTAssert(self.style.transition.duration == transitionTest.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.
Does this also need to test enablePlacementTransitions
?
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.
Since I split the functionality in transition
and enablePlacementTransitions
I'm testing the latter in it's own test method.
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.
Ah yes, I'm thinking of a previous discussion I saw on the previous PR!
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.
Just the question about the test checking the default enablePlacementTransitions
.
e4bdb8e
to
fbba090
Compare
|
||
The default value of this property is `YES`. | ||
*/ | ||
@property (nonatomic, assign) BOOL enablePlacementTransitions; |
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 property has an imperative name, which makes it look like an action method in Objective-C:
// Initial state: placement transitions are disabled.
[style enablePlacementTransitions];
// Expected behavior: placement transitions are enabled.
// Actual behavior: nothing changed; return value discarded.
This property should be renamed to placementTransitionsEnabled
or preferably performsPlacementTransitions
. (enablesPlacementTransitions
is problematic because it’s the developer, not the style, that enables them.)
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.
Fixes #13408 and #13035