Skip to content

Commit 1c0a963

Browse files
authored
Merge branch 'master' into nm/nav/issue-detail-actions
2 parents 6ba85d8 + a8cb303 commit 1c0a963

File tree

4 files changed

+52
-22
lines changed

4 files changed

+52
-22
lines changed

static/app/components/events/eventDrawer.tsx

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type {ComponentPropsWithoutRef} from 'react';
12
import styled from '@emotion/styled';
23

34
import {InputGroup} from '@sentry/scraps/input';
@@ -6,6 +7,11 @@ import {Flex, type FlexProps} from '@sentry/scraps/layout';
67
import {Breadcrumbs as NavigationBreadcrumbs} from 'sentry/components/breadcrumbs';
78
import {DrawerBody, DrawerHeader} from 'sentry/components/globalDrawer/components';
89
import {MIN_NAV_HEIGHT} from 'sentry/views/issueDetails/streamline/eventTitle';
10+
import {
11+
NAVIGATION_MOBILE_TOPBAR_HEIGHT_WITH_PAGE_FRAME,
12+
PRIMARY_HEADER_HEIGHT,
13+
} from 'sentry/views/navigation/constants';
14+
import {useHasPageFrameFeature} from 'sentry/views/navigation/useHasPageFrameFeature';
915

1016
export const Header = styled('h3')`
1117
display: block;
@@ -31,16 +37,45 @@ export const ShortId = styled('div')`
3137
line-height: 1;
3238
`;
3339

34-
export const EventDrawerContainer = styled('div')`
40+
const EventDrawerContainerRoot = styled('div')<{hasPageFrameFeature: boolean}>`
3541
height: 100%;
3642
display: grid;
3743
grid-template-rows: max-content max-content auto;
44+
45+
${p =>
46+
p.hasPageFrameFeature &&
47+
`
48+
/* Responsive height that matches the TopBar (48px mobile, 53px desktop) */
49+
--event-drawer-header-height: ${NAVIGATION_MOBILE_TOPBAR_HEIGHT_WITH_PAGE_FRAME}px;
50+
--event-navigator-box-shadow: none;
51+
--event-navigator-border-bottom: 1px solid ${p.theme.tokens.border.primary};
52+
53+
@media (min-width: ${p.theme.breakpoints.md}) {
54+
--event-drawer-header-height: ${PRIMARY_HEADER_HEIGHT}px;
55+
}
56+
`}
3857
`;
3958

59+
export function EventDrawerContainer(props: ComponentPropsWithoutRef<'div'>) {
60+
const hasPageFrameFeature = useHasPageFrameFeature();
61+
62+
return (
63+
<EventDrawerContainerRoot {...props} hasPageFrameFeature={hasPageFrameFeature} />
64+
);
65+
}
66+
4067
export const EventDrawerHeader = styled(DrawerHeader)`
4168
position: unset;
42-
max-height: var(--drawer-header-height, ${MIN_NAV_HEIGHT}px);
43-
min-height: var(--drawer-header-height, ${MIN_NAV_HEIGHT}px);
69+
/* Height priority: container variable (responsive) → DrawerHeader height prop → default */
70+
height: var(--event-drawer-header-height, var(--drawer-header-height, auto));
71+
max-height: var(
72+
--event-drawer-header-height,
73+
var(--drawer-header-height, ${MIN_NAV_HEIGHT}px)
74+
);
75+
min-height: var(
76+
--event-drawer-header-height,
77+
var(--drawer-header-height, ${MIN_NAV_HEIGHT}px)
78+
);
4479
align-items: center;
4580
box-shadow: none;
4681
border-bottom: 1px solid ${p => p.theme.tokens.border.primary};
@@ -54,12 +89,17 @@ export const EventNavigator = styled('div')`
5489
grid-template-columns: 1fr auto;
5590
align-items: center;
5691
column-gap: ${p => p.theme.space.md};
57-
padding: ${p => p.theme.space.sm} 24px;
92+
padding: 0 24px;
5893
background: ${p => p.theme.tokens.background.primary};
5994
z-index: 2; /* Just above EventStickyControls */
60-
min-height: ${MIN_NAV_HEIGHT}px;
95+
height: var(--event-drawer-header-height, auto);
96+
min-height: var(--event-drawer-header-height, ${MIN_NAV_HEIGHT}px);
97+
border-bottom: var(--event-navigator-border-bottom, 0);
6198
/* eslint-disable-next-line @sentry/scraps/use-semantic-token */
62-
box-shadow: ${p => p.theme.tokens.border.primary} 0 1px;
99+
box-shadow: var(
100+
--event-navigator-box-shadow,
101+
${p => `${p.theme.tokens.border.primary} 0 1px`}
102+
);
63103
`;
64104

65105
export const EventStickyControls = styled('div')`

static/app/components/questionTooltip.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export default Storybook.story('QuestionTooltip', story => {
1414
The <Storybook.JSXNode name="QuestionTooltip" /> component is a small{' '}
1515
<Storybook.JSXNode name="IconQuestion" /> where you can specify a tooltip to go
1616
with it. It is useful for placing after headers and titles to include additional
17-
information. You'll see it often at the top of Sentry's pages, near the page
18-
titles.
17+
information. Prefer <Storybook.JSXNode name="InfoTip" /> for new usages.
1918
</p>
2019
<p>
2120
An example <Storybook.JSXNode name="QuestionTooltip" /> looks like this:

static/app/components/questionTooltip.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ interface QuestionProps extends Partial<
3131
icon?: 'question' | 'info';
3232
}
3333

34+
/**
35+
* @deprecated Prefer `InfoTip` from `@sentry/scraps/info` for new usages.
36+
*/
3437
export function QuestionTooltip({
3538
title,
3639
size,

static/app/views/issueList/issueViewsHeader.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import type {ReactNode} from 'react';
2-
import styled from '@emotion/styled';
32

43
import {Button} from '@sentry/scraps/button';
4+
import {InfoTip} from '@sentry/scraps/info';
55
import {Flex} from '@sentry/scraps/layout';
66

77
import {DisableInDemoMode} from 'sentry/components/acl/demoModeDisabled';
88
import {DropdownMenu} from 'sentry/components/dropdownMenu';
99
import * as Layout from 'sentry/components/layouts/thirds';
10-
import {QuestionTooltip} from 'sentry/components/questionTooltip';
1110
import {IconEllipsis, IconPause, IconPlay, IconStar} from 'sentry/icons';
1211
import {t} from 'sentry/locale';
1312
import {trackAnalytics} from 'sentry/utils/analytics';
@@ -61,14 +60,7 @@ function PageTitle({title, description}: {title: ReactNode; description?: ReactN
6160
return (
6261
<Layout.Title>
6362
{title}
64-
{description && (
65-
<QuestionTooltip
66-
isHoverable
67-
position="right"
68-
size="sm"
69-
title={<LeftAlignContainer>{description}</LeftAlignContainer>}
70-
/>
71-
)}
63+
{description && <InfoTip position="right" size="sm" title={description} />}
7264
</Layout.Title>
7365
);
7466
}
@@ -279,7 +271,3 @@ export function IssueViewsHeader({
279271
</Layout.Header>
280272
);
281273
}
282-
283-
const LeftAlignContainer = styled('div')`
284-
text-align: left;
285-
`;

0 commit comments

Comments
 (0)