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

Add note about Next.js in custom feedback UI #13242

Closed

Conversation

hbmartin
Copy link

@hbmartin hbmartin commented Apr 4, 2025

DESCRIBE YOUR PR

Adds documentation for Next.js to avoid unhelpful webpack error when implementing custom feedback UI.
getsentry/sentry-javascript#15977

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

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

Copy link

vercel bot commented Apr 4, 2025

@hbmartin is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

I'll leave the call up to the replay/feedback team but IMHO this is not nextJS specific but most snippets need to contextualize better where feedbackIntegration gets called and where getFeedback should be used. In general, this shouldn't differ for NextJS vs other frameworks.

@ryan953
Copy link
Member

ryan953 commented Apr 4, 2025

I just commented in getsentry/sentry-javascript#15977 (comment) but I'll add some notes here too.

As @Lms24 said, we have a NextJS specific example file here where framework specific messages and examples should live: https://github.com/getsentry/sentry-docs/blob/master/platform-includes/user-feedback/manual-injection/javascript.nextjs.mdx#L35.
In https://github.com/getsentry/sentry-docs/pull/13247/files I'm trying to make that example clearer so if someone is looking at NextJS specific instructions they'll see the right stuff, including notes about SSR and all that fun stuff.

The important thing is that users need to pick the right framework in the left side, but it scrolls away so quickly it's easy to be looking at something that's not as specific as it should be. I think we can do something about this and i'll bring it back to the team.

So for now, I think we should go with better code examples for Browser JS and NextJS, and not merge this into the general 'javascript' file.

@ryan953 ryan953 self-requested a review April 4, 2025 17:57
@ryan953 ryan953 closed this Apr 4, 2025
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.

3 participants