Skip to content

Commit

Permalink
Tweak feedback categories (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericrwolfe committed Oct 21, 2017
1 parent b37d797 commit a731961
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 43 deletions.
52 changes: 19 additions & 33 deletions MapboxCoreNavigation/Feedback.swift
Expand Up @@ -26,19 +26,24 @@ public enum FeedbackType: Int, CustomStringConvertible {
case roadClosed

/**
Identifies the feedback as a turn that isn't allowed. For example, if a user is instructed to make a left turn, but the turn isn't allowed.
Identifies the feedback as a maneuver that isn't allowed. For example, if a user is instructed to make a left turn, but the turn isn't allowed.
*/
case unallowedTurn
case notAllowed

/**
Identifies the feedback as the location of a poor instruction or route choice. This could be used to indicate an ambiguous or poorly-timed turn announcement, or a set of confusing turns.
Identifies the feedback as the location of a road that should exist along the route.
*/
case routingError
case missingRoad

/**
Identifies the feedback as a maneuver with missing exit information such as an exit number or destination sign.
*/
case missingExit

/**
Identifies the feedback as the location of an instruction with bad timing. For example after the maneuver should have occured.
Identifies the feedback as the location of a poor instruction or route choice. This could be used to indicate an ambiguous or poorly-timed turn announcement, or a set of confusing turns.
*/
case instructionTiming
case routingError

/**
Identifies the feedback as the location of a confusing instruction.
Expand All @@ -50,54 +55,35 @@ public enum FeedbackType: Int, CustomStringConvertible {
*/
case inaccurateGPS

/**
Identifies the feedback where the route was inefficient.
*/
case badRoute

/**
Identifies the feedback as a place where traffic should have been reported.
*/
case reportTraffic

/**
Identifies the feedback as a place with general instruction issue.
*/
case instructionIssue

/**
Identifies the feedback as a place with heavy traffic could have been avoided by using a smarter route.
*/
case heavyTraffic

public var description: String {
switch self {
case .general:
return "general"
case .accident:
return "accident"
case .hazard:
return "hazard"
case .roadClosed:
return "road_closed"
case .unallowedTurn:
return "unallowed_turn"
case .notAllowed:
return "not_allowed"
case .missingRoad:
return "missing_road"
case .missingExit:
return "missing_exit"
case .routingError:
return "routing_error"
case .general:
return "general"
case .instructionTiming:
return "instruction_timing"
case .confusingInstruction:
return "confusing_instruction"
case .inaccurateGPS:
return "inaccurate_gps"
case .badRoute:
return "bad_route"
case .reportTraffic:
return "report_traffic"
case .instructionIssue:
return "instruction_issue"
case .heavyTraffic:
return "heavy_traffic"
}
}
}
19 changes: 9 additions & 10 deletions MapboxNavigation/FeedbackItem.swift
Expand Up @@ -22,18 +22,18 @@ struct FeedbackItem {

// Row 1
static let closure = FeedbackItem(title: closureTitle, image: .feedbackImage(named:"feedback-closed-road"), feedbackType: .roadClosed)
static let turnNotAllowed = FeedbackItem(title: notAllowedTitle, image: .feedbackImage(named:"feedback-no-turn-allowed"), feedbackType: .unallowedTurn)
static let turnNotAllowed = FeedbackItem(title: notAllowedTitle, image: .feedbackImage(named:"feedback-no-turn-allowed"), feedbackType: .notAllowed)
static let reportTraffic = FeedbackItem(title: reportTrafficTitle, image: .feedbackImage(named:"feedback-traffic"), feedbackType: .reportTraffic)

// Row 2
static let confusingInstructions = FeedbackItem(title: confusingInstructionTitle, image: .feedbackImage(named:"feedback-confusing-directions"), feedbackType: .confusingInstruction)
static let GPSInaccurate = FeedbackItem(title: gpsInaccurateTitle, image: .feedbackImage(named:"feedback-gps"), feedbackType: .inaccurateGPS)
static let badRoute = FeedbackItem(title: badRouteTitle, image: .feedbackImage(named:"feedback-wrong-directions"), feedbackType: .badRoute)
static let badRoute = FeedbackItem(title: badRouteTitle, image: .feedbackImage(named:"feedback-wrong-directions"), feedbackType: .routingError)

// Not used
static let missingRoad = FeedbackItem(title: instructionTimingTitle, image: .feedbackImage(named:"feedback-missing-road"), feedbackType: .badRoute)
static let missingExit = FeedbackItem(title: instructionTimingTitle, image: .feedbackImage(named:"feedback-exit"), feedbackType: .badRoute)
static let genermalMapError = FeedbackItem(title: instructionTimingTitle, image: .feedbackImage(named:"feedback-map-error"), feedbackType: .general)
// Not currently used
static let missingRoad = FeedbackItem(title: missingExitTitle, image: .feedbackImage(named:"feedback-missing-road"), feedbackType: .missingRoad)
static let missingExit = FeedbackItem(title: missingRoadTitle, image: .feedbackImage(named:"feedback-exit"), feedbackType: .missingExit)
static let generalMapError = FeedbackItem(title: generalIssueTitle, image: .feedbackImage(named:"feedback-map-error"), feedbackType: .general)
}


Expand All @@ -43,8 +43,7 @@ fileprivate let reportTrafficTitle = NSLocalizedString("FEEDBACK_REPORT_TRAFFIC"
fileprivate let confusingInstructionTitle = NSLocalizedString("FEEDBACK_CONFUSING_INSTRUCTION", bundle: .mapboxNavigation, value: "Confusing \nInstruction", comment: "Feedback type for Confusing Instruction")
fileprivate let gpsInaccurateTitle = NSLocalizedString("FEEDBACK_GPS_INACCURATE", bundle: .mapboxNavigation, value: "GPS \nInaccurate", comment: "Feedback type for inaccurate GPS")
fileprivate let badRouteTitle = NSLocalizedString("FEEDBACK_BAD_ROUTE", bundle: .mapboxNavigation, value: "Bad \nRoute", comment: "Feedback type for Bad Route")

fileprivate let instructionTimingTitle = NSLocalizedString("FEEDBACK_INSTRUCTION_TIMING", bundle: .mapboxNavigation, value: "Instruction \nTiming", comment: "Feedback type for Instruction Timing")
fileprivate let instructionIssueTitle = NSLocalizedString("FEEDBACK_INSTRUCTION_ISSUE", bundle: .mapboxNavigation, value: "Instruction \nIssue", comment: "Feedback type for Instruction Issue")
fileprivate let heavyTrafficTitle = NSLocalizedString("FEEDBACK_HEAVY_TRAFFIC", bundle: .mapboxNavigation, value: "Heavy \nTraffic", comment: "Feedback type for Heavy Traffic")
fileprivate let missingExitTitle = NSLocalizedString("FEEDBACK_MISSING_EXIT", bundle: .mapboxNavigation, value: "Missing \nExit", comment: "Feedback type for Missing Exit")
fileprivate let missingRoadTitle = NSLocalizedString("FEEDBACK_MISSING_ROAD", bundle: .mapboxNavigation, value: "Missing \nRoad", comment: "Feedback type for Missing Road")
fileprivate let generalIssueTitle = NSLocalizedString("FEEDBACK_GENERAL_ISSUE", bundle: .mapboxNavigation, value: "General \nIssue", comment: "Feedback type for General Issue")

0 comments on commit a731961

Please sign in to comment.