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

feat(feedback): Implements Report a Bug button #4378

Open
wants to merge 149 commits into
base: feedback-ui-2
Choose a base branch
from

Conversation

antonis
Copy link
Collaborator

@antonis antonis commented Dec 16, 2024

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Implements feedback button that launches the feedback widget using the auto-injected feedback widget

The button is shown with Sentry.showFeedbackButton() and hidden with Sentry.hideFeedbackButton() provided that the app is wrapped (Sentry.wrap(RootComponent)). The button can be styled like:

Sentry.feedbackIntegration({
  buttonOptions: {
    styles: {
      triggerButton: {
        marginBottom: 75,
      },
    },
  },
})

💡 Motivation and Context

Part of #4302

💚 How did you test it?

Manual testing with the sample app

📝 Checklist

  • I added tests to verify 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.
  • All tests passing
  • No breaking changes

🔮 Next steps

@antonis antonis marked this pull request as ready for review February 25, 2025 13:02
@antonis antonis changed the title Implements Report a Bug button feat(feedback): Implements Report a Bug button Feb 26, 2025
Copy link
Contributor

github-actions bot commented Feb 26, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against b3fe27c

@antonis antonis mentioned this pull request Mar 21, 2025
10 tasks
* The props for the feedback button
*/
export interface FeedbackButtonProps extends FeedbackButtonTextConfiguration {
showFeedbackButton?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

I would replace the showFeedbackButton option with static API Sentry.showFeedbackButton() and Sentry.hideFeedbackButton() to allow for more dynamic scenarios, like showing the button when an error happens or when shake gesture is detected.

The styles, I think, make sense to set in the integration option as it is.

The hide, I think, is important in this case to allow for hiding the button after the feedback is submitted, for example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea Krystof 👍
Updated with 06adadd

@krystofwoldrich
Copy link
Member

Screenshot 2025-03-26 at 13 10 46

The web version has a border similar to the form buttons.

@krystofwoldrich
Copy link
Member

Screenshot 2025-03-26 at 12 59 39

I noticed that the button is above the shadow when dismissing the form.

@krystofwoldrich
Copy link
Member

Let's also add a dummy button integration to track the usage of the button.

export function lazyLoadAutoInjectFeedbackIntegration(): void {

(In the long term, we should start using the features field. I'll create an issue for that.)

@antonis
Copy link
Collaborator Author

antonis commented Mar 26, 2025

Thank you for reviewing and your feedback @krystofwoldrich 🙇

I noticed that the button is above the shadow when dismissing the form.

Good catch 👍 Should be fixed after 04f1a8d

Let's also add a dummy button integration to track the usage of the button.

Good point! Added with 7473c58

The web version has a border similar to the form buttons.

Good catch 👍 Added the border with 24b3df0

@antonis antonis requested a review from krystofwoldrich March 26, 2025 17:04
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.

Feedback Form: Implement Report a Bug button
3 participants