-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Content insets and more modifiers #28
Conversation
…porting navigation use cases
public init( | ||
styleURL: URL, | ||
constantCamera: MapViewCamera, | ||
@MapViewContentBuilder _ makeMapContent: () -> [StyleLayerDefinition] = { [] } | ||
) { | ||
self.init(styleURL: styleURL, | ||
camera: .constant(constantCamera), | ||
makeMapContent) |
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.
Potentially controversial breaking change: I'm removing this since it's not that hard to do this yourself (just a few more characters). The annoyance of having to keep the convenience initializers in sync with the main one will get annoying over time, so I'm of a mind to remove this.
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.
cc @hactar since I know you're a somewhat active user.
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.
Thanks - not using that one - and don't worry about me, I am aware that I am using a library at version 0.0.6, I'm expecting to be hit with a lot of breaking changes 😄
"CameraState.centered(onCoordinate: CLLocationCoordinate2D(latitude: 12.3, longitude: 23.4)" | ||
) | ||
let state: CameraState = .centered(onCoordinate: coordinate) | ||
XCTAssertEqual(state, .centered(onCoordinate: coordinate)) |
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.
Note that I switched all these unit tests to snapshot tests; will keep better separation between code and test fixtures, and makes it easier to add new cases. All we're doing is ensuring we catch changes anyways.
Had to fix up a few things after doing some local integration with Ferrostar, but it's looking solid now; ready to merge after a review. |
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 overarching theme we need to get a handle on is our DispatchQueue/actor setup. I feel like most of our issues in this library can be solved by adding @MainActor
to the encapsulating class since it's mainly UI centric (E.g. probably the coordinator itself in addition to what I flagged).
With ferrostar we probably need to dive into the swift 6 concurrency stuff a bit more broadly.
Mostly toward supporting navigation use cases, but fixed up a lot of things along the way, including adding the first batch of chainable modifiers via extension methods.