Skip to content

Commit 91e87c3

Browse files
authored
fix(replay): move hover to be over buttons (#103524)
<img width="195" height="47" alt="image" src="https://github.com/user-attachments/assets/c0fac2e7-486a-44f1-8f0f-ce41671df172" /> The copy button shows up when hovering over arrows, it should only show up when hovering the short id
1 parent 099914b commit 91e87c3

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

static/app/views/replays/detail/header/replayDetailsPageBreadcrumbs.tsx

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@ export default function ReplayDetailsPageBreadcrumbs({readerResult}: Props) {
102102
const replayCrumb = {
103103
label: replayRecord ? (
104104
<Flex>
105-
<Flex
106-
align="center"
107-
gap="xs"
108-
onMouseEnter={() => setIsHovered(true)}
109-
onMouseLeave={() => setIsHovered(false)}
110-
>
105+
<Flex align="center" gap="xs">
111106
{organization.features.includes('replay-playlist-view') && (
112107
<Flex>
113108
<ButtonBar merged gap="0">
@@ -151,29 +146,35 @@ export default function ReplayDetailsPageBreadcrumbs({readerResult}: Props) {
151146
</ButtonBar>
152147
</Flex>
153148
)}
154-
<ShortId
155-
onClick={() =>
156-
copy(replayUrlWithTimestamp, {
157-
successMessage: t('Copied replay link to clipboard'),
158-
})
159-
}
149+
<Flex
150+
align="center"
151+
onMouseEnter={() => setIsHovered(true)}
152+
onMouseLeave={() => setIsHovered(false)}
160153
>
161-
{getShortEventId(replayRecord?.id)}
162-
</ShortId>
163-
<Tooltip title={t('Copy link to replay at current timestamp')}>
164-
<Button
165-
aria-label={t('Copy link to replay at current timestamp')}
154+
<ShortId
166155
onClick={() =>
167156
copy(replayUrlWithTimestamp, {
168157
successMessage: t('Copied replay link to clipboard'),
169158
})
170159
}
171-
size="zero"
172-
borderless
173-
style={isHovered ? {} : {visibility: 'hidden'}}
174-
icon={<IconCopy size="xs" color="subText" />}
175-
/>
176-
</Tooltip>
160+
>
161+
{getShortEventId(replayRecord?.id)}
162+
</ShortId>
163+
<Tooltip title={t('Copy link to replay at current timestamp')}>
164+
<Button
165+
aria-label={t('Copy link to replay at current timestamp')}
166+
onClick={() =>
167+
copy(replayUrlWithTimestamp, {
168+
successMessage: t('Copied replay link to clipboard'),
169+
})
170+
}
171+
size="zero"
172+
borderless
173+
style={isHovered ? {} : {visibility: 'hidden'}}
174+
icon={<IconCopy size="xs" color="subText" />}
175+
/>
176+
</Tooltip>
177+
</Flex>
177178
</Flex>
178179
</Flex>
179180
) : (

0 commit comments

Comments
 (0)