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

fix(feedback): accessibility audit action items #4698

Merged
merged 14 commits into from
Feb 12, 2025
Merged
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
Merge remote-tracking branch 'origin/main' into armcknight/feat(feedb…
…ack)/accessibility-audit
armcknight committed Jan 16, 2025
commit 1756744ef3e0d35e1f003dd9e94791bc2b41c685
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ class SentryUserFeedbackForm: UIViewController {
SentryLog.debug("Photos authorization level: \(status)")
presentPicker()
}
#endif // TEST || TESTCI
#endif // SENTRY_TEST || SENTRY_TEST_CI
}

func removeScreenshotButtonTapped() {
@@ -160,12 +160,21 @@ class SentryUserFeedbackForm: UIViewController {
if let message = validate() {
let alert = UIAlertController(title: "Error", message: message, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK", style: .default))
present(alert, animated: config.animations)
} else {
let feedback = SentryFeedback(message: messageTextView.text, name: fullNameTextField.text, email: emailTextField.text, screenshot: screenshotImageView.image?.pngData())
SentryLog.debug("Sending user feedback")
delegate?.finished(with: feedback)
present(alert, animated: config.animations) {
if let block = self.config.onSubmitError {
// we use NSError here instead of Swift.Error because NSError automatically bridges to Swift.Error, but the same is not true in the other direction if you want to include a userInfo dictionary. Using Swift.Error would require additional implementation for this to work with ObjC consumers.
block(NSError(domain: "io.sentry.error", code: 1, userInfo: ["missing_fields": missing, NSLocalizedDescriptionKey: "The user did not complete the feedback form."]))
}
}
return
}

let feedback = SentryFeedback(message: messageTextView.text, name: fullNameTextField.text, email: emailTextField.text, screenshot: screenshotImageView.image?.pngData())
SentryLog.debug("Sending user feedback")
if let block = config.onSubmitSuccess {
block(feedback.dataDictionary())
}
delegate?.finished(with: feedback)
}

func cancelButtonTapped() {
You are viewing a condensed version of this merge commit. You can view the full changes here.