Skip to content

Commit

Permalink
[release/v11.1] Update to 11.1.0-rc.1 (#1964)
Browse files Browse the repository at this point in the history
* Check DocC top sections (#1954)

* Update license year (#1958)

* MAPSIOS-1254: Fix the annotation could disappear when dragged (#1962)

* Update to 11.1.0-rc.1 (#1963)

---------

Co-authored-by: Ivan Persidsky <[email protected]>
  • Loading branch information
OdNairy and persidskiy authored Jan 4, 2024
1 parent 58aa4f2 commit 42d28e7
Show file tree
Hide file tree
Showing 19 changed files with 98 additions and 40 deletions.
8 changes: 4 additions & 4 deletions Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/mapbox-common-ios.git",
"state" : {
"revision" : "6c8d234c47d3e04c66eaca94f1ff4aff39722f09",
"version" : "24.1.0-beta.2"
"revision" : "660cc68685c4ca551cc2815ab3607d54d906c8a7",
"version" : "24.1.0-rc.1"
}
},
{
"identity" : "mapbox-core-maps-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/mapbox-core-maps-ios.git",
"state" : {
"revision" : "2f478b611291ef60d77a3b89549b2765ab417cce",
"version" : "11.1.0-beta.1"
"revision" : "8b3d2e9bf0886995cd6c05f39f7a5ac4691d0fc9",
"version" : "11.1.0-rc.1"
}
},
{
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Mapbox welcomes participation and contributions from everyone.

## main

## 11.1.0-rc.1 - 04 January, 2024

### Bug fixes 🐞

* Fix the bug where the annotation could disappear when it is dragged.

## 11.1.0-beta.1 - 19 December, 2023

⚠️⚠️⚠️ Known Issues ⚠️⚠️⚠️
Expand Down
6 changes: 3 additions & 3 deletions LICENSE.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions MapboxMaps.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |m|

maps_version = '11.1.0-beta.1'
maps_version = '11.1.0-rc.1'

m.name = 'MapboxMaps'
m.version = maps_version
Expand All @@ -21,8 +21,8 @@ Pod::Spec.new do |m|
m.source_files = 'Sources/MapboxMaps/**/*.{swift,h}'
m.resource_bundles = { 'MapboxMapsResources' => ['Sources/**/*.{xcassets,strings}', 'Sources/MapboxMaps/MapboxMaps.json', 'Sources/MapboxMaps/PrivacyInfo.xcprivacy'] }

m.dependency 'MapboxCoreMaps', '11.1.0-beta.1'
m.dependency 'MapboxCommon', '24.1.0-beta.2'
m.dependency 'MapboxCoreMaps', '11.1.0-rc.1'
m.dependency 'MapboxCommon', '24.1.0-rc.1'
m.dependency 'Turf', '2.7.0'

end
8 changes: 4 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/mapbox-common-ios.git",
"state" : {
"revision" : "6c8d234c47d3e04c66eaca94f1ff4aff39722f09",
"version" : "24.1.0-beta.2"
"revision" : "660cc68685c4ca551cc2815ab3607d54d906c8a7",
"version" : "24.1.0-rc.1"
}
},
{
"identity" : "mapbox-core-maps-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/mapbox-core-maps-ios.git",
"state" : {
"revision" : "2f478b611291ef60d77a3b89549b2765ab417cce",
"version" : "11.1.0-beta.1"
"revision" : "8b3d2e9bf0886995cd6c05f39f7a5ac4691d0fc9",
"version" : "11.1.0-rc.1"
}
},
{
Expand Down
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import PackageDescription

let coreMaps = MapsDependency.coreMaps(version: "11.1.0-beta.1")
let coreMaps = MapsDependency.coreMaps(version: "11.1.0-rc.1")

let common = MapsDependency.common(version: "24.1.0-beta.2")
let common = MapsDependency.common(version: "24.1.0-rc.1")

let mapboxMapsPath: String? = nil

Expand Down Expand Up @@ -76,7 +76,7 @@ struct MapsDependency {
self.registryProjectName = registryProjectName
self.registryFileName = registryFileName
}

let name: String
let version: String
let checksum: String?
Expand Down Expand Up @@ -125,7 +125,7 @@ struct MapsDependency {
}

var repositoryURL: String { return "https://github.com/mapbox/\(repositoryName).git" }

var registryReleaseFolder: String { isSnapshot ? "snapshots" : "releases" }

var registryURL: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,6 @@ public class CircleAnnotationManager: AnnotationManagerInternal {
}

if let idx = mainAnnotations.lastIndex(where: predicate) {
let annotation = mainAnnotations.remove(at: idx)
draggedAnnotations.append(annotation)
draggedAnnotationIndex = draggedAnnotations.endIndex - 1

insertDraggedLayerAndSourceOnce {
let source = GeoJSONSource(id: dragId)
let layer = CircleLayer(id: dragId, source: dragId)
Expand All @@ -329,6 +325,10 @@ public class CircleAnnotationManager: AnnotationManagerInternal {
Log.error(forMessage: "Add drag source/layer \(error)", category: "Annotations")
}
}

let annotation = mainAnnotations.remove(at: idx)
draggedAnnotations.append(annotation)
draggedAnnotationIndex = draggedAnnotations.endIndex - 1
return true
}
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,10 +651,6 @@ public class PointAnnotationManager: AnnotationManagerInternal {
}

if let idx = mainAnnotations.lastIndex(where: predicate) {
let annotation = mainAnnotations.remove(at: idx)
draggedAnnotations.append(annotation)
draggedAnnotationIndex = draggedAnnotations.endIndex - 1

insertDraggedLayerAndSourceOnce {
let source = GeoJSONSource(id: dragId)
let layer = SymbolLayer(id: dragId, source: dragId)
Expand All @@ -665,6 +661,10 @@ public class PointAnnotationManager: AnnotationManagerInternal {
Log.error(forMessage: "Add drag source/layer \(error)", category: "Annotations")
}
}

let annotation = mainAnnotations.remove(at: idx)
draggedAnnotations.append(annotation)
draggedAnnotationIndex = draggedAnnotations.endIndex - 1
return true
}
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,6 @@ public class PolygonAnnotationManager: AnnotationManagerInternal {
}

if let idx = mainAnnotations.lastIndex(where: predicate) {
let annotation = mainAnnotations.remove(at: idx)
draggedAnnotations.append(annotation)
draggedAnnotationIndex = draggedAnnotations.endIndex - 1

insertDraggedLayerAndSourceOnce {
let source = GeoJSONSource(id: dragId)
let layer = FillLayer(id: dragId, source: dragId)
Expand All @@ -319,6 +315,10 @@ public class PolygonAnnotationManager: AnnotationManagerInternal {
Log.error(forMessage: "Add drag source/layer \(error)", category: "Annotations")
}
}

let annotation = mainAnnotations.remove(at: idx)
draggedAnnotations.append(annotation)
draggedAnnotationIndex = draggedAnnotations.endIndex - 1
return true
}
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,6 @@ public class PolylineAnnotationManager: AnnotationManagerInternal {
}

if let idx = mainAnnotations.lastIndex(where: predicate) {
let annotation = mainAnnotations.remove(at: idx)
draggedAnnotations.append(annotation)
draggedAnnotationIndex = draggedAnnotations.endIndex - 1

insertDraggedLayerAndSourceOnce {
let source = GeoJSONSource(id: dragId)
let layer = LineLayer(id: dragId, source: dragId)
Expand All @@ -369,6 +365,10 @@ public class PolylineAnnotationManager: AnnotationManagerInternal {
Log.error(forMessage: "Add drag source/layer \(error)", category: "Annotations")
}
}

let annotation = mainAnnotations.remove(at: idx)
draggedAnnotations.append(annotation)
draggedAnnotationIndex = draggedAnnotations.endIndex - 1
return true
}
return false
Expand Down
2 changes: 1 addition & 1 deletion Sources/MapboxMaps/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<key>CFBundleShortVersionString</key>
<string>11.1.0</string>
<key>CFBundleVersion</key>
<string>110</string>
<string>111</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Sources/MapboxMaps/MapboxMaps.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version" : "11.1.0-beta.1"
"version" : "11.1.0-rc.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,11 @@ final class CircleAnnotationManagerTests: XCTestCase, AnnotationInteractionDeleg
XCTAssertEqual(addLayerParameters.layerPosition, .above(manager.id))
XCTAssertEqual(addedLayer.id, manager.id + "_drag")

XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 0)
$displayLink.send()
XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 1)
XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.last?.parameters.id, "\(manager.id)_drag")

_ = manager.handleDragBegin(with: "circle1", context: .zero)

XCTAssertEqual(style.addSourceStub.invocations.count, 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3306,6 +3306,11 @@ final class PointAnnotationManagerTests: XCTestCase, AnnotationInteractionDelega
XCTAssertEqual(addLayerParameters.layerPosition, .above(manager.id))
XCTAssertEqual(addedLayer.id, manager.id + "_drag")

XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 0)
$displayLink.send()
XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 1)
XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.last?.parameters.id, "\(manager.id)_drag")

_ = manager.handleDragBegin(with: "point1", context: .zero)

XCTAssertEqual(style.addSourceStub.invocations.count, 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ final class PolygonAnnotationManagerTests: XCTestCase, AnnotationInteractionDele
XCTAssertEqual(addLayerParameters.layerPosition, .above(manager.id))
XCTAssertEqual(addedLayer.id, manager.id + "_drag")

XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 0)
$displayLink.send()
XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 1)
XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.last?.parameters.id, "\(manager.id)_drag")

_ = manager.handleDragBegin(with: "polygon1", context: .zero)

XCTAssertEqual(style.addSourceStub.invocations.count, 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,11 @@ final class PolylineAnnotationManagerTests: XCTestCase, AnnotationInteractionDel
XCTAssertEqual(addLayerParameters.layerPosition, .above(manager.id))
XCTAssertEqual(addedLayer.id, manager.id + "_drag")

XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 0)
$displayLink.send()
XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 1)
XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.last?.parameters.id, "\(manager.id)_drag")

_ = manager.handleDragBegin(with: "polyline1", context: .zero)

XCTAssertEqual(style.addSourceStub.invocations.count, 1)
Expand Down
32 changes: 32 additions & 0 deletions scripts/doc-generation/restrict-top-sections.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python3

# Load the JSON file
import argparse
import json

acceptedTopSectionTitles = ['Essentials', 'Style', 'Annotations', 'Advanced', 'Other', 'Dependencies', 'Internal', 'Extended Modules']

def main():
parser = argparse.ArgumentParser(description='Check DocC top sections for unexpected items.')
parser.add_argument('--docc', required=True,
type=str, help='Path to doccarchive folder')

args = parser.parse_args()

root_file_path = f"{args.docc}/data/documentation/mapboxmaps.json"
print(f"Checking DocC top sections for unexpected items in {args.docc}")

with open(root_file_path) as f:
root = json.load(f)

sectionTitles = list(map(lambda section: section['title'], root['topicSections']))

unexpectedTitles = list(filter(lambda title: title not in acceptedTopSectionTitles, sectionTitles))

if len(unexpectedTitles) > 0:
print(f"Unexpected section titles found: {unexpectedTitles}")
exit(1)
else:
print("Check passed.")

main()
4 changes: 2 additions & 2 deletions scripts/release/packager/versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"MapboxCoreMaps": "11.1.0-beta.1",
"MapboxCommon": "24.1.0-beta.2",
"MapboxCoreMaps": "11.1.0-rc.1",
"MapboxCommon": "24.1.0-rc.1",
"Turf": "2.7.0"
}
4 changes: 2 additions & 2 deletions scripts/release/sync_deps_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ sed -i '' -E "s/(m.dependency.*MapboxCoreMaps.*, ).*/\1'$CORE_MAPS_VERSION'/" Ma
sed -i '' -E "s/(m.dependency.*MapboxCommon.*, ).*/\1'$COMMON_VERSION'/" MapboxMaps.podspec

info "Update dependencies in Package.swift"
sed -i '' -E "s/(.*MapboxCoreMaps.*exact).*/\1\(\"$CORE_MAPS_VERSION\"\)\),/" Package.swift
sed -i '' -E "s/(.*MapboxCommon.*exact).*/\1\(\"$COMMON_VERSION\"\)\),/" Package.swift
sed -i '' -E "s/(.*MapsDependency.coreMaps.*):.*/\1: \"$CORE_MAPS_VERSION\"\)/" Package.swift
sed -i '' -E "s/(.*MapsDependency.common.*):.*/\1: \"$COMMON_VERSION\"\)/" Package.swift

info "Resolve SPM dependencies"
swift package update
Expand Down

0 comments on commit 42d28e7

Please sign in to comment.