Skip to content

refactor(feedback): Add new FeedbackFormConfig#7983

Draft
denrase wants to merge 4 commits into
feat/feedback-presentation-apifrom
ref/feedback-config-arg
Draft

refactor(feedback): Add new FeedbackFormConfig#7983
denrase wants to merge 4 commits into
feat/feedback-presentation-apifrom
ref/feedback-config-arg

Conversation

@denrase
Copy link
Copy Markdown
Collaborator

@denrase denrase commented Jun 1, 2026

#skip-changelog

📜 Description

Adds SentryFeedbackFormConfig for manually presented feedback forms and updates the new presentation APIs to use it instead of SentryUserFeedbackConfiguration.

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:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

denrase added 2 commits June 1, 2026 17:05
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
@denrase denrase changed the base branch from main to feat/feedback-presentation-api June 1, 2026 17:43
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 87.11656% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.046%. Comparing base (4681dd9) to head (7946700).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...dback/Configuration/SentryFeedbackFormConfig.swift 81.132% 10 Missing ⚠️
...ckFormConfig+SentryUserFeedbackConfiguration.swift 92.063% 5 Missing ⚠️
...uration/SentryUserFeedbackThemeConfiguration.swift 75.000% 2 Missing ⚠️
.../Integrations/UserFeedback/SentryFeedbackAPI.swift 0.000% 2 Missing ⚠️
...serFeedback/SentryUserFeedbackFormController.swift 75.000% 1 Missing ⚠️
...ift/SentrySwiftUI/SentryUserFeedbackFormView.swift 0.000% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                         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     
Files with missing lines Coverage Δ
Sources/Swift/Helper/SentrySDK.swift 93.650% <ø> (ø)
...UserFeedback/SentryUserFeedbackFormViewModel.swift 87.278% <100.000%> (ø)
...Feedback/SentryUserFeedbackIntegrationDriver.swift 57.547% <100.000%> (+0.404%) ⬆️
...serFeedback/SentryUserFeedbackFormController.swift 66.666% <75.000%> (-1.011%) ⬇️
...ift/SentrySwiftUI/SentryUserFeedbackFormView.swift 0.000% <0.000%> (ø)
...uration/SentryUserFeedbackThemeConfiguration.swift 82.352% <75.000%> (-4.314%) ⬇️
.../Integrations/UserFeedback/SentryFeedbackAPI.swift 0.000% <0.000%> (ø)
...ckFormConfig+SentryUserFeedbackConfiguration.swift 92.063% <92.063%> (ø)
...dback/Configuration/SentryFeedbackFormConfig.swift 81.132% <81.132%> (ø)

... and 14 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4681dd9...7946700. Read the comment docs.

@denrase denrase changed the title refactor(feedback): Feedback Form Config refactor(feedback): Add new FeedbackFormConfig Jun 1, 2026
@denrase denrase marked this pull request as ready for review June 1, 2026 18:06
@denrase denrase self-assigned this Jun 1, 2026
Copy link
Copy Markdown
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with comments

/// 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 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: same as above

@philprime
Copy link
Copy Markdown
Member

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

@denrase denrase marked this pull request as draft June 2, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants