Skip to content

Commit

Permalink
ref(feedback): consolidate all settings into one heading under project (
Browse files Browse the repository at this point in the history
#70679)

closes #70663
as a fun bonus, this is also a deprecated async conversion so ref
getsentry/frontend-tsc#2


### Before, we had two User Feedback headings in project settings, one
under Processing (for spam detection) and one under SDK Setup (for crash
report alerting options):

<img width="1154" alt="SCR-20240510-nqlf"
src="https://github.com/getsentry/sentry/assets/56095982/05031369-22da-48bd-8686-a66f8c20f18c">

### This PR moves all 3 settings into one User Feedback header under the
main Project heading:
<img width="684" alt="SCR-20240510-nsig-2"
src="https://github.com/getsentry/sentry/assets/56095982/d58b8937-9dfc-4eff-9ec4-e809161cbc9f">
  • Loading branch information
michellewzhang committed May 14, 2024
1 parent 55f020b commit 9ae25a7
Show file tree
Hide file tree
Showing 10 changed files with 174 additions and 290 deletions.
13 changes: 11 additions & 2 deletions static/app/data/forms/userFeedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const formGroups: JsonFormObject[] = [
type: 'boolean',

// additional data/props that is related to rendering of form field rather than data
label: t('Show Sentry Branding'),
label: t('Show Sentry Branding in Crash Report Modal'),
placeholder: 'e.g. secondary@example.com',
help: t(
'Show "powered by Sentry" within the feedback dialog. We appreciate you helping get the word out about Sentry! <3'
'Show "powered by Sentry" within the Crash Report Modal. We appreciate you helping get the word out about Sentry! <3'
),
getData: data => ({options: data}),
},
Expand All @@ -40,6 +40,15 @@ const formGroups: JsonFormObject[] = [
),
getData: data => ({options: data}),
},
{
name: 'sentry:feedback_ai_spam_detection',
type: 'boolean',

// additional data/props that is related to rendering of form field rather than data
label: 'Enable Spam Detection',
help: 'Toggles whether or not to enable auto spam detection in User Feedback.',
getData: data => ({options: data}),
},
],
},
];
Expand Down
22 changes: 0 additions & 22 deletions static/app/data/forms/userFeedbackProcessing.tsx

This file was deleted.

20 changes: 5 additions & 15 deletions static/app/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,11 @@ function buildRoutes() {
name={t('Data Forwarding')}
component={make(() => import('sentry/views/settings/projectDataForwarding'))}
/>
<Route
path="user-feedback/"
name={t('User Feedback')}
component={make(() => import('sentry/views/settings/projectUserFeedback'))}
/>
<Route path="security-and-privacy/" name={t('Security & Privacy')}>
<IndexRoute
component={make(
Expand Down Expand Up @@ -540,14 +545,6 @@ function buildRoutes() {
name={t('Replays')}
component={make(() => import('sentry/views/settings/project/projectReplays'))}
/>
<Route
path="user-feedback-processing/"
name={t('User Feedback')}
component={make(
() => import('sentry/views/settings/project/projectUserFeedbackProcessing')
)}
/>

<Route path="source-maps/" name={t('Source Maps')}>
<IndexRoute
component={make(() => import('sentry/views/settings/projectSourceMaps'))}
Expand Down Expand Up @@ -635,13 +632,6 @@ function buildRoutes() {
name={t('Loader Script')}
component={make(() => import('sentry/views/settings/project/loaderScript'))}
/>
<Route
path="user-feedback/"
name={t('User Feedback')}
component={make(
() => import('sentry/views/settings/project/projectUserFeedback')
)}
/>
<Redirect from="csp/" to="security-headers/" />
<Route path="security-headers/" name={t('Security Headers')}>
<IndexRoute
Expand Down
14 changes: 4 additions & 10 deletions static/app/views/settings/project/navigationConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export default function getConfiguration({
path: `${pathPrefix}/data-forwarding/`,
title: t('Data Forwarding'),
},
{
path: `${pathPrefix}/user-feedback/`,
title: t('User Feedback'),
},
],
},
{
Expand Down Expand Up @@ -120,11 +124,6 @@ export default function getConfiguration({
title: t('Replays'),
show: () => !!organization?.features?.includes('session-replay-ui'),
},
{
path: `${pathPrefix}/user-feedback-processing/`,
title: t('User Feedback'),
show: () => !!organization?.features?.includes('user-feedback-ui'),
},
],
},
{
Expand All @@ -148,11 +147,6 @@ export default function getConfiguration({
path: `${pathPrefix}/security-headers/`,
title: t('Security Headers'),
},
{
path: `${pathPrefix}/user-feedback/`,
title: t('User Feedback'),
description: t('Configure user feedback reporting feature'),
},
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/settings/project/projectReplays.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function ProjectReplaySettings({organization, project, params: {projectId}}: Pro
external
href="https://docs.sentry.io/product/session-replay/replay-page-and-filters/"
>
{t('Read the docs')}
{t('Read the Docs')}
</Button>
}
/>
Expand Down
55 changes: 0 additions & 55 deletions static/app/views/settings/project/projectUserFeedback.spec.tsx

This file was deleted.

130 changes: 0 additions & 130 deletions static/app/views/settings/project/projectUserFeedback.tsx

This file was deleted.

This file was deleted.

0 comments on commit 9ae25a7

Please sign in to comment.