Skip to content
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

ALS-1813 Update place popup: show new information and other fixes #76

Merged
merged 7 commits into from
Dec 5, 2024

Conversation

wadhawh
Copy link
Contributor

@wadhawh wadhawh commented Nov 28, 2024

ALS-1813 [iOS] Update place popup: show new information (hours, phone number, etc – anything included in the new data from V2 API for the location)
ALS-1908 [iOS] Use center of the map for bias position
ALS-1821 [iOS] Update routes: support EV & Scooter travel modes
ALS-1892 iOS-Mobile > Route > Navigation auto adjusts to starting point
ALS-1900 iOS-Mobile > The Map does not render if zoomed out
ALS-1901 iOS-Mobile > Search > Moving to different location does not give the desired result
ALS-1811 [iOS] Update search: use result type, query type and terms to search text
ALS-1897 iOS-Mobile > Route > Entering Inverse geocode is showing error
ALS-1912 [iOS] Separate map language dropdown in map styles
Updated gems

zeeshanmakeen and others added 2 commits November 28, 2024 16:02
… number, etc – anything included in the new data from V2 API for the location) ALS-1908 [iOS] Use center of the map for bias position ALS-1821 [iOS] Update routes: support EV & Scooter travel modes ALS-1892 iOS-Mobile > Route > Navigation auto adjusts to starting point ALS-1900 iOS-Mobile > The Map does not render if zoomed out ALS-1901 iOS-Mobile > Search > Moving to different location does not give the desired result ALS-1811 [iOS] Update search: use result type, query type and terms to search text ALS-1897 iOS-Mobile > Route > Entering Inverse geocode is showing error ALS-1912 [iOS] Separate map language dropdown in map styles Updated gems
ALS-1813 Update place popup: show new information and other fixes
Comment on lines 51 to 52
static let direction = "Directions"
static let directions = "Directions"
Copy link
Contributor

Choose a reason for hiding this comment

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

If you no longer need a string that says "Direction", we should just use the existing directions string directly below this and delete direction.

Copy link
Collaborator

Choose a reason for hiding this comment

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

fixed

Comment on lines 79 to 111
if language == "zh-Hant" {
// Special handling for zh-Hant
return [
"coalesce",
["get", "name:zh-Hant"],
["get", "name:zh"],
["get", "name:en"],
["get", "name"]
]
}

if let arrayExp = exp as? [Any] {
guard arrayExp.first as? String == "coalesce" else {
return arrayExp.map { recurseExpression(exp: $0, prevPropertyRegex: prevPropertyRegex, nextProperty: nextProperty, language: language) }
}

guard arrayExp.count > 2,
let first = arrayExp[1] as? [Any], first.first as? String == "get",
let firstProperty = first.last as? String,
let _ = firstProperty.range(of: prevPropertyRegex, options: .regularExpression),
let second = arrayExp[2] as? [Any], second.first as? String == "get" else {
return arrayExp.map { recurseExpression(exp: $0, prevPropertyRegex: prevPropertyRegex, nextProperty: nextProperty, language: language) }
}

return [
"coalesce",
["get", nextProperty],
["get", "name:en"],
["get", "name"]
]
}

return exp
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the special-case handling for zh-Hant appear at the bottom of this method after the possible recursion calls instead of before?

Copy link
Collaborator

Choose a reason for hiding this comment

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

fixed

} else {
searchType = .search
}
//$0.placeId != nil ? .location : .search
Copy link

Choose a reason for hiding this comment

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

Nit: Can remove this commented line

@mbalfour-amzn mbalfour-amzn merged commit b31ae32 into main Dec 5, 2024
2 checks passed
@mbalfour-amzn mbalfour-amzn deleted the ALS-1813_POI_Info branch December 5, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants