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

docs(feedback): Document the new tags field #10137

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented May 23, 2024

Documents a new field added in getsentry/sentry-javascript#12197

Related to getsentry/sentry#71254

Copy link

vercel bot commented May 23, 2024

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 Jun 17, 2024 9:02pm

Copy link

codecov bot commented May 23, 2024

Bundle Report

Changes will decrease total bundle size by 12 bytes ⬇️

Bundle name Size Change
sentry-docs-edge-server 461.86kB 3 bytes ⬇️
sentry-docs-server 7.42MB 3 bytes ⬇️
sentry-docs-client 6.18MB 6 bytes ⬇️

…ndex.mdx

Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>
| `showBranding` | `boolean` | `true` | Displays the Sentry logo inside of the form. |
| `colorScheme` | <code>"system" \| "light" \| "dark"</code> | `"system"` | Shows the color theme choices. `"system"` will use your OS color scheme. |
| `id` | `string` | `sentry-feedback` | The `id` attribute of the `<div>` that contains the feedback widget. See [CSS Customization](#css-customization) for more. |
| `tags` | `Record<string, number \| string \| boolean \| bigint \| symbol \| null \| undefined>` | `{}` | [Tags](/platforms/javascript/enriching-events/tags/) to set on the feedback event. |
Copy link
Contributor

Choose a reason for hiding this comment

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

@ryan953 you could use the PlatformLink component, instead of a markdown link. It would then link to the page for the base platform, but also on its guides. Otherwise, when you view the page for e.g. React, the link would be hardcoded to link to the page for the base platform.

ryan953 added a commit to getsentry/sentry-javascript that referenced this pull request Jun 17, 2024
…am (#12197)

We were missing the ability to set tags within feedback before, this
corrects it.

See getsentry/sentry-docs#10137 for the docs
update.

Now a developer can set `tags: {...}` anytime an options param is passed
into feedback. This includes:
- when we init the integration `feedbackIntegration({tags: {hello:
'world'}})`
- when attachTo is called: `feedback.attachTo(element, {tags: {hello:
'world'}})`
- when createWidget is called: `feedback.createWidget({tags: {hello:
'world'}})`
- when createForm is called: `feedback.createForm({tags: {hello:
'world'}})`

Users can also pass tags to `sendFeedback()` which is slightly nicer
than having to set them on scope first.
 - `Sentry.sendFeedback({tags: {hello: 'world'}})` 
- `captureFeedback()` is unaffected, keeping it closer in style to the
other `capture*()` methods.

I also took the chance to re-use related types in more places. Checkout
the first 2 commits on the branch to see those changes individually.

Fixes getsentry/sentry#71254
@ryan953
Copy link
Member Author

ryan953 commented Jun 17, 2024

The new tags field should be deployed with version 8.9.3 or 8.10, whatever comes first. I'll merge these docs then

https://github.com/getsentry/sentry-javascript/releases

@ryan953
Copy link
Member Author

ryan953 commented Jun 21, 2024

Tags are included in 8.10.0!

https://github.com/getsentry/sentry-javascript/releases/tag/8.10.0

@ryan953 ryan953 merged commit 4beb3d7 into master Jun 21, 2024
6 checks passed
@ryan953 ryan953 deleted the ryan953/12197-feedback-tags-docs branch June 21, 2024 16:30
ryan953 added a commit to getsentry/pokemon-market that referenced this pull request Jun 26, 2024
Depends on getsentry/sentry-javascript#12197
Follows instructions from
getsentry/sentry-docs#10137

---------

Co-authored-by: Catherine Lee <55311782+c298lee@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants