Skip to content

Commit

Permalink
WIP: last minute tweaks to apis to align implementation and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed Feb 19, 2025
1 parent d33f2c8 commit 165e716
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 57 deletions.
5 changes: 5 additions & 0 deletions Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ - (BOOL)application:(UIApplication *)application
uiForm.submitButtonLabel = @"Report that jank";
uiForm.messagePlaceholder
= @"Describe the nature of the jank. Its essence, if you will.";
uiForm.useSentryUser = YES;
};
config.configureTheme = ^(SentryUserFeedbackThemeConfiguration *_Nonnull theme) {
theme.font = [UIFont fontWithName:@"ChalkboardSE-Regular" size:25];
theme.outlineStyle =
[[SentryFormElementOutlineStyle alloc] initWithColor:UIColor.purpleColor
cornerRadius:10
outlineWidth:4];
};
config.onSubmitSuccess = ^(NSDictionary<NSString *, id> *_Nonnull info) {
NSString *name = info[@"name"] ?: @"$shakespearean_insult_name";
Expand Down
13 changes: 8 additions & 5 deletions Samples/iOS-ObjectiveC/iOS-ObjectiveC/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@ - (IBAction)captureUserFeedback:(id)sender
captureError:error
withScopeBlock:^(SentryScope *_Nonnull scope) { [scope setLevel:kSentryLevelFatal]; }];

SentryUserFeedback *userFeedback = [[SentryUserFeedback alloc] initWithEventId:eventId];
userFeedback.comments = @"It broke on iOS-ObjectiveC. I don't know why, but this happens.";
userFeedback.email = @"[email protected]";
userFeedback.name = @"John Me";
[SentrySDK captureUserFeedback:userFeedback];
SentryFeedback *feedback = [[SentryFeedback alloc]
initWithMessage:@"It broke on iOS-ObjectiveC. I don't know why, but this happens."
name:@"John Me"
email:@"[email protected]"
source:SentryFeedbackSourceCustom
associatedEventId:nil
screenshot:nil];
[SentrySDK captureUserFeedback:feedback];
}

- (IBAction)captureError:(id)sender
Expand Down
13 changes: 2 additions & 11 deletions Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,8 @@ class ExtraViewController: UIViewController {

@IBAction func captureUserFeedback(_ sender: UIButton) {
highlightButton(sender)
let error = NSError(domain: "UserFeedbackErrorDomain", code: 0, userInfo: [NSLocalizedDescriptionKey: "This never happens."])

let eventId = SentrySDK.capture(error: error) { scope in
scope.setLevel(.fatal)
}

let userFeedback = UserFeedback(eventId: eventId)
userFeedback.comments = "It broke on iOS-Swift. I don't know why, but this happens."
userFeedback.email = "[email protected]"
userFeedback.name = "John Me"
SentrySDK.capture(userFeedback: userFeedback)
let feedback = SentryFeedback(message: "It broke on iOS-Swift. I don't know why, but this happens.", name: "John Me", email: "[email protected]", source: .custom, associatedEventId: nil, screenshot: nil)

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 15 (17.2) Simulator

cannot find 'SentryFeedback' in scope

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 15 (17.2) Simulator

cannot infer contextual base in reference to member 'custom'

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 15 (17.2) Simulator

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 15 (17.2) Simulator

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 15 (17.2) Simulator

cannot find 'SentryFeedback' in scope

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 15 (17.2) Simulator

cannot infer contextual base in reference to member 'custom'

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 15 (17.2) Simulator

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 15 (17.2) Simulator

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / Build app and test runner

cannot find 'SentryFeedback' in scope

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / Build app and test runner

cannot infer contextual base in reference to member 'custom'

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / Build app and test runner

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / Build app and test runner

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / Release Build of iOS Swift

cannot find 'SentryFeedback' in scope

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / Release Build of iOS Swift

cannot infer contextual base in reference to member 'custom'

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / Release Build of iOS Swift

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / Release Build of iOS Swift

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 14 (16.4) Simulator

cannot find 'SentryFeedback' in scope

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 14 (16.4) Simulator

cannot infer contextual base in reference to member 'custom'

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 14 (16.4) Simulator

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 14 (16.4) Simulator

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 14 (16.4) Simulator

cannot find 'SentryFeedback' in scope

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 14 (16.4) Simulator

cannot infer contextual base in reference to member 'custom'

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 14 (16.4) Simulator

'nil' requires a contextual type

Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

View workflow job for this annotation

GitHub Actions / UI Tests for iOS-Swift iPhone 14 (16.4) Simulator

'nil' requires a contextual type
SentrySDK.capture(userFeedback: feedback)
}

@IBAction func permissions(_ sender: UIButton) {
Expand Down
4 changes: 2 additions & 2 deletions Samples/iOS-Swift/iOS-Swift/SentrySDKWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ extension SentrySDKWrapper {
}

func configureFeedbackForm(config: SentryUserFeedbackFormConfiguration) {
config.useSentryUser = !args.contains("--io.sentry.feedback.dont-use-sentry-user")
config.formTitle = "Jank Report"
config.isEmailRequired = args.contains("--io.sentry.feedback.require-email")
config.isNameRequired = args.contains("--io.sentry.feedback.require-name")
Expand Down Expand Up @@ -181,7 +182,7 @@ extension SentrySDKWrapper {
fontFamily = "ChalkboardSE-Regular"
}
config.fontFamily = fontFamily
config.outlineStyle = .init(outlineColor: .purple)
config.outlineStyle = .init(color: .purple)
config.foreground = .purple
config.background = .init(red: 0.95, green: 0.9, blue: 0.95, alpha: 1)
config.submitBackground = .orange
Expand All @@ -199,7 +200,6 @@ extension SentrySDKWrapper {
return
}

config.useSentryUser = !args.contains("--io.sentry.feedback.dont-use-sentry-user")
config.animations = !args.contains("--io.sentry.feedback.no-animations")
config.useShakeGesture = true
config.showFormForScreenshots = true
Expand Down
3 changes: 1 addition & 2 deletions Sources/Sentry/Public/SentrySDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ SENTRY_NO_INIT
* Captures user feedback that was manually gathered and sends it to Sentry.
* @param userFeedback The user feedback to send to Sentry.
*/
+ (void)captureUserFeedback:(SentryUserFeedback *)userFeedback
NS_SWIFT_NAME(capture(userFeedback:));
+ (void)captureUserFeedback:(SentryFeedback *)userFeedback NS_SWIFT_NAME(capture(userFeedback:));

/**
* Adds a Breadcrumb to the current Scope of the current Hub. If the total number of breadcrumbs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ public class SentryUserFeedbackConfiguration: NSObject {
*/
public var tags: [String: Any]?

/**
* Sets the email and name field text content to `SentryUser.email` and `SentryUser.name`.
* - note: Default: `true`
*/
public var useSentryUser: Bool = true

/**
* Called when the managed feedback form is opened.
* - note: Default: `nil`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import UIKit
public class SentryUserFeedbackFormConfiguration: NSObject {
// MARK: General settings

/**
* Sets the email and name field text content to `SentryUser.email` and `SentryUser.name`.
* - note: Default: `true`
*/
public var useSentryUser: Bool = true

Check warning on line 18 in Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackFormConfiguration.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackFormConfiguration.swift#L18

Added line #L18 was not covered by tests

/**
* Displays the Sentry logo inside of the form.
* - note: Default: `true`
Expand Down Expand Up @@ -41,16 +47,10 @@ public class SentryUserFeedbackFormConfiguration: NSObject {

/**
* The label shown next to an input field that is required.
* - note: Default: `"(required)"`
* - note: Default: `"(Required)"`
*/
public var isRequiredLabel: String = "(Required)"

/**
* The message displayed after a successful feedback submission.
* - note: Default: `"Thank you for your report!"`
*/
public var successMessageText: String = "Thank you for your report!"

// MARK: Screenshots

/**
Expand Down Expand Up @@ -124,7 +124,7 @@ public class SentryUserFeedbackFormConfiguration: NSObject {
*/
public var emailPlaceholder: String = "[email protected]"

public lazy var emailTextFieldAccessibilityLabel = emailPlaceholder
public lazy var emailTextFieldAccessibilityLabel = "Your email address"

Check warning on line 127 in Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackFormConfiguration.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackFormConfiguration.swift#L127

Added line #L127 was not covered by tests

// MARK: Buttons

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public class SentryUserFeedbackThemeConfiguration: NSObject {
public lazy var fontFamily: String? = nil

/**
* Font for form input elements.
* Font for form input elements and the widget button label.
* - note: Defaults to `UIFont.TextStyle.callout`.
*/
lazy var font = scaledFont(style: .callout)

/**
* Font for main header title of the feedback form.
* Font for the main header title of the feedback form.
* - note: Defaults to `UIFont.TextStyle.title1`.
*/
lazy var headerFont = scaledFont(style: .title1)
Expand Down Expand Up @@ -88,24 +88,18 @@ public class SentryUserFeedbackThemeConfiguration: NSObject {
*/
public var buttonBackground: UIColor = UIColor.clear

/**
* Color used for success-related components (such as text color when feedback is submitted successfully).
* - note: Default light mode: `rgb(38, 141, 117)`; dark mode: `rgb(45, 169, 140)`
*/
public var successColor = UIScreen.main.traitCollection.userInterfaceStyle == .dark ? UIColor(red: 45 / 255, green: 169 / 255, blue: 140 / 255, alpha: 1) : UIColor(red: 38 / 255, green: 141 / 255, blue: 117 / 255, alpha: 1)

/**
* Color used for error-related components (such as text color when there's an error submitting feedback).
* - note: Default light mode: `rgb(223, 51, 56)`; dark mode: `rgb(245, 84, 89)`
*/
public var errorColor = UIScreen.main.traitCollection.userInterfaceStyle == .dark ? UIColor(red: 245 / 255, green: 84 / 255, blue: 89 / 255, alpha: 1) : UIColor(red: 223 / 255, green: 51 / 255, blue: 56 / 255, alpha: 1)

public struct OutlineStyle: Equatable {
@objc public class SentryFormElementOutlineStyle: NSObject {
/**
* Outline color for form inputs.
* - note: Default: The system default of a UITextField outline with borderStyle of .roundedRect.
*/
public var outlineColor = UIColor(white: 204 / 255, alpha: 1)
public var color = UIColor(white: 204 / 255, alpha: 1)

Check warning on line 102 in Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift#L102

Added line #L102 was not covered by tests

/**
* Outline corner radius for form input elements.
Expand All @@ -119,8 +113,8 @@ public class SentryUserFeedbackThemeConfiguration: NSObject {
*/
public var outlineWidth: CGFloat = 0.5

public init(outlineColor: UIColor = UIColor(white: 204 / 255, alpha: 1), cornerRadius: CGFloat = 5, outlineWidth: CGFloat = 0.5) {
self.outlineColor = outlineColor
@objc public init(color: UIColor = UIColor(white: 204 / 255, alpha: 1), cornerRadius: CGFloat = 5, outlineWidth: CGFloat = 0.5) {
self.color = color

Check warning on line 117 in Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift#L116-L117

Added lines #L116 - L117 were not covered by tests
self.cornerRadius = cornerRadius
self.outlineWidth = outlineWidth
}
Expand All @@ -129,17 +123,22 @@ public class SentryUserFeedbackThemeConfiguration: NSObject {
/**
* - note: We need to keep a reference to a default instance of this for comparison purposes later. We don't use the default to give UITextFields a default style, instead, we use `UITextField.BorderStyle.roundedRect` if `SentryUserFeedbackThemeConfiguration.outlineStyle == defaultOutlineStyle`.
*/
let defaultOutlineStyle = OutlineStyle()
let defaultOutlineStyle = SentryFormElementOutlineStyle()

Check warning on line 126 in Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift#L126

Added line #L126 was not covered by tests

/**
* Options for styling the outline of input elements and buttons in the feedback form.
*/
public lazy var outlineStyle: OutlineStyle = defaultOutlineStyle
public lazy var outlineStyle: SentryFormElementOutlineStyle = defaultOutlineStyle

Check warning on line 131 in Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift#L131

Added line #L131 was not covered by tests

/**
* Background color to use for text inputs in the feedback form.
*/
public var inputBackground: UIColor = UIColor.secondarySystemBackground

/**
* Background color to use for text inputs in the feedback form.
*/
public var inputForeground: UIColor = UIScreen.main.traitCollection.userInterfaceStyle == .dark ? UIColor.lightText : UIColor.darkText

Check warning on line 141 in Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift#L141

Added line #L141 was not covered by tests
}

#endif // os(iOS) && !SENTRY_NO_UIKIT
13 changes: 10 additions & 3 deletions Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ import Foundation

@objcMembers
class SentryFeedback: NSObject {
enum Source: String {
@objc enum SentryFeedbackSource: Int, CustomStringConvertible {
public var description: String {
switch self {
case .widget: return "widget"
case .custom: return "custom"

Check warning on line 10 in Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift#L7-L10

Added lines #L7 - L10 were not covered by tests
}
}

case widget
case custom
}

var name: String?
var email: String?
var message: String
var source: Source
var source: SentryFeedbackSource
let eventId: SentryId

/// PNG data for the screenshot image
Expand All @@ -21,7 +28,7 @@ class SentryFeedback: NSObject {
var associatedEventId: String?

/// - parameter screenshot Image encoded as PNG data.
init(message: String, name: String?, email: String?, source: Source = .widget, associatedEventId: String? = nil, screenshot: Data? = nil) {
@objc init(message: String, name: String?, email: String?, source: SentryFeedbackSource = .widget, associatedEventId: String? = nil, screenshot: Data? = nil) {

Check warning on line 31 in Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift#L31

Added line #L31 was not covered by tests
self.eventId = SentryId()
self.name = name
self.email = email
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class SentryUserFeedbackFormViewModel: NSObject {
field.delegate = controller
field.autocapitalizationType = .words
field.returnKeyType = .done
if config.useSentryUser {
if config.formConfig.useSentryUser {

Check warning on line 73 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift#L73

Added line #L73 was not covered by tests
field.text = sentry_getCurrentUser()?.name
}
return field
Expand All @@ -91,7 +91,7 @@ class SentryUserFeedbackFormViewModel: NSObject {
field.keyboardType = .emailAddress
field.autocapitalizationType = .none
field.returnKeyType = .done
if config.useSentryUser {
if config.formConfig.useSentryUser {

Check warning on line 94 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift#L94

Added line #L94 was not covered by tests
field.text = sentry_getCurrentUser()?.email
}
return field
Expand Down Expand Up @@ -336,19 +336,22 @@ extension SentryUserFeedbackFormViewModel {
[fullNameTextField, emailTextField].forEach {
$0.font = config.theme.font
$0.adjustsFontForContentSizeCategory = true
$0.textColor = config.theme.inputForeground

Check warning on line 339 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift#L339

Added line #L339 was not covered by tests
if config.theme.outlineStyle == config.theme.defaultOutlineStyle {
$0.borderStyle = .roundedRect
} else {
$0.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
$0.layer.borderWidth = config.theme.outlineStyle.outlineWidth
$0.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor
$0.layer.borderColor = config.theme.outlineStyle.color.cgColor

Check warning on line 345 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift#L345

Added line #L345 was not covered by tests
}
}

[fullNameTextField, emailTextField, messageTextView].forEach {
$0.backgroundColor = config.theme.inputBackground
}

messageTextView.textColor = config.theme.inputForeground

Check warning on line 354 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift#L353-L354

Added lines #L353 - L354 were not covered by tests
[fullNameLabel, emailLabel, messageLabel].forEach {
$0.font = config.theme.titleFont
$0.adjustsFontForContentSizeCategory = true
Expand All @@ -362,7 +365,7 @@ extension SentryUserFeedbackFormViewModel {
[submitButton, removeScreenshotButton, cancelButton, messageTextView].forEach {
$0.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
$0.layer.borderWidth = config.theme.outlineStyle.outlineWidth
$0.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor
$0.layer.borderColor = config.theme.outlineStyle.color.cgColor

Check warning on line 368 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormViewModel.swift#L368

Added line #L368 was not covered by tests
}

[removeScreenshotButton, cancelButton].forEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ class SentryUserFeedbackWidgetButtonView: UIView {

if UIScreen.main.traitCollection.userInterfaceStyle == .dark {
lozengeLayer.fillColor = config.darkTheme.background.cgColor
lozengeLayer.strokeColor = config.darkTheme.outlineStyle.outlineColor.cgColor
lozengeLayer.strokeColor = config.darkTheme.outlineStyle.color.cgColor

Check warning on line 170 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackWidgetButtonView.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackWidgetButtonView.swift#L170

Added line #L170 was not covered by tests
} else {
lozengeLayer.fillColor = config.theme.background.cgColor
lozengeLayer.strokeColor = config.theme.outlineStyle.outlineColor.cgColor
lozengeLayer.strokeColor = config.theme.outlineStyle.color.cgColor

Check warning on line 173 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackWidgetButtonView.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackWidgetButtonView.swift#L173

Added line #L173 was not covered by tests
}

let iconSizeDifference = (scaledIconSize - svgSize) / 2
Expand Down

0 comments on commit 165e716

Please sign in to comment.