userFeedback.tsx 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import type {JsonFormObject} from 'sentry/components/forms/types';
  2. import {t, tct} from 'sentry/locale';
  3. // Export route to make these forms searchable by label/help
  4. export const route = '/settings/:orgId/projects/:projectId/user-feedback/';
  5. const formGroups: JsonFormObject[] = [
  6. {
  7. // Form "section"/"panel"
  8. title: 'Settings',
  9. fields: [
  10. {
  11. name: 'feedback:branding',
  12. type: 'boolean',
  13. // additional data/props that is related to rendering of form field rather than data
  14. label: t('Show Sentry Branding in Crash Report Modal'),
  15. placeholder: 'e.g. secondary@example.com',
  16. help: t(
  17. 'Show "powered by Sentry" within the Crash Report Modal. We appreciate you helping get the word out about Sentry! <3'
  18. ),
  19. getData: data => ({options: data}),
  20. },
  21. {
  22. name: 'sentry:feedback_user_report_notifications',
  23. type: 'boolean',
  24. label: t('Enable Crash Report Notifications'),
  25. help: () =>
  26. tct(
  27. 'Get notified on feedback submissions from the [crashReportModalDocsLink: Crash Report Modal], [webApiEndpointLink: web endpoint], and JS SDK (pre-v8). [feedbackWidgetDocsLink: Feedback widget] notifications are not affected by this setting and are on by default.',
  28. {
  29. crashReportModalDocsLink: (
  30. <a href="https://docs.sentry.io/platforms/javascript/user-feedback/#crash-report-modal" />
  31. ),
  32. feedbackWidgetDocsLink: (
  33. <a href="https://docs.sentry.io/product/user-feedback/#user-feedback-widget" />
  34. ),
  35. webApiEndpointLink: (
  36. <a href="https://docs.sentry.io/api/projects/submit-user-feedback/" />
  37. ),
  38. }
  39. ),
  40. getData: data => ({options: data}),
  41. },
  42. {
  43. name: 'sentry:feedback_ai_spam_detection',
  44. type: 'boolean',
  45. // additional data/props that is related to rendering of form field rather than data
  46. label: 'Enable Spam Detection',
  47. help: 'Toggles whether or not to enable auto spam detection in User Feedback.',
  48. getData: data => ({options: data}),
  49. },
  50. ],
  51. },
  52. ];
  53. export default formGroups;