-
Notifications
You must be signed in to change notification settings - Fork 134
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
RUM-7316 Session Replay SwiftUI Feature Flag #2124
Conversation
040a14d
to
9faa288
Compare
Datadog ReportBranch report: ✅ 0 Failed, 3561 Passed, 0 Skipped, 2m 21.83s Total Time 🔻 Code Coverage Decreases vs Default Branch (2) |
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.
Nice work! 🙌
@@ -81,20 +84,23 @@ extension SessionReplay { | |||
/// - touchPrivacyLevel: The way user touches (e.g. tap) should be masked. Default: `.hide`. | |||
/// - startRecordingImmediately: If the recording should start automatically. When `true`, the recording starts automatically; when `false` it doesn't, and the recording will need to be started manually. Default: `true`. | |||
/// - customEndpoint: Custom server url for sending replay data. Default: `nil`. | |||
/// - featureFlags: Experimental feature flags. |
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.
Do we intentionally not add this param to the deprecated API? I think it makes sense, but double-checking just in case.
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 did it intentionally, yes. I think it makes sense to not add features to deprecated api 👍
...lay/Sources/Recorder/ViewTreeSnapshotProducer/ViewTreeSnapshot/ViewTreeSnapshotBuilder.swift
Outdated
Show resolved
Hide resolved
] | ||
// swiftlint:enable opening_brace | ||
// disable swiftui based on ff | ||
if !featureFlags[.swiftui, default: false] { |
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.
nit: we could make it a bit easier to read with a computer property
extension SessionReplay.Configuration.FeatureFlags {
var isSwiftUIDisabled: Bool {
return !self[.swiftui, default: false]
}
}
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.
Good idea, I have something more generic:
public subscript(flag: Key) -> Bool {
self[flag, default: false]
}
9faa288
to
a1aaee1
Compare
/merge |
Devflow running:
|
What and why?
Enable SwiftUI recording using a feature-flag
How?
Defines
SessionReplay.Configuration.FeatureFlags
with.swiftui
disabled by default.Review checklist
make api-surface
)