Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[ios, macos] Add enablePlacementTransitions to MGLStyle. #13565

Merged
merged 2 commits into from
Dec 13, 2018

Conversation

fabian-guerra
Copy link
Contributor

Fixes #13408 and #13035

@fabian-guerra fabian-guerra added GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS labels Dec 12, 2018
@fabian-guerra fabian-guerra added this to the release-iowaska milestone Dec 12, 2018
@fabian-guerra fabian-guerra self-assigned this Dec 12, 2018
@fabian-guerra fabian-guerra requested a review from 1ec5 as a code owner December 12, 2018 23:10
@fabian-guerra fabian-guerra requested a review from a team December 12, 2018 23:10
self.style.transition = transitionTest;

XCTAssert(self.style.transition.delay == transitionTest.delay);
XCTAssert(self.style.transition.duration == transitionTest.duration);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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!

Copy link
Contributor

@julianrex julianrex left a 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.

@fabian-guerra fabian-guerra force-pushed the fabian-placement-transition-13408 branch from e4bdb8e to fbba090 Compare December 13, 2018 00:46
@fabian-guerra fabian-guerra merged commit bbeec8d into master Dec 13, 2018
@fabian-guerra fabian-guerra deleted the fabian-placement-transition-13408 branch December 13, 2018 18:20

The default value of this property is `YES`.
*/
@property (nonatomic, assign) BOOL enablePlacementTransitions;
Copy link
Contributor

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.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants