Skip to content

Commit 3446474

Browse files
JonasBaclaude
andcommitted
ref(nav): Remove size prop from FeedbackButton inside TopBar.Slot and migrate subscriptionSettingsLayout
Inside TopBar.Slot, the TopBar owns button sizing, so the size prop on FeedbackButton is redundant. Remove it from all 11 migrated files. Also migrate subscriptionSettingsLayout.tsx to use TopBar.Slot when the page-frame feature is active. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b6140f2 commit 3446474

File tree

12 files changed

+36
-26
lines changed

12 files changed

+36
-26
lines changed

static/app/views/automations/components/automationFeedbackButton.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export function AutomationFeedbackButton() {
1010
return (
1111
<TopBar.Slot name="feedback">
1212
<FeedbackButton
13-
size="sm"
1413
feedbackOptions={{
1514
messagePlaceholder: t('How can we improve the alerts experience?'),
1615
tags: {

static/app/views/detectors/components/monitorFeedbackButton.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export function MonitorFeedbackButton() {
1010
return (
1111
<TopBar.Slot name="feedback">
1212
<FeedbackButton
13-
size="sm"
1413
feedbackOptions={{
1514
messagePlaceholder: t('How can we improve the monitor experience?'),
1615
tags: {

static/app/views/feedback/feedbackListPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ export default function FeedbackListPage() {
159159
{hasPageFrameFeature ? (
160160
<TopBar.Slot name="feedback">
161161
<FeedbackButton
162-
size="sm"
163162
feedbackOptions={{
164163
messagePlaceholder: t(
165164
'How can we improve the User Feedback experience?'

static/app/views/issueDetails/streamline/header/header.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ export function StreamlinedGroupHeader({event, group, project}: GroupHeaderProps
154154
<TopBar.Slot name="feedback">
155155
<FeedbackButton
156156
aria-label={t('Give feedback on the issue Sentry detected')}
157-
size="xs"
158157
feedbackOptions={{
159158
messagePlaceholder: t(
160159
'Please provide feedback on the issue Sentry detected.'

static/app/views/issueList/issueViews/issueViewsList/issueViewsList.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ export default function IssueViewsList() {
371371
{hasPageFrameFeature ? (
372372
<TopBar.Slot name="feedback">
373373
<FeedbackButton
374-
size="sm"
375374
feedbackOptions={{
376375
formTitle: t('Give Feedback'),
377376
messagePlaceholder: t('How can we make issue views better for you?'),

static/app/views/performance/newTraceDetails/traceHeader/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export function TraceMetaDataHeader(props: TraceMetadataHeaderProps) {
9595
{hasPageFrameFeature ? (
9696
<TopBar.Slot name="feedback">
9797
<FeedbackButton
98-
size="xs"
9998
feedbackOptions={{
10099
messagePlaceholder: t(
101100
'How can we make the trace view better for you?'

static/app/views/performance/newTraceDetails/traceHeader/placeholder.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export function PlaceHolder({
4646
{hasPageFrameFeature ? (
4747
<TopBar.Slot name="feedback">
4848
<FeedbackButton
49-
size="xs"
5049
feedbackOptions={{
5150
messagePlaceholder: t(
5251
'How can we make the trace view better for you?'

static/app/views/performance/newTraceDetails/traceSummary.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export function TraceSummarySection({traceSlug}: {traceSlug: string}) {
9393
{hasPageFrameFeature ? (
9494
<TopBar.Slot name="feedback">
9595
<FeedbackButton
96-
size="xs"
9796
feedbackOptions={{
9897
messagePlaceholder: t(
9998
'How can we make the trace summary better for you?'
@@ -202,7 +201,6 @@ export function TraceSummarySection({traceSlug}: {traceSlug: string}) {
202201
</TopBar.Slot>
203202
) : (
204203
<FeedbackButton
205-
size="xs"
206204
feedbackOptions={{
207205
messagePlaceholder: t(
208206
'How can we make the trace summary better for you?'

static/app/views/replays/detail/header/replayDetailsHeaderActions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function ReplayDetailsHeaderActions({readerResult}: Props) {
2828
<ButtonActionsWrapper>
2929
{hasPageFrameFeature ? (
3030
<TopBar.Slot name="feedback">
31-
<FeedbackButton size="xs">{null}</FeedbackButton>
31+
<FeedbackButton>{null}</FeedbackButton>
3232
</TopBar.Slot>
3333
) : (
3434
<FeedbackButton size="xs" />
@@ -46,7 +46,7 @@ export function ReplayDetailsHeaderActions({readerResult}: Props) {
4646
<ButtonActionsWrapper>
4747
{hasPageFrameFeature ? (
4848
<TopBar.Slot name="feedback">
49-
<FeedbackButton size="xs">{null}</FeedbackButton>
49+
<FeedbackButton>{null}</FeedbackButton>
5050
</TopBar.Slot>
5151
) : (
5252
<FeedbackButton size="xs" />

static/gsApp/components/subscriptionSettingsLayout.tsx

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ import {SettingsBreadcrumb} from 'sentry/views/settings/components/settingsBread
1212
import type {RouteWithName} from 'sentry/views/settings/components/settingsBreadcrumb/types';
1313
import {SettingsHeader} from 'sentry/views/settings/components/settingsHeader';
1414
import {SettingsSearch} from 'sentry/views/settings/components/settingsSearch';
15+
import {TopBar} from 'sentry/views/navigation/topBar';
16+
import {useHasPageFrameFeature} from 'sentry/views/navigation/useHasPageFrameFeature';
1517

1618
export default function SubscriptionSettingsLayout() {
1719
const location = useLocation();
1820
const params = useParams();
1921
const routes = useRoutes();
22+
const hasPageFrameFeature = useHasPageFrameFeature();
2023
let feedbackSource = location.pathname;
2124
for (let i = routes.length - 1; i >= 0; i--) {
2225
const route = routes[i] as RouteWithName;
@@ -32,19 +35,37 @@ export default function SubscriptionSettingsLayout() {
3235
<Flex align="center" justify="between" gap="xl">
3336
<StyledSettingsBreadcrumb params={params} routes={routes} />
3437
<Flex align="center" gap="xl">
35-
<FeedbackButton
36-
feedbackOptions={{
37-
formTitle: t('Give feedback'),
38-
messagePlaceholder: t(
39-
'How can we make the %s page better for you?',
40-
feedbackSource
41-
),
42-
tags: {
43-
['feedback.source']: feedbackSource,
44-
['feedback.owner']: 'billing',
45-
},
46-
}}
47-
/>
38+
{hasPageFrameFeature ? (
39+
<TopBar.Slot name="feedback">
40+
<FeedbackButton
41+
feedbackOptions={{
42+
formTitle: t('Give feedback'),
43+
messagePlaceholder: t(
44+
'How can we make the %s page better for you?',
45+
feedbackSource
46+
),
47+
tags: {
48+
['feedback.source']: feedbackSource,
49+
['feedback.owner']: 'billing',
50+
},
51+
}}
52+
>{null}</FeedbackButton>
53+
</TopBar.Slot>
54+
) : (
55+
<FeedbackButton
56+
feedbackOptions={{
57+
formTitle: t('Give feedback'),
58+
messagePlaceholder: t(
59+
'How can we make the %s page better for you?',
60+
feedbackSource
61+
),
62+
tags: {
63+
['feedback.source']: feedbackSource,
64+
['feedback.owner']: 'billing',
65+
},
66+
}}
67+
/>
68+
)}
4869
<SettingsSearch />
4970
</Flex>
5071
</Flex>

0 commit comments

Comments
 (0)