-
Notifications
You must be signed in to change notification settings - Fork 328
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
Add feedback survey option chosen event #4528
Conversation
c2bf7c5
to
3a163a4
Compare
1 build increased size
Paywalls 1.0 (1)
|
Item | Install Size Change |
---|---|
DYLD.String Table | ⬆️ 46.0 kB |
RevenueCat.InternalAPI.InternalAPI | ⬆️ 9.4 kB |
DYLD.Exports | ⬆️ 4.4 kB |
Code Signature | ⬆️ 3.7 kB |
RevenueCatUI.FeedbackSurveyData.FeedbackSurveyData | ⬆️ 3.1 kB |
🛸 Powered by Emerge Tools
Comment trigger: Size diff threshold of 100.00kB exceeded
f1eeadd
to
24ee89f
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.
I'm probably missing why we need the CustomerCenterSurveyOptionChosenEvent
instead of relying on CustomerCenterEvent
RevenueCatUI/CustomerCenter/ViewModels/FeedbackSurveyViewModel.swift
Outdated
Show resolved
Hide resolved
/// An event to be sent by the `RevenueCatUI` SDK. | ||
public enum CustomerCenterEvent: FeatureEvent, CustomerCenterEventType { | ||
|
||
var eventDiscriminator: String? { "lifecycle" } |
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.
Hmm I'm confused by this default event discriminator... Should this be something like customer_center
? We could also make it a computed property based on the enum values I guess.
guard let event = CustomerCenterEvent(storedEvent: storedEvent) else { | ||
return nil | ||
switch storedEvent.eventDiscriminator { | ||
case "survey_option_chosen": |
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.
Hmm can we store these into some sort of enum? Would be better to avoid hardcoded strings
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.
oh I need to do this
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.
Looks good! Just a naming suggestion, besides Toni's comments.
376815a
to
ed98ba6
Compare
ed98ba6
to
17ea410
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.
LGTM!
appSessionID: Self.appSessionID)) | ||
let requestEvent: EventsRequest.CustomerCenterEvent = try XCTUnwrap(.init(storedEvent: storedEvent)) | ||
appSessionID: Self.appSessionID, | ||
eventDiscriminator: "lifecycle")) |
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 potentially use the new discriminator enum?
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.
yes. Thanks!
Creates an event with this definition: