Skip to content

Instantly share code, notes, and snippets.

@dornad
Last active September 14, 2017 21:51
Show Gist options
  • Save dornad/cccf0e5f0a966cca1b170e496c006a3f to your computer and use it in GitHub Desktop.
Save dornad/cccf0e5f0a966cca1b170e496c006a3f to your computer and use it in GitHub Desktop.
FeedbackKit Class Diagram
@startuml
class FeedbackKit {
+{static} FeedbackKit sharedInstance
+{static} FeedbackKitSettings? _settings
+configure(settings:)
+shouldShowDialog(): Bool
+present(dialog:presenter:result:)
+present(dialog:presenter:triggerPoint:result:)
+present(dialog:presenter:triggerPoint:analyticsDelegate:result:)
+requestFeedbackDialog(dialog:presenter:triggerPoint:analyticsDelegate:result:)
+requestStoreKitReviewController()
+sendUserToAppStore()
+submit(feedback:)
}
class FeedbackKitHistoryItem {
- PresentDialogResult presentAction
- FeedbackKitResult dialogResult
- date Date
}
class FeedbackCloudKitStore {
- FeedbackCloudKitStoreSettings settings:
- init(settings)
}
class FeedbackCloudKitStoreSettings {
- DatabaseType databaseType
- String? identifier
- Operation.QueuePriority priority
init(identifier:databaseType:)
database() : CKDatabase
}
class Feedback {
- String userId
- String feedback
- String appVersion
- TriggerPoint triggerPoint
}
interface FeedbackKitSettings {
-applicationId: String
-history: [FeedbackKitHistoryItem]
-displayLogic: FeedbackKitDisplayLogic
-userPreferences: FeedbackKitUserPreferences
-store: FeedbackStore
-load()
-save()
}
interface FeedbackKitDisplayLogic {
-requestDialogResult(settings:): PresentDialogResult
}
interface FeedbackKitUserPreferences {
-optedOut: Bool
}
interface FeedbackStore {
-save(feedback:)
}
interface FeedbackKitAnalyticsDelegate {
analyticsEventForPresentingDialog(presentedDialog:)
analyticsEventForDismissingDialog(dialogAction:)
}
interface NonRatingFeedbackDialogType {
- feedback: Feedback?
- optOut: Bool
- present(presenting:result:)
}
enum PresentDialogResult {
feedbackPrompted
storeKitReviewControllerAttempt
none
}
enum FeedbackKitResult {
feedbackCaptured
feedbackNotCaptured
}
enum DatabaseType {
publicDB
privateDB
}
enum FeedbackDialogAction {
submittedFeedback
dismiss
}
enum TriggerPoint {
unknown
onlineSend
}
note "See present(presenting:result:) in NonRatingFeedbackDialogType" as Note01
FeedbackKit -- FeedbackKitSettings
FeedbackKitSettings -- FeedbackKitDisplayLogic
FeedbackKitSettings -- FeedbackKitHistoryItem
FeedbackKitSettings -- FeedbackKitUserPreferences
FeedbackKitSettings -- FeedbackStore
FeedbackKitHistoryItem -- PresentDialogResult
FeedbackKitHistoryItem -- FeedbackKitResult
FeedbackStore <|-- FeedbackCloudKitStore
FeedbackCloudKitStore -- FeedbackCloudKitStoreSettings
FeedbackCloudKitStoreSettings -- DatabaseType
NonRatingFeedbackDialogType -- Feedback
Feedback -- TriggerPoint
FeedbackDialogAction -- Note01
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment