refactor(feedback): Add new FeedbackFormConfig#7983
Conversation
Adds the new manual feedback form API backed by `SentryFeedbackFormConfig`, updates UIKit/SwiftUI presentation paths, and keeps legacy feedback/widget behavior bridged for compatibility.
…g-arg # Conflicts: # Samples/iOS-Swift/App/Sources/FeedbackViewController.swift # Samples/iOS-SwiftUI/App/Sources/FeedbackScreen.swift # Sources/Swift/Integrations/UserFeedback/SentryFeedbackAPI.swift # Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackFormController.swift # Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationDriver.swift # Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift # Tests/SentryTests/Integrations/Feedback/UserFeedbackIntegrationTests.swift # sdk_api.json
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/feedback-presentation-api #7983 +/- ##
====================================================================
- Coverage 87.301% 87.046% -0.256%
====================================================================
Files 552 554 +2
Lines 31697 31814 +117
Branches 13044 13085 +41
====================================================================
+ Hits 27672 27693 +21
- Misses 3977 4070 +93
- Partials 48 51 +3
... and 14 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
FeedbackFormConfig
| /// The ratio of the configured font size to the system default font size, to know how large to scale things like the icon and lozenge shape. | ||
| lazy var scaleFactor = calculateScaleFactor() | ||
|
|
||
| func calculateScaleFactor() -> CGFloat { |
There was a problem hiding this comment.
l: I feel like this logic shouldn't live in a configuration data type. Should we move the logic to a helper class or is that overkill?
| /// Too much padding as the font size grows larger makes the button look weird with lots of negative space. Keeping the padding constant looks weird if the text is too small. So, scale it down below system default font sizes, but keep it fixed with larger font sizes. | ||
| lazy var paddingScaleFactor = calculatePaddingScaleFactor() | ||
|
|
||
| func calculatePaddingScaleFactor() -> CGFloat { |
|
I did an integration test with techprimate/Flinky#33 and the feedback API is working as intended for my use case Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-06-02.at.14.42.40.mov |
#skip-changelog
📜 Description
Adds
SentryFeedbackFormConfigfor manually presented feedback forms and updates the new presentation APIs to use it instead ofSentryUserFeedbackConfiguration.This keeps widget/integration configuration unchanged, bridges legacy config internally for existing paths, updates samples/tests, and regenerates the public API snapshot.
💡 Motivation and Context
Manual presentation should have a focused per-form config. The existing widget-related API will be deprecated separately, so widget-specific options such as shake, screenshots, and custom button behavior should not be part of the new manual form config.
💚 How did you test it?
Unit tests. Sample App.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.