-
Notifications
You must be signed in to change notification settings - Fork 157
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
Enable Expression to be created without an operator #1855
Conversation
217dc59
to
24583be
Compare
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.
can we also support decoding an operatorless Expression? Right now Expression decode requires the first element to be an Operator
Apps/Examples/Examples/All Examples/Annotations/PointAnnotationClusteringExample.swift
Show resolved
Hide resolved
@@ -81,24 +79,6 @@ final class ExpressionTests: XCTestCase { | |||
XCTAssertThrowsError(try JSONDecoder().decode(Expression.self, from: data)) | |||
} | |||
|
|||
// MARK: - Helpers | |||
func verifyExpressionArgument(for expression: Expression, toMatch argument: Expression.Argument, at index: Int) { |
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.
I removed this helper function as it was only used once
d4c7fe6
to
058dd20
Compare
Codecov Report
@@ Coverage Diff @@
## main #1855 +/- ##
==========================================
+ Coverage 89.06% 89.08% +0.01%
==========================================
Files 242 242
Lines 15080 15094 +14
==========================================
+ Hits 13431 13446 +15
+ Misses 1649 1648 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: Mai Mai <[email protected]>
d8fe5de
to
621e778
Compare
* Force previous fastlane version (#1848) * Fix issue with map spinning when setting destBearing and sourceBearing to 102 (#1793) (#1828) Co-authored-by: Niwaka <[email protected]> * Update submodules SSH key (#1854) * Enable CircleCI contexts for shared environment variables (#1852) * Use the latest v4 Slack Orb * Add 'Slack Orb' context for each job * MAPSIOS-556: Adopt shared context for CocoaPods trunk token * MAPSIOS-558: Adopt shared context for Fastlane Match password * MAPSIOS-557: Adopt shared context for SDK Registry token * MAPSIOS-555: Adopt shared context for Apple credentials/ASC token * Remove unused license template (#1857) * Fix missing contexts, reuse CircleCI token (#1859) * Enable GoogleCloud shared credentials (#1861) * Enable 'Retry on Failure' up to 3 times for all tests (#1860) * Add missing public mapbox token (#1863) * Run IntegrationTests even when unit tests failing (#1864) * Add Mapbox public token to unit tests (#1865) * Move mapbox token to build unit tests (#1866) * Add public Mapbox token to build unit test jobs * Revert "Add Mapbox public token to unit tests (#1865)" This reverts commit efba681. * Improve stability of attribution parsing (#1849) * Mapsios 567 mark no op and deprecate v10.11.0 properties (#1867) * Extract integration tests to the separate CircleCI job (#1870) * Rename job to build host tests * Rename job to build tests * Rename job to build firebase tests * Rename Build tests job * Run integration tests * Code coverage command * Enable codecoverage by default * Run integration tests on nightly bases * Utilize default values for run-integration-tests job * Remove unused arg * Enable Expression to be created without an operator (#1855) * Change clusterProperties to accept array * Break up expression and reassemble for clusterProperties * Adjust example so app can run * Introduce operatorless expression * Add additional tests, update comments * Enable operatorless encoding, add tests * Add property back, update filtering * Remove generated update * Fix argument and operator access * Update Sources/MapboxMaps/Style/Types/Expression.swift Co-authored-by: Mai Mai <[email protected]> * Add changelog, update expression operator to simplify Co-authored-by: Mai Mai <[email protected]> * Bump activesupport from 6.1.5 to 6.1.7.2 in /scripts/doc-generation (#1874) Bumps [activesupport](https://github.com/rails/rails) from 6.1.5 to 6.1.7.2. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.0.4.2/activesupport/CHANGELOG.md) - [Commits](rails/rails@v6.1.5...v6.1.7.2) --- updated-dependencies: - dependency-name: activesupport dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Maps versions (#1875) * Update CoreMaps and Common * Update license * Update changelog * Generate development DocC on PR merges (#1873) * Generate DocC * Upload DocC to the 'latest' * Fix test results collection * Debug * Extra push to force CI trigger * Last fixes * Code review fixes * Add 10.11.0-rc.1 changelog entry (#1876) * Update SDK version (#1877) * Add missing changelog for #1828 (#1880) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Patrick Leonard <[email protected]> Co-authored-by: Niwaka <[email protected]> Co-authored-by: Roman Laitarenko <[email protected]> Co-authored-by: Mai Mai <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix issue with map spinning when setting destBearing and sourceBearing to 102 (#1793) (#1828) Co-authored-by: Niwaka <[email protected]> * Enable CircleCI contexts for shared environment variables (#1852) * Use the latest v4 Slack Orb * Add 'Slack Orb' context for each job * MAPSIOS-556: Adopt shared context for CocoaPods trunk token * MAPSIOS-558: Adopt shared context for Fastlane Match password * MAPSIOS-557: Adopt shared context for SDK Registry token * MAPSIOS-555: Adopt shared context for Apple credentials/ASC token * Remove unused license template (#1857) * Fix missing contexts, reuse CircleCI token (#1859) * Enable GoogleCloud shared credentials (#1861) * Enable 'Retry on Failure' up to 3 times for all tests (#1860) * Add missing public mapbox token (#1863) * Run IntegrationTests even when unit tests failing (#1864) * Add Mapbox public token to unit tests (#1865) * Move mapbox token to build unit tests (#1866) * Add public Mapbox token to build unit test jobs * Revert "Add Mapbox public token to unit tests (#1865)" This reverts commit efba681. * Improve stability of attribution parsing (#1849) * Mapsios 567 mark no op and deprecate v10.11.0 properties (#1867) * Extract integration tests to the separate CircleCI job (#1870) * Rename job to build host tests * Rename job to build tests * Rename job to build firebase tests * Rename Build tests job * Run integration tests * Code coverage command * Enable codecoverage by default * Run integration tests on nightly bases * Utilize default values for run-integration-tests job * Remove unused arg * Enable Expression to be created without an operator (#1855) * Change clusterProperties to accept array * Break up expression and reassemble for clusterProperties * Adjust example so app can run * Introduce operatorless expression * Add additional tests, update comments * Enable operatorless encoding, add tests * Add property back, update filtering * Remove generated update * Fix argument and operator access * Update Sources/MapboxMaps/Style/Types/Expression.swift Co-authored-by: Mai Mai <[email protected]> * Add changelog, update expression operator to simplify Co-authored-by: Mai Mai <[email protected]> * Bump activesupport from 6.1.5 to 6.1.7.2 in /scripts/doc-generation (#1874) Bumps [activesupport](https://github.com/rails/rails) from 6.1.5 to 6.1.7.2. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.0.4.2/activesupport/CHANGELOG.md) - [Commits](rails/rails@v6.1.5...v6.1.7.2) --- updated-dependencies: - dependency-name: activesupport dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Maps versions (#1875) * Update CoreMaps and Common * Update license * Update changelog * Generate development DocC on PR merges (#1873) * Generate DocC * Upload DocC to the 'latest' * Fix test results collection * Debug * Extra push to force CI trigger * Last fixes * Code review fixes * Add 10.11.0-rc.1 changelog entry (#1876) * Update SDK version (#1877) * Add missing changelog for #1828 (#1880) * Skip codecov for Xcode 12.5.1 (#1879) * Replace test skips with failures (#1862) * Couple of fixes for release workflow (#1883) * Add basic signposts for rendering tracing (#1818) * Add basic signposts for rendering tracing * turn on signposts in tests Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Patrick Leonard <[email protected]> Co-authored-by: Niwaka <[email protected]> Co-authored-by: Roman Gardukevich <[email protected]> Co-authored-by: Roman Laitarenko <[email protected]> Co-authored-by: Mai Mai <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ivan Persidsky <[email protected]>
Resolves #1571
This PR updates Expression, adding an init that does not require an operator. With this change, GeoJSONSource's
clusterProperties
will align with the style spec (see here). Following the style spec, a cluster property needs to be an array of two elements with several accepted formats:Currently, only the first format works, and not more complex options described in the style spec:
This PR allows for Expression creation without an operator so that the additional formats work. I additionally updated the Symbol Clustering Example to show how the
clusterProperties
API can work with these formats.Pull request checklist:
custom_categories
(scripts/doc-generation/.jazzy.yaml)## main
heading near the top).v10.[version]
release branch fix / enhancement, merge it tomain
first and then port tov10.[version]
release branch.PRs must be submitted under the terms of our Contributor License Agreement CLA.