Skip to content

fix(feedback): update docs with SwiftUI notes #14227

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

armcknight
Copy link
Member

DESCRIBE YOUR PR

Updates the docs for Apple User Feedback to at notes about current limitations of using the feature with SwiftUI, related to getsentry/sentry-cocoa#5053.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Copy link

vercel bot commented Jul 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2025 3:04am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2025 3:04am

@codeowner-assignment codeowner-assignment bot requested a review from a team July 2, 2025 02:29
Copy link

codecov bot commented Jul 2, 2025

Bundle Report

Changes will increase total bundle size by 860.79kB (4.08%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.8MB 860.8kB (7.87%) ⬆️
sentry-docs-client-array-push* 9.8MB -6 bytes (-0.0%) ⬇️

ℹ️ *Bundle size includes cached data from a previous commit

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.64MB -0.0%
../instrumentation.js -3 bytes 973.36kB -0.0%
9523.js -3 bytes 949.31kB -0.0%
../app/[[...path]]/page.js.nft.json 286.94kB 691.34kB 70.95% ⚠️
../app/platform-redirect/page.js.nft.json 286.94kB 691.25kB 70.97% ⚠️
../app/sitemap.xml/route.js.nft.json 286.94kB 689.22kB 71.33% ⚠️
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 873.24kB -0.0%
static/chunks/7750-*.js -3 bytes 415.85kB -0.0%
static/3sBJwh9KDHSVMpd_fwcFN/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/3sBJwh9KDHSVMpd_fwcFN/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/bNyz5x9D_0G1bEe04bpvJ/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/bNyz5x9D_0G1bEe04bpvJ/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

Copy link
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

@@ -57,7 +57,7 @@ The following options can be configured for the integration in `SentryUserFeedba
| Option | Type | Default | Description |
| ---------------- | ------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `location` | `[NSDirectionalRectEdge]` | `[.bottom, .trailing]` | The location of the widget on the screen. |
| `autoInject` | `Bool` | `true` | Injects the Feedback widget into the application when the integration is added. Set `autoInject: false` if you want to call `feedback.attachTo()` or `feedback.openDialog()` directly, or only want to show the widget on certain views. |
| `autoInject` | `Bool` | `true` | Injects the Feedback widget into the application when the integration is added. Set `autoInject: false` if you want to call `SentrySDK.feedback.showWidget()` directly, e.g. to show the widget on certain views. |
Copy link
Contributor

Choose a reason for hiding this comment

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

The SentrySDK.feedback.showWidget() seems to be breaking the formatting on this page, I wonder if there's a way to reformat this table so that things fit?

Screenshot 2025-07-07 at 2 31 26 PM

@@ -45,6 +45,92 @@ To start using the User Feedback widget in your Cocoa application, provide a fee

This setup will insert the widget into your app's view hierarchy. By default, it appears in the bottom trailing corner of the screen, but you can fully customize its appearance and behavior.

#### SwiftUI

SwiftUI apps cannot currently use automatic injection of the widget upon SDK start. Several options exist to display the feedback form:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
SwiftUI apps cannot currently use automatic injection of the widget upon SDK start. Several options exist to display the feedback form:
SwiftUI apps don’t currently support automatic widget injection when the SDK starts. Several options exist to display the feedback form:


##### Use your own button

Place a `UIButton` somewhere in your app, then provide the reference to the feedback configuration in the options provided on SDK start:
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a UIButton to your app, then provide the reference to the feedback configuration in the SDK start options:


##### Manually display the widget from a connected `UIWindowSceneDelegate`

You must set up a `UIApplicationDelegateAdaptor`, connect a `UIScene` to your app, and manually call `SentrySDK.feedback.showWidget()`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
You must set up a `UIApplicationDelegateAdaptor`, connect a `UIScene` to your app, and manually call `SentrySDK.feedback.showWidget()`:
You can set up a `UIApplicationDelegateAdaptor`, connect a `UIScene` to your app, and manually call `SentrySDK.feedback.showWidget()`:

Copy link
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

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

Everything else looks good, but see the broken table formatting in user-feedback/configuration

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.

4 participants