Skip to content

Commit c63ac98

Browse files
authored
Merge pull request #388 from shubh73/fix/ui-improvements
2 parents 06f61c3 + 5b99326 commit c63ac98

8 files changed

+52
-52
lines changed

Diff for: src/components/common/AlignDepsAlert.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ const AlignDepsAlert = () => (
88
@rnx-kit/align-deps --requirements react-native@[major.minor]`.
99
</Markdown>
1010
<br />
11+
<br />
1112
<Markdown>
12-
`align-deps` is an OSS tool from Microsoft that automates dependency
13-
management. It knows which packages\* versions are compatible with your
14-
specific version of RN, and it uses that knowledge to align dependencies,
15-
keeping your app healthy and up-to-date\*\*. [Find out more
13+
[`align-deps`](https://microsoft.github.io/rnx-kit/docs/tools/align-deps)
14+
is an OSS tool from Microsoft that automates dependency management. It
15+
knows which packages\* versions are compatible with your specific version
16+
of RN, and it uses that knowledge to align dependencies, keeping your app
17+
healthy and up-to-date\*\*. [Find out more
1618
here](https://microsoft.github.io/rnx-kit/docs/guides/dependency-management).
1719
</Markdown>
1820
<br />

Diff for: src/components/common/Diff/Diff.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import type { ChangeEventArgs } from 'react-diff-view'
2121
import type { DefaultRenderToken } from 'react-diff-view/types/context'
2222

2323
const copyPathPopoverContentOpts = {
24-
default: 'Click to copy file path',
24+
default: 'Copy file path',
2525
copied: 'File path copied!',
2626
}
2727

Diff for: src/components/common/Diff/DiffHeader.tsx

+33-17
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,18 @@ interface CompleteDiffButtonProps extends ButtonProps {
131131
}
132132

133133
const 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

190196
const 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+
202209
const 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

246253
const 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+
`
253265
interface CollapseDiffButtonProps extends ButtonProps {
254266
open: boolean
255267
isDiffCollapsed: boolean
@@ -258,10 +270,15 @@ interface CollapseDiffButtonProps extends ButtonProps {
258270

259271
const 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)}

Diff for: src/components/common/UpgradeButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Container = styled.div`
1515
`
1616

1717
const Button = styled(AntdButton)`
18-
border-radius: 3px;
18+
border-radius: 5px;
1919
`
2020

2121
interface UpgradeButtonProps extends React.PropsWithRef<ButtonProps> {

Diff for: src/components/common/UpgradeSupportAlert.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ const UpgradeSupportAlert = styled((props: UpgradeSupportAlertProps) => (
3030
))`
3131
span > a {
3232
color: ${({ theme }) => theme.link}};
33-
34-
&:hover {
35-
color: ${({ theme }) => theme.linkHover}};
36-
}
3733
}
3834
`
3935

Diff for: src/components/common/UsefulContentSection.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ const HideContentButton = styled(
122122
<Button
123123
{...props}
124124
type="link"
125-
icon={isContentOpen ? <UpOutlined /> : <DownOutlined />}
125+
icon={
126+
isContentOpen ? (
127+
<UpOutlined style={{ height: 14, width: 14 }} />
128+
) : (
129+
<DownOutlined style={{ height: 14, width: 14 }} />
130+
)
131+
}
126132
onClick={toggleContentVisibility}
127133
/>
128134
)

Diff for: src/components/common/VersionSelector.tsx

+3-13
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,14 @@ export const testIDs = {
1818
const Selectors = styled.div`
1919
display: flex;
2020
flex-direction: column;
21-
justify-content: space-between;
22-
gap: 15px;
21+
gap: 16px;
2322
2423
@media ${deviceSizes.tablet} {
2524
flex-direction: row;
26-
gap: 0;
2725
}
2826
`
2927

30-
const FromVersionSelector = styled(Select)`
31-
@media ${deviceSizes.tablet} {
32-
padding-right: 5px;
33-
}
34-
`
28+
const FromVersionSelector = styled(Select)``
3529

3630
interface ToVersionSelectorProps extends SelectProps {
3731
popover?: React.ReactNode
@@ -47,11 +41,7 @@ const ToVersionSelector = styled(
4741
) : (
4842
<Select {...props} />
4943
)
50-
)`
51-
@media ${deviceSizes.tablet} {
52-
padding-left: 5px;
53-
}
54-
`
44+
)``
5545

5646
const getVersionsInURL = (): {
5747
fromVersion: string

Diff for: src/components/pages/Home.tsx

+1-11
Original file line numberDiff line numberDiff line change
@@ -73,29 +73,19 @@ const TitleContainer = styled.div`
7373

7474
const AppNameField = styled.div`
7575
width: 100%;
76-
77-
@media ${deviceSizes.tablet} {
78-
padding-right: 5px;
79-
}
8076
`
8177

8278
const AppPackageField = styled.div`
8379
width: 100%;
84-
85-
@media ${deviceSizes.tablet} {
86-
padding-left: 5px;
87-
}
8880
`
8981

9082
const AppDetailsContainer = styled.div`
9183
display: flex;
9284
flex-direction: column;
93-
justify-content: space-between;
94-
gap: 15px;
85+
gap: 16px;
9586
9687
@media ${deviceSizes.tablet} {
9788
flex-direction: row;
98-
gap: 0;
9989
}
10090
`
10191

0 commit comments

Comments
 (0)