Skip to content

Commit e29f050

Browse files
JonasBaClaude Sonnet 4.6
andcommitted
fix(nav): Add size="sm" to buttons inside TopBar.Slot actions
createPortal does not propagate React context, so buttons inside TopBar.Slot name="actions" do not inherit the SizeProvider size="sm" wrapping the slot outlet. Add explicit size="sm" to all Button, LinkButton, CreateAlertButton, StatusToggleButton, and NewMonitorButton instances placed inside actions slots across affected views. Co-Authored-By: Claude Sonnet 4.6 <noreply@example.com>
1 parent 45cb40d commit e29f050

File tree

16 files changed

+33
-5
lines changed

16 files changed

+33
-5
lines changed

static/app/components/profiling/continuousProfileHeader.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ export function ContinuousProfileHeader({transaction}: ContinuousProfileHeader)
5757
<Fragment>
5858
{transactionTarget && (
5959
<TopBar.Slot name="actions">
60-
<LinkButton onClick={handleGoToTransaction} to={transactionTarget}>
60+
<LinkButton
61+
size="sm"
62+
onClick={handleGoToTransaction}
63+
to={transactionTarget}
64+
>
6165
{t('Go to Trace')}
6266
</LinkButton>
6367
</TopBar.Slot>

static/app/components/profiling/profileHeader.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ function ProfileHeader({transaction, projectId, eventId}: ProfileHeaderProps) {
9595
<Fragment>
9696
{transactionTarget && (
9797
<TopBar.Slot name="actions">
98-
<LinkButton onClick={handleGoToTransaction} to={transactionTarget}>
98+
<LinkButton
99+
size="sm"
100+
onClick={handleGoToTransaction}
101+
to={transactionTarget}
102+
>
99103
{t('Go to Trace')}
100104
</LinkButton>
101105
</TopBar.Slot>

static/app/views/alerts/list/header.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export function AlertHeader({activeTab}: Props) {
7272
<Fragment>
7373
<TopBar.Slot name="actions">
7474
<CreateAlertButton
75+
size="sm"
7576
organization={organization}
7677
iconProps={{size: 'sm'}}
7778
priority="primary"
@@ -85,6 +86,7 @@ export function AlertHeader({activeTab}: Props) {
8586
{t('Create Alert')}
8687
</CreateAlertButton>
8788
<LinkButton
89+
size="sm"
8890
onClick={handleNavigateToSettings}
8991
href="#"
9092
icon={<IconSettings size="sm" />}

static/app/views/alerts/rules/issue/details/ruleDetails.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,13 +441,15 @@ export default function AlertRuleDetails() {
441441
)}
442442
</Access>
443443
<LinkButton
444+
size="sm"
444445
icon={<IconCopy />}
445446
to={duplicateLink}
446447
disabled={rule.status === 'disabled'}
447448
>
448449
{t('Duplicate')}
449450
</LinkButton>
450451
<LinkButton
452+
size="sm"
451453
icon={<IconEdit />}
452454
to={makeAlertsPathname({
453455
path: `/rules/${projectSlug}/${ruleId}/`,

static/app/views/alerts/rules/metric/details/header.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export function DetailsHeader({
131131
</Access>
132132
)}
133133
<LinkButton
134+
size="sm"
134135
icon={<IconCopy />}
135136
to={duplicateLink}
136137
disabled={deprecateTransactionsAlerts}
@@ -146,7 +147,7 @@ export function DetailsHeader({
146147
>
147148
{t('Duplicate')}
148149
</LinkButton>
149-
<LinkButton icon={<IconEdit />} to={settingsLink}>
150+
<LinkButton size="sm" icon={<IconEdit />} to={settingsLink}>
150151
{t('Edit Rule')}
151152
</LinkButton>
152153
</TopBar.Slot>

static/app/views/alerts/rules/uptime/details.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,14 @@ export default function UptimeAlertDetails() {
155155
{hasPageFrameFeature ? (
156156
<TopBar.Slot name="actions">
157157
<StatusToggleButton
158+
size="sm"
158159
uptimeDetector={detector}
159160
onToggleStatus={data => toggleStatus(data)}
160161
disabled={!canEdit}
161162
{...(canEdit ? {} : {tooltipProps: {title: permissionTooltipText}})}
162163
/>
163164
<LinkButton
165+
size="sm"
164166
icon={<IconEdit />}
165167
disabled={!canEdit}
166168
tooltipProps={{title: canEdit ? undefined : permissionTooltipText}}

static/app/views/dashboards/manage/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,7 @@ function ManageDashboards() {
684684
trigger={triggerProps => (
685685
<Button
686686
{...triggerProps}
687+
size="sm"
687688
data-test-id="dashboard-create"
688689
priority="primary"
689690
icon={<IconAdd />}
@@ -702,6 +703,7 @@ function ManageDashboards() {
702703
limitMessage,
703704
}) => (
704705
<Button
706+
size="sm"
705707
data-test-id="dashboard-create"
706708
onClick={event => {
707709
event.preventDefault();
@@ -726,6 +728,7 @@ function ManageDashboards() {
726728
</Feature>
727729
<Feature features="dashboards-import">
728730
<Button
731+
size="sm"
729732
onClick={() => {
730733
openImportDashboardFromFileModal({
731734
organization,

static/app/views/discover/landing.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ function DiscoverLanding() {
207207
{hasPageFrameFeature ? (
208208
<TopBar.Slot name="actions">
209209
<LinkButton
210+
size="sm"
210211
data-test-id="build-new-query"
211212
to={to}
212213
priority="primary"

static/app/views/explore/logs/content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function SetupLogsButton() {
181181
priority="primary"
182182
href="https://docs.sentry.io/product/explore/logs/getting-started/"
183183
external
184-
size="xs"
184+
size="sm"
185185
onClick={() => {
186186
trackAnalytics('logs.explorer.setup_button_clicked', {
187187
organization,

static/app/views/feedback/feedbackListPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export default function FeedbackListPage() {
165165
<Fragment>
166166
<TopBar.Slot name="actions">
167167
<LinkButton
168+
size="sm"
168169
icon={<IconSiren />}
169170
to={{
170171
pathname: makeAlertsPathname({

0 commit comments

Comments
 (0)