Skip to content

Conversation

@s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Oct 7, 2024

DESCRIBE YOUR PR

Create separate feedback code snippets for JS and React.

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

@vercel
Copy link

vercel bot commented Oct 7, 2024

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

Name Status Preview Comments Updated (UTC)
changelog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 8:58am
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 8:58am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Oct 23, 2024 8:58am

@codecov
Copy link

codecov bot commented Oct 7, 2024

Bundle Report

Changes will increase total bundle size by 978 bytes (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 7.52MB 987 bytes (0.01%) ⬆️
sentry-docs-edge-server-array-push 257.08kB 3 bytes (-0.0%) ⬇️
sentry-docs-client-array-push 6.44MB 6 bytes (-0.0%) ⬇️

Copy link
Member

@ryan953 ryan953 Oct 21, 2024

Choose a reason for hiding this comment

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

We could probably copy this file for javascript.remix.mdx too

i'm not talking about flavors for Vue, Svelte, Solid right now tho.

Copy link
Contributor

@lizokm lizokm left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -0,0 +1,12 @@
```javascript
const feedback = feedbackIntegration({
// Disable injecting the default widget
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
// Disable injecting the default widget
// Disable the injection of the default widget

```jsx {tabTitle: NextJS}
function ToggleFeedbackButton() {
const [feedback, setFeedback] = useState();
// Read `getFeedback` on the client only, to avoid hydration errors when server rendering
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
// Read `getFeedback` on the client only, to avoid hydration errors when server rendering
// Read `getFeedback` on the client only, to avoid hydration errors when server is rendering

Copy link
Member Author

@s1gr1d s1gr1d Oct 23, 2024

Choose a reason for hiding this comment

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

Reading this, I think it's better to call this "to avoid hydration errors during server rendering". What do you think @lizokm ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that works!

```jsx {tabTitle: React}
function ToggleFeedbackButton() {
const [feedback, setFeedback] = useState();
// Read `getFeedback` on the client only, to avoid hydration errors when server rendering
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
// Read `getFeedback` on the client only, to avoid hydration errors when server rendering
// Read `getFeedback` on the client only, to avoid hydration errors when server is rendering

@s1gr1d s1gr1d force-pushed the sig/user-feedback-code branch from bd01ebb to 7a11b58 Compare October 23, 2024 08:39
@s1gr1d s1gr1d merged commit 71be38c into master Oct 24, 2024
11 checks passed
@s1gr1d s1gr1d deleted the sig/user-feedback-code branch October 24, 2024 12:15
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 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.

5 participants