Skip to content

Commit cf81d6d

Browse files
nsdeschenescodex
andauthored
feat(logs): Move continue scanning into full button (#112351)
This PR refreshes the continue scanning logs experience to really call out to users that they're able to continue scanning for more data, as the previous setup was a bit harder to read. Refs LOGS-644 --------- Co-authored-by: GPT-5.4 <noreply@openai.com>
1 parent 09b9704 commit cf81d6d

File tree

4 files changed

+44
-31
lines changed

4 files changed

+44
-31
lines changed

static/app/components/emptyStateWarning.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,33 @@ import styled from '@emotion/styled';
22

33
import {EmptyMessage} from 'sentry/components/emptyMessage';
44
import {IconSearch} from 'sentry/icons';
5+
import type {IconVariant} from 'sentry/icons/svgIcon';
56

67
type Props = {
78
children?: React.ReactNode;
89
className?: string;
910
small?: boolean;
11+
variant?: IconVariant;
1012
withIcon?: boolean;
1113
};
1214

1315
export function EmptyStateWarning({
1416
small = false,
17+
variant = 'muted',
1518
withIcon = true,
1619
children,
1720
className,
1821
}: Props) {
1922
return small ? (
2023
<EmptyMessage className={className}>
2124
<SmallMessage>
22-
{withIcon && <StyledIconSearch variant="muted" size="lg" />}
25+
{withIcon && <StyledIconSearch variant={variant} size="lg" />}
2326
{children}
2427
</SmallMessage>
2528
</EmptyMessage>
2629
) : (
2730
<EmptyStreamWrapper data-test-id="empty-state" className={className}>
28-
{withIcon && <IconSearch variant="muted" legacySize="54px" />}
31+
{withIcon && <IconSearch variant={variant} legacySize="54px" />}
2932
{children}
3033
</EmptyStreamWrapper>
3134
);

static/app/icons/svgIcon.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import type {ContentVariant, IconSize} from 'sentry/utils/theme';
44

55
import {useIconDefaults} from './useIconDefaults';
66

7+
export type IconVariant = ContentVariant | 'muted';
8+
79
export interface SVGIconProps extends Omit<
810
React.SVGAttributes<SVGSVGElement>,
911
'color' | 'type'
@@ -16,7 +18,7 @@ export interface SVGIconProps extends Omit<
1618
legacySize?: string;
1719
ref?: React.Ref<SVGSVGElement>;
1820
size?: IconSize;
19-
variant?: ContentVariant | 'muted';
21+
variant?: IconVariant;
2022
}
2123

2224
export function SvgIcon(props: SVGIconProps) {

static/app/views/explore/logs/tables/logsInfiniteTable.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {Virtualizer} from '@tanstack/react-virtual';
66
import {useVirtualizer, useWindowVirtualizer} from '@tanstack/react-virtual';
77

88
import {Button} from '@sentry/scraps/button';
9-
import {Flex, Stack} from '@sentry/scraps/layout';
9+
import {Container, Flex, Stack} from '@sentry/scraps/layout';
1010
import {ExternalLink} from '@sentry/scraps/link';
1111
import {Tooltip} from '@sentry/scraps/tooltip';
1212

@@ -662,38 +662,38 @@ function EmptyRenderer({
662662
if (bytesScanned && canResumeAutoFetch && resumeAutoFetch) {
663663
return (
664664
<TableStatus>
665-
<EmptyStateWarning withIcon>
665+
<EmptyStateWarning withIcon variant="accent">
666666
<EmptyStateText size="xl">{t('No logs found yet')}</EmptyStateText>
667667
<EmptyStateText size="md">
668668
{tct(
669-
'We scanned [bytesScanned] already but did not find any matching logs yet.[break]You can narrow your time range or you can [continueScanning].',
670-
{
671-
bytesScanned: <FileSize bytes={bytesScanned} base={2} />,
672-
break: <br />,
673-
continueScanning: (
674-
<Button
675-
priority="link"
676-
onClick={resumeAutoFetch}
677-
aria-label={t('continue scanning')}
678-
>
679-
{t('Continue Scanning')}
680-
</Button>
681-
),
682-
}
669+
'We scanned [bytesScanned] so far but have not found anything matching your filters',
670+
{bytesScanned: <FileSize bytes={bytesScanned} base={2} />}
683671
)}
684672
</EmptyStateText>
673+
<EmptyStateText size="md">
674+
{t('We can keep digging or you can narrow down your search.')}
675+
</EmptyStateText>
676+
<Container paddingTop="md">
677+
<Button
678+
priority="default"
679+
onClick={resumeAutoFetch}
680+
aria-label={t('continue scanning')}
681+
>
682+
{t('Continue Scanning')}
683+
</Button>
684+
</Container>
685685
</EmptyStateWarning>
686686
</TableStatus>
687687
);
688688
}
689689

690690
return (
691691
<TableStatus>
692-
<EmptyStateWarning withIcon>
692+
<EmptyStateWarning withIcon variant="accent">
693693
<EmptyStateText size="xl">{t('No logs found')}</EmptyStateText>
694694
<EmptyStateText size="md">
695695
{tct(
696-
'Try adjusting your filters or get started with sending logs by checking these [instructions]',
696+
'Try adjusting your filters or get started with sending logs by checking these [instructions].',
697697
{
698698
instructions: (
699699
<ExternalLink href={LOGS_INSTRUCTIONS_URL}>

static/app/views/explore/tables/tracesTable/styles.tsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type {ComponentProps, CSSProperties} from 'react';
1+
import type {ComponentProps} from 'react';
22
import {css} from '@emotion/react';
33
import styled from '@emotion/styled';
44

5-
import {Flex} from '@sentry/scraps/layout';
5+
import {Container, Flex, type Responsive} from '@sentry/scraps/layout';
66
import {Text} from '@sentry/scraps/text';
77

88
import {Panel} from 'sentry/components/panels/panel';
@@ -123,15 +123,23 @@ export const BreakdownPanelItem = styled(StyledPanelItem)<{highlightedSliceName:
123123
`}
124124
`;
125125

126-
export const EmptyStateText = styled('div')<{
126+
export function EmptyStateText({
127+
children,
128+
size,
129+
textAlign,
130+
}: {
131+
children: React.ReactNode;
127132
size: 'xl' | 'md';
128-
textAlign?: CSSProperties['textAlign'];
129-
}>`
130-
color: ${p => p.theme.tokens.content.secondary};
131-
font-size: ${p => p.theme.font.size[p.size]};
132-
padding-bottom: ${p => p.theme.space.md};
133-
${p => p.textAlign && `text-align: ${p.textAlign}`};
134-
`;
133+
textAlign?: Responsive<'left' | 'center' | 'right' | 'justify'>;
134+
}) {
135+
return (
136+
<Container>
137+
<Text as="div" size={size} align={textAlign} variant="muted">
138+
{children}
139+
</Text>
140+
</Container>
141+
);
142+
}
135143

136144
export const EmptyValueContainer = styled('span')`
137145
color: ${p => p.theme.tokens.content.secondary};

0 commit comments

Comments
 (0)