Skip to content
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

feat(user-feedback): capture envelopes #4535

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor
  • Loading branch information
armcknight committed Nov 13, 2024
commit 4d611fbb9f90941d2823e1f0802edf4c85553b81
Original file line number Diff line number Diff line change
Expand Up @@ -16,283 +16,267 @@
weak var delegate: (any SentryUserFeedbackFormDelegate)?

init(config: SentryUserFeedbackConfiguration, delegate: any SentryUserFeedbackFormDelegate) {
self.config = config
self.delegate = delegate
super.init(nibName: nil, bundle: nil)

view.backgroundColor = .systemBackground

let formElementHeight: CGFloat = 50
NSLayoutConstraint.activate([
scrollView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: config.margin),
scrollView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: config.margin),
scrollView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -config.margin),
scrollView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -config.margin),

stack.topAnchor.constraint(equalTo: scrollView.topAnchor),
stack.leadingAnchor.constraint(equalTo: scrollView.leadingAnchor),
stack.trailingAnchor.constraint(equalTo: scrollView.trailingAnchor),
stack.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor),
stack.widthAnchor.constraint(equalTo: scrollView.widthAnchor),

messageTextView.heightAnchor.constraint(equalToConstant: config.theme.font.lineHeight * 5),

sentryLogoView.widthAnchor.constraint(equalToConstant: 50),
sentryLogoView.heightAnchor.constraint(equalTo: sentryLogoView.widthAnchor, multiplier: 66 / 72),

fullNameTextField.heightAnchor.constraint(equalToConstant: formElementHeight),
emailTextField.heightAnchor.constraint(equalToConstant: formElementHeight),
addScreenshotButton.heightAnchor.constraint(equalToConstant: formElementHeight),
removeScreenshotButton.heightAnchor.constraint(equalToConstant: formElementHeight),
submitButton.heightAnchor.constraint(equalToConstant: formElementHeight),
cancelButton.heightAnchor.constraint(equalToConstant: formElementHeight),

messageTextViewPlaceholder.leadingAnchor.constraint(equalTo: messageTextView.leadingAnchor, constant: messageTextView.textContainerInset.left + 5),
messageTextViewPlaceholder.topAnchor.constraint(equalTo: messageTextView.topAnchor, constant: messageTextView.textContainerInset.top)
])

Check warning on line 53 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L19-L53

Added lines #L19 - L53 were not covered by tests
[fullNameTextField, emailTextField].forEach {
$0.font = config.theme.font

Check warning on line 55 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L55

Added line #L55 was not covered by tests
if config.theme.outlineStyle == config.theme.defaultOutlineStyle {
$0.borderStyle = .roundedRect

Check warning on line 57 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L57

Added line #L57 was not covered by tests
} else {
$0.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
$0.layer.borderWidth = config.theme.outlineStyle.outlineWidth
$0.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor

Check warning on line 61 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L59-L61

Added lines #L59 - L61 were not covered by tests
}
}

Check warning on line 64 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L64

Added line #L64 was not covered by tests
[fullNameLabel, emailLabel, messageLabel].forEach {
$0.font = config.theme.headingFont

Check warning on line 66 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L66

Added line #L66 was not covered by tests
}

Check warning on line 68 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L68

Added line #L68 was not covered by tests
[submitButton, addScreenshotButton, removeScreenshotButton, cancelButton].forEach {
$0.titleLabel?.font = config.theme.headingFont

Check warning on line 70 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L70

Added line #L70 was not covered by tests
}

Check warning on line 72 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L72

Added line #L72 was not covered by tests
[submitButton, addScreenshotButton, 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

Check warning on line 76 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L74-L76

Added lines #L74 - L76 were not covered by tests
}

Check warning on line 78 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L78

Added line #L78 was not covered by tests
[addScreenshotButton, removeScreenshotButton, cancelButton].forEach {
$0.backgroundColor = config.theme.buttonBackground
$0.setTitleColor(config.theme.buttonForeground, for: .normal)

Check warning on line 81 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L80-L81

Added lines #L80 - L81 were not covered by tests
}
}

Check warning on line 83 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L83

Added line #L83 was not covered by tests

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

Check warning on line 87 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L87

Added line #L87 was not covered by tests

// MARK: Actions

func addScreenshotButtonTapped() {

}

Check warning on line 93 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L92-L93

Added lines #L92 - L93 were not covered by tests

func removeScreenshotButtonTapped() {

}

Check warning on line 97 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L96-L97

Added lines #L96 - L97 were not covered by tests

func submitFeedbackButtonTapped() {
// TODO: validate and package entries
delegate?.confirmed()
}

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

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L100-L102

Added lines #L100 - L102 were not covered by tests

func cancelButtonTapped() {
delegate?.cancelled()
}

Check warning on line 106 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L105-L106

Added lines #L105 - L106 were not covered by tests

// MARK: UI

lazy var formTitleLabel = {
let label = UILabel(frame: .zero)
label.text = config.formConfig.formTitle
label.font = config.theme.titleFont
label.setContentCompressionResistancePriority(.required, for: .horizontal)
return label

Check warning on line 115 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L111-L115

Added lines #L111 - L115 were not covered by tests
}()

lazy var sentryLogoView = {
let shapeLayer = CAShapeLayer()
shapeLayer.path = SentryIconography.logo
shapeLayer.fillColor = self.config.theme.foreground.cgColor

let view = UIView(frame: .zero)
view.layer.addSublayer(shapeLayer)
view.accessibilityLabel = "provided by Sentry" // ???: what do we want to say here?
return view

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

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L119-L126

Added lines #L119 - L126 were not covered by tests
}()

lazy var fullNameLabel = {
let label = UILabel(frame: .zero)
label.text = config.formConfig.nameLabelContents
label.font = config.theme.headingFont
return label

Check warning on line 132 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L130-L132

Added lines #L130 - L132 were not covered by tests
}()

lazy var fullNameTextField = {
let field = UITextField(frame: .zero)
field.placeholder = config.formConfig.namePlaceholder
field.font = config.theme.font
if config.theme.outlineStyle == config.theme.defaultOutlineStyle {
field.borderStyle = .roundedRect
} else {
field.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
field.layer.borderWidth = config.theme.outlineStyle.outlineWidth
field.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor
}
field.accessibilityLabel = config.formConfig.nameTextFieldAccessibilityLabel
return field

Check warning on line 139 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L136-L139

Added lines #L136 - L139 were not covered by tests
}()

lazy var emailLabel = {
let label = UILabel(frame: .zero)
label.text = config.formConfig.emailLabelContents
label.font = config.theme.headingFont
return label

Check warning on line 145 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L143-L145

Added lines #L143 - L145 were not covered by tests
}()

lazy var emailTextField = {
let field = UITextField(frame: .zero)
field.placeholder = config.formConfig.emailPlaceholder
field.font = config.theme.font
if config.theme.outlineStyle == config.theme.defaultOutlineStyle {
field.borderStyle = .roundedRect
} else {
field.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
field.layer.borderWidth = config.theme.outlineStyle.outlineWidth
field.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor
}
field.accessibilityLabel = config.formConfig.emailTextFieldAccessibilityLabel
return field

Check warning on line 152 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L149-L152

Added lines #L149 - L152 were not covered by tests
}()

lazy var messageLabel = {
let label = UILabel(frame: .zero)
label.text = config.formConfig.messageLabelContents
label.font = config.theme.headingFont
return label

Check warning on line 158 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L156-L158

Added lines #L156 - L158 were not covered by tests
}()

lazy var messageTextViewPlaceholder = {
let label = UILabel(frame: .zero)
label.text = config.formConfig.messagePlaceholder
label.font = config.theme.font
label.textColor = .placeholderText
label.translatesAutoresizingMaskIntoConstraints = false
return label

Check warning on line 167 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L162-L167

Added lines #L162 - L167 were not covered by tests
}()

lazy var messageTextView = {
let textView = UITextView(frame: .zero)
textView.font = config.theme.font
textView.isScrollEnabled = true
textView.isEditable = true
textView.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
textView.layer.borderWidth = config.theme.outlineStyle.outlineWidth
textView.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor
textView.accessibilityLabel = config.formConfig.messageTextViewAccessibilityLabel
textView.textContainerInset = .init(top: 13, left: 2, bottom: 13, right: 2)
textView.delegate = self
return textView

Check warning on line 176 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L171-L176

Added lines #L171 - L176 were not covered by tests
}()

lazy var addScreenshotButton = {
let button = UIButton(frame: .zero)
button.setTitle(config.formConfig.addScreenshotButtonLabel, for: .normal)
button.titleLabel?.font = config.theme.headingFont
button.accessibilityLabel = config.formConfig.addScreenshotButtonAccessibilityLabel
button.backgroundColor = config.theme.buttonBackground
button.setTitleColor(config.theme.buttonForeground, for: .normal)
button.addTarget(self, action: #selector(addScreenshotButtonTapped), for: .touchUpInside)
button.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
button.layer.borderWidth = config.theme.outlineStyle.outlineWidth
button.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor
return button

Check warning on line 184 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L180-L184

Added lines #L180 - L184 were not covered by tests
}()

lazy var removeScreenshotButton = {
let button = UIButton(frame: .zero)
button.setTitle(config.formConfig.removeScreenshotButtonLabel, for: .normal)
button.titleLabel?.font = config.theme.headingFont
button.accessibilityLabel = config.formConfig.removeScreenshotButtonAccessibilityLabel
button.backgroundColor = config.theme.buttonBackground
button.setTitleColor(config.theme.buttonForeground, for: .normal)
button.addTarget(self, action: #selector(removeScreenshotButtonTapped), for: .touchUpInside)
button.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
button.layer.borderWidth = config.theme.outlineStyle.outlineWidth
button.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor
return button

Check warning on line 192 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L188-L192

Added lines #L188 - L192 were not covered by tests
}()

lazy var submitButton = {
let button = UIButton(frame: .zero)
button.setTitle(config.formConfig.submitButtonLabel, for: .normal)
button.titleLabel?.font = config.theme.headingFont
button.accessibilityLabel = config.formConfig.submitButtonAccessibilityLabel
button.backgroundColor = config.theme.submitBackground
button.setTitleColor(config.theme.submitForeground, for: .normal)
button.addTarget(self, action: #selector(submitFeedbackButtonTapped), for: .touchUpInside)
button.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
button.layer.borderWidth = config.theme.outlineStyle.outlineWidth
button.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor
return button

Check warning on line 202 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L196-L202

Added lines #L196 - L202 were not covered by tests
}()

lazy var cancelButton = {
let button = UIButton(frame: .zero)
button.setTitle(config.formConfig.cancelButtonLabel, for: .normal)
button.titleLabel?.font = config.theme.headingFont
button.accessibilityLabel = config.formConfig.cancelButtonAccessibilityLabel
button.backgroundColor = config.theme.buttonBackground
button.setTitleColor(config.theme.buttonForeground, for: .normal)
button.addTarget(self, action: #selector(cancelButtonTapped), for: .touchUpInside)
button.layer.cornerRadius = config.theme.outlineStyle.cornerRadius
button.layer.borderWidth = config.theme.outlineStyle.outlineWidth
button.layer.borderColor = config.theme.outlineStyle.outlineColor.cgColor
return button

Check warning on line 210 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L206-L210

Added lines #L206 - L210 were not covered by tests
}()

lazy var stack = {
let headerStack = UIStackView(arrangedSubviews: [self.formTitleLabel])

Check warning on line 214 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L214

Added line #L214 was not covered by tests
if self.config.formConfig.showBranding {
headerStack.addArrangedSubview(self.sentryLogoView)

Check warning on line 216 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L216

Added line #L216 was not covered by tests
}

let stack = UIStackView()
stack.axis = .vertical
stack.spacing = 50

stack.addArrangedSubview(headerStack)

let inputStack = UIStackView()
inputStack.axis = .vertical
inputStack.spacing = config.theme.font.xHeight

Check warning on line 228 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L218-L228

Added lines #L218 - L228 were not covered by tests
if self.config.formConfig.showName {
inputStack.addArrangedSubview(self.fullNameLabel)
inputStack.addArrangedSubview(self.fullNameTextField)

Check warning on line 231 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L230-L231

Added lines #L230 - L231 were not covered by tests
}

Check warning on line 233 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L233

Added line #L233 was not covered by tests
if self.config.formConfig.showEmail {
inputStack.addArrangedSubview(self.emailLabel)
inputStack.addArrangedSubview(self.emailTextField)

Check warning on line 236 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L235-L236

Added lines #L235 - L236 were not covered by tests
}

inputStack.addArrangedSubview(self.messageLabel)

let messageAndScreenshotStack = UIStackView(arrangedSubviews: [self.messageTextView])
messageAndScreenshotStack.axis = .vertical

Check warning on line 243 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L238-L243

Added lines #L238 - L243 were not covered by tests
if self.config.formConfig.enableScreenshot {
messageAndScreenshotStack.addArrangedSubview(self.addScreenshotButton)

Check warning on line 245 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L245

Added line #L245 was not covered by tests
}
messageAndScreenshotStack.spacing = config.theme.font.lineHeight - config.theme.font.xHeight

inputStack.addArrangedSubview(messageAndScreenshotStack)

stack.addArrangedSubview(inputStack)

let controlsStack = UIStackView()
controlsStack.axis = .vertical
controlsStack.spacing = config.theme.font.lineHeight - config.theme.font.xHeight
controlsStack.addArrangedSubview(self.submitButton)
controlsStack.addArrangedSubview(self.cancelButton)
stack.addArrangedSubview(controlsStack)

stack.translatesAutoresizingMaskIntoConstraints = false

Check warning on line 261 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L247-L261

Added lines #L247 - L261 were not covered by tests
return stack
}()

Check warning on line 263 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L263

Added line #L263 was not covered by tests

lazy var scrollView = {
let scrollView = UIScrollView(frame: view.bounds)
view.addSubview(scrollView)
scrollView.addSubview(stack)
scrollView.translatesAutoresizingMaskIntoConstraints = false
scrollView.addSubview(messageTextViewPlaceholder)
return scrollView

Check warning on line 271 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L266-L271

Added lines #L266 - L271 were not covered by tests
}()
}

@available(iOS 13.0, *)
extension SentryUserFeedbackForm: UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
messageTextViewPlaceholder.isHidden = textView.text != ""
}

Check warning on line 279 in Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackForm.swift#L278-L279

Added lines #L278 - L279 were not covered by tests
}

#endif // os(iOS) && !SENTRY_NO_UIKIT
Loading