Skip to content

Commit ac0497f

Browse files
ryan953andrewshie-sentry
authored andcommitted
replay(feat): Iterate on rendering for browser/device icons inside Replay Details (#95384)
**Before** <img width="181" height="97" alt="SCR-20250711-ngel" src="https://github.com/user-attachments/assets/f84e3848-07b1-42ed-8845-81f6a5efd7e7" /> **After** <img width="230" height="89" alt="SCR-20250711-ngal" src="https://github.com/user-attachments/assets/65544c00-1bd9-43da-98c2-6aad423d8b8d" />
1 parent de249dc commit ac0497f

File tree

3 files changed

+35
-23
lines changed

3 files changed

+35
-23
lines changed

static/app/components/replays/replayPlatformIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type Props = {
1717
showVersion?: boolean;
1818
};
1919

20-
const iconSize = '16px';
20+
const iconSize = '20px';
2121
const iconStyle = (theme: Theme) => ({
2222
border: '1px solid ' + theme.translucentGray100,
2323
});

static/app/components/replays/replayView.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {Fragment, useState} from 'react';
22
import styled from '@emotion/styled';
33

44
import NegativeSpaceContainer from 'sentry/components/container/negativeSpaceContainer';
5+
import {Flex} from 'sentry/components/core/layout';
56
import ExternalLink from 'sentry/components/links/externalLink';
67
import QuestionTooltip from 'sentry/components/questionTooltip';
78
import {useReplayContext} from 'sentry/components/replays/replayContext';
@@ -71,13 +72,15 @@ function ReplayView({toggleFullscreen, isLoading}: Props) {
7172
) : (
7273
<ReplayCurrentUrl />
7374
)}
74-
<BrowserOSIcons showBrowser={!isVideoReplay} isLoading={isLoading} />
75-
{isFullscreen ? (
76-
<ReplaySidebarToggleButton
77-
isOpen={isSidebarOpen}
78-
setIsOpen={setIsSidebarOpen}
79-
/>
80-
) : null}
75+
<Flex gap={space(1)}>
76+
<BrowserOSIcons showBrowser={!isVideoReplay} isLoading={isLoading} />
77+
{isFullscreen ? (
78+
<ReplaySidebarToggleButton
79+
isOpen={isSidebarOpen}
80+
setIsOpen={setIsSidebarOpen}
81+
/>
82+
) : null}
83+
</Flex>
8184
</ContextContainer>
8285
{isLoading ? (
8386
<FluidHeight>
@@ -128,7 +131,7 @@ const ContextContainer = styled('div')`
128131
grid-auto-flow: column;
129132
grid-template-columns: 1fr max-content;
130133
align-items: center;
131-
gap: ${space(1)};
134+
gap: ${space(1.5)};
132135
`;
133136

134137
const ScreenNameContainer = styled('div')`
Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import {Fragment} from 'react';
1+
import styled from '@emotion/styled';
22

3+
import {Flex} from 'sentry/components/core/layout';
34
import {Tooltip} from 'sentry/components/core/tooltip';
45
import Placeholder from 'sentry/components/placeholder';
56
import {useReplayContext} from 'sentry/components/replays/replayContext';
67
import ReplayPlatformIcon from 'sentry/components/replays/replayPlatformIcon';
8+
import {space} from 'sentry/styles/space';
79

810
export default function BrowserOSIcons({
911
showBrowser = true,
@@ -18,7 +20,7 @@ export default function BrowserOSIcons({
1820
return isLoading ? (
1921
<Placeholder width="50px" height="32px" />
2022
) : (
21-
<Fragment>
23+
<Flex direction="row-reverse">
2224
<Tooltip title={`${replayRecord?.os.name ?? ''} ${replayRecord?.os.version ?? ''}`}>
2325
<ReplayPlatformIcon
2426
name={replayRecord?.os.name ?? ''}
@@ -27,18 +29,25 @@ export default function BrowserOSIcons({
2729
/>
2830
</Tooltip>
2931
{showBrowser && (
30-
<Tooltip
31-
title={`${replayRecord?.browser.name ?? ''} ${
32-
replayRecord?.browser.version ?? ''
33-
}`}
34-
>
35-
<ReplayPlatformIcon
36-
name={replayRecord?.browser.name ?? ''}
37-
version={replayRecord?.browser.version ?? undefined}
38-
showVersion
39-
/>
40-
</Tooltip>
32+
<Overlap>
33+
<Tooltip
34+
title={`${replayRecord?.browser.name ?? ''} ${
35+
replayRecord?.browser.version ?? ''
36+
}`}
37+
>
38+
<ReplayPlatformIcon
39+
name={replayRecord?.browser.name ?? ''}
40+
version={replayRecord?.browser.version ?? undefined}
41+
showVersion
42+
/>
43+
</Tooltip>
44+
</Overlap>
4145
)}
42-
</Fragment>
46+
</Flex>
4347
);
4448
}
49+
50+
const Overlap = styled('div')`
51+
margin-right: -${space(0.75)};
52+
z-index: 1;
53+
`;

0 commit comments

Comments
 (0)