Skip to content

Commit 6224e34

Browse files
style(feedback): add gap back to mailbox (#93761)
only for chonk theme. before: <img width="352" alt="SCR-20250617-msgl" src="https://github.com/user-attachments/assets/74a66418-ae25-4011-988a-24d6cc393a2f" /> after: <img width="258" alt="SCR-20250617-nbzd" src="https://github.com/user-attachments/assets/0a4d033e-f3c5-459b-8cfc-fcaa7fafd56d" />
1 parent f4298b6 commit 6224e34

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

static/app/components/feedback/list/mailboxPicker.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import {useTheme} from '@emotion/react';
2+
13
import {Badge} from 'sentry/components/core/badge';
24
import {Flex} from 'sentry/components/core/layout';
35
import {SegmentedControl} from 'sentry/components/core/segmentedControl';
46
import {Tooltip} from 'sentry/components/core/tooltip';
57
import type decodeMailbox from 'sentry/components/feedback/decodeMailbox';
68
import useMailboxCounts from 'sentry/components/feedback/list/useMailboxCounts';
79
import {t} from 'sentry/locale';
10+
import {space} from 'sentry/styles/space';
811
import useOrganization from 'sentry/utils/useOrganization';
912

1013
type Mailbox = ReturnType<typeof decodeMailbox>;
@@ -23,6 +26,7 @@ const MAILBOXES = [
2326
export default function MailboxPicker({onChange, value}: Props) {
2427
const organization = useOrganization();
2528
const {data} = useMailboxCounts({organization});
29+
const theme = useTheme();
2630

2731
const filteredMailboxes = MAILBOXES;
2832

@@ -34,17 +38,17 @@ export default function MailboxPicker({onChange, value}: Props) {
3438
value={value}
3539
onChange={onChange}
3640
>
37-
{filteredMailboxes.map(c => {
41+
{filteredMailboxes.map(mailbox => {
3842
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
39-
const count = data?.[c.key];
43+
const count = data?.[mailbox.key];
4044
const display = count && count >= 100 ? '99+' : count;
4145
const title =
4246
count === 1 ? t('1 unassigned item') : t('%s unassigned items', display);
4347
return (
44-
<SegmentedControl.Item key={c.key} aria-label={c.label}>
48+
<SegmentedControl.Item key={mailbox.key} aria-label={mailbox.label}>
4549
<Tooltip disabled={!count} title={title}>
46-
<Flex align="center">
47-
{c.label}
50+
<Flex align="center" gap={theme.isChonk ? space(0.75) : 0}>
51+
{mailbox.label}
4852
{display ? <Badge type="default">{display}</Badge> : null}
4953
</Flex>
5054
</Tooltip>

0 commit comments

Comments
 (0)