diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000000..0d08e261a2a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b3c7120e49d..3ac4f7b9b8d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,12 +27,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} @@ -48,6 +48,6 @@ jobs: /usr/bin/xcodebuild build -project /Users/runner/work/mapbox-navigation-ios/mapbox-navigation-ios/MapboxNavigation-SPM.xcodeproj -target Example CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/CHANGELOG.md b/CHANGELOG.md index daee053dcd6..258071fa5d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ * Added PrivacyInfo.xcprivacy support. ([#4573](https://github.com/mapbox/mapbox-navigation-ios/pull/4573)) * Removed `NavigationEventsManager.init(activeNavigationDataSource:passiveNavigationDataSource:accessToken:mobileEventsManager:)` in favor of `NavigationEventsManager.init(activeNavigationDataSource:passiveNavigationDataSource:accessToken:)`. ([#4572](https://github.com/mapbox/mapbox-navigation-ios/pull/4572)) * Fixed a rare issue that could lead to memory corruption under specific conditions. This was resolved by replacing the internal image downloader with brand new actor-based implementation. ([#4588](https://github.com/mapbox/mapbox-navigation-ios/pull/4588)) +* Fixed the possible situation when the upcoming route leg is rendered above the active route leg. ([#4588](https://github.com/mapbox/mapbox-navigation-ios/pull/4588)) ## v2.17.0 diff --git a/Sources/MapboxNavigation/NavigationMapView+VanishingRouteLine.swift b/Sources/MapboxNavigation/NavigationMapView+VanishingRouteLine.swift index 48c3c44e0a4..f1f5a66e350 100644 --- a/Sources/MapboxNavigation/NavigationMapView+VanishingRouteLine.swift +++ b/Sources/MapboxNavigation/NavigationMapView+VanishingRouteLine.swift @@ -433,8 +433,8 @@ extension NavigationMapView { return self.congestionColor(for: nil, isMain: isMain) } } - - return self.routeCasingColor + + return .clear } }) diff --git a/Tests/MapboxNavigationTests/NavigationMapViewTests.swift b/Tests/MapboxNavigationTests/NavigationMapViewTests.swift index cd46c5879c8..4ddd4878f8c 100644 --- a/Tests/MapboxNavigationTests/NavigationMapViewTests.swift +++ b/Tests/MapboxNavigationTests/NavigationMapViewTests.swift @@ -426,6 +426,27 @@ class NavigationMapViewTests: TestCase { XCTAssertEqual(routeLineGradient[0.0], navigationMapView.trafficLowColor) } + func testGenerateRouteLineGradientWithMultilegRoute() { + let coordinates: [CLLocationCoordinate2D] = [ + CLLocationCoordinate2D(latitude: 37.798, longitude: -122.398), + CLLocationCoordinate2D(latitude: 37.795, longitude: -122.398), + CLLocationCoordinate2D(latitude: 37.795, longitude: -122.395), + ] + let congestionSegment: CongestionSegment = (coordinates, CongestionLevel.low) + var feature = Feature(geometry: .lineString(LineString(congestionSegment.0))) + feature.properties = [ + CongestionAttribute: .string(String(describing: congestionSegment.1)), + CurrentLegAttribute: false + ] + let congestionFeatures = [feature] + + let routeLineGradient = navigationMapView.routeLineCongestionGradient(congestionFeatures: congestionFeatures, + isMain: true, + isSoft: false) + XCTAssertEqual(routeLineGradient.count, 1) + XCTAssertEqual(routeLineGradient[0.0], .clear) + } + func testGenerateRouteLineRestrictedGradient() { let coordinates: [CLLocationCoordinate2D] = [ CLLocationCoordinate2D(latitude: 1, longitude: 0),