@@ -131,12 +131,18 @@ interface CompleteDiffButtonProps extends ButtonProps {
131131}
132132
133133const CompleteDiffButton = styled (
134- ( { open, onClick, ...props } : CompleteDiffButtonProps ) =>
135- open ? (
136- < Button { ...props } icon = { < RollbackOutlined /> } onClick = { onClick } />
137- ) : (
138- < Button { ...props } icon = { < CheckOutlined /> } onClick = { onClick } />
139- )
134+ ( { open, onClick, ...props } : CompleteDiffButtonProps ) => (
135+ < Popover
136+ content = { open ? 'Mark as not viewed' : 'Mark as viewed' }
137+ trigger = "hover"
138+ >
139+ { open ? (
140+ < Button { ...props } icon = { < RollbackOutlined /> } onClick = { onClick } />
141+ ) : (
142+ < Button { ...props } icon = { < CheckOutlined /> } onClick = { onClick } />
143+ ) }
144+ </ Popover >
145+ )
140146) `
141147 ${ defaultIconButtonStyle }
142148 &,
@@ -171,7 +177,7 @@ const CopyPathToClipboardButton = styled(
171177 content = { copyPathPopoverContent }
172178 trigger = "hover"
173179 overlayStyle = { {
174- width : '175px ' ,
180+ width : '140px ' ,
175181 textAlign : 'center' ,
176182 } }
177183 >
@@ -188,7 +194,7 @@ const CopyPathToClipboardButton = styled(
188194`
189195
190196const copyAnchorLinks = {
191- default : 'Click to copy anchor link' ,
197+ default : 'Copy anchor link' ,
192198 copied : 'Anchor link copied!' ,
193199}
194200
@@ -199,6 +205,7 @@ interface CopyAnchorLinksToClipboardButtonProps
199205 toVersion : string
200206 type : string
201207}
208+
202209const CopyAnchorLinksToClipboardButton = styled (
203210 ( {
204211 id,
@@ -226,7 +233,7 @@ const CopyAnchorLinksToClipboardButton = styled(
226233 content = { content }
227234 trigger = "hover"
228235 overlayStyle = { {
229- width : '175px ' ,
236+ width : '150px ' ,
230237 textAlign : 'center' ,
231238 } }
232239 >
@@ -244,12 +251,17 @@ const CopyAnchorLinksToClipboardButton = styled(
244251`
245252
246253const CollapseClickableArea = styled . div `
247- display: inline-block;
254+ display: inline-flex;
255+ align-items: center;
256+
248257 &:hover {
249258 cursor: pointer;
250259 }
251- `
252260
261+ & > *:last-child {
262+ margin-left: 8px;
263+ }
264+ `
253265interface CollapseDiffButtonProps extends ButtonProps {
254266 open : boolean
255267 isDiffCollapsed : boolean
@@ -258,10 +270,15 @@ interface CollapseDiffButtonProps extends ButtonProps {
258270
259271const CollapseDiffButton = styled (
260272 ( { open, isDiffCollapsed, ...props } : CollapseDiffButtonProps ) =>
261- open ? < Button { ...props } type = "link" icon = { < DownOutlined /> } /> : null
273+ open ? (
274+ < Button
275+ { ...props }
276+ type = "link"
277+ icon = { < DownOutlined style = { { height : 12 , width : 12 } } /> }
278+ />
279+ ) : null
262280) `
263281 color: ${ ( { theme } ) => theme . text } ;
264- margin-right: 2px;
265282 font-size: 10px;
266283 transform: ${ ( { isDiffCollapsed } ) =>
267284 isDiffCollapsed ? 'rotate(-90deg)' : 'initial' } ;
@@ -343,7 +360,7 @@ const DiffHeader = ({
343360 oldPath = { sanitizedFilePaths . oldPath }
344361 newPath = { sanitizedFilePaths . newPath }
345362 type = { type }
346- /> { ' ' }
363+ />
347364 < FileStatus type = { type } />
348365 < BinaryBadge open = { ! hasDiff } />
349366 </ CollapseClickableArea >
@@ -354,14 +371,13 @@ const DiffHeader = ({
354371 onCopy = { onCopyPathToClipboard }
355372 copyPathPopoverContent = { copyPathPopoverContent }
356373 resetCopyPathPopoverContent = { resetCopyPathPopoverContent }
357- />
374+ /> { ' ' }
358375 < CopyAnchorLinksToClipboardButton
359376 id = { id }
360377 type = { type }
361378 fromVersion = { fromVersion }
362379 toVersion = { toVersion }
363380 />
364-
365381 < DiffCommentReminder
366382 comments = { diffComments }
367383 isDiffCollapsed = { isDiffCollapsed }
@@ -388,7 +404,7 @@ const DiffHeader = ({
388404 version = { toVersion }
389405 path = { newPath }
390406 packageName = { packageName }
391- />
407+ /> { ' ' }
392408 < CompleteDiffButton
393409 open = { isDiffCompleted }
394410 onClick = { ( ) => onCompleteDiff ( diffKey ) }
0 commit comments