Skip to content

Commit 9aca903

Browse files
authored
Add periods to setup views (#3024)
1 parent a656fb2 commit 9aca903

File tree

4 files changed

+58
-65
lines changed

4 files changed

+58
-65
lines changed

webview/src/setup/components/App.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe('App', () => {
111111

112112
expect(
113113
screen.getByText(
114-
'DVC & DVCLive cannot be auto-installed as Python was not located'
114+
'DVC & DVCLive cannot be auto-installed as Python was not located.'
115115
)
116116
).toBeInTheDocument()
117117
expect(screen.queryByText('Install')).not.toBeInTheDocument()

webview/src/setup/components/CliUnavailable.tsx

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import React from 'react'
22
import { Button } from '../../shared/components/button/Button'
33
import { EmptyState } from '../../shared/components/emptyState/EmptyState'
44

5+
const Title: React.FC = () => <h1>DVC is currently unavailable</h1>
6+
57
export type CliUnavailableProps = {
68
installDvc: () => void
79
isPythonExtensionInstalled: boolean
@@ -40,7 +42,6 @@ export const CliUnavailable: React.FC<CliUnavailableProps> = ({
4042
selectPythonInterpreter,
4143
setupWorkspace
4244
}) => {
43-
const Title = <h1>DVC is currently unavailable</h1>
4445
const SetupWorkspace: React.FC<{ description: string }> = ({
4546
description
4647
}) => (
@@ -56,33 +57,27 @@ export const CliUnavailable: React.FC<CliUnavailableProps> = ({
5657
if (!canInstall) {
5758
return (
5859
<EmptyState>
59-
<div>
60-
{Title}
61-
<p>
62-
DVC & DVCLive cannot be auto-installed as Python was not located
63-
</p>
64-
<SetupWorkspace description="To locate a Python Interpreter or DVC" />
65-
</div>
60+
<Title />
61+
<p>DVC & DVCLive cannot be auto-installed as Python was not located.</p>
62+
<SetupWorkspace description="To locate a Python Interpreter or DVC." />
6663
</EmptyState>
6764
)
6865
}
6966

7067
return (
7168
<EmptyState>
72-
<div>
73-
{Title}
74-
<OfferToInstall pythonBinPath={pythonBinPath} installDvc={installDvc}>
75-
{isPythonExtensionInstalled ? (
76-
<UpdateInterpreterOrFind
77-
action="Select Python Interpreter"
78-
description="To update the interpreter and/or locate DVC"
79-
onClick={selectPythonInterpreter}
80-
/>
81-
) : (
82-
<SetupWorkspace description="To update the install location or locate DVC" />
83-
)}
84-
</OfferToInstall>
85-
</div>
69+
<Title />
70+
<OfferToInstall pythonBinPath={pythonBinPath} installDvc={installDvc}>
71+
{isPythonExtensionInstalled ? (
72+
<UpdateInterpreterOrFind
73+
action="Select Python Interpreter"
74+
description="To update the interpreter and/or locate DVC."
75+
onClick={selectPythonInterpreter}
76+
/>
77+
) : (
78+
<SetupWorkspace description="To update the install location or locate DVC." />
79+
)}
80+
</OfferToInstall>
8681
</EmptyState>
8782
)
8883
}

webview/src/setup/components/NoData.tsx

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,44 @@ import { EmptyState } from '../../shared/components/emptyState/EmptyState'
1010
export const NoData: React.FC = () => {
1111
return (
1212
<EmptyState>
13+
<h1>Your project contains no data</h1>
1314
<div>
14-
<h1>Your project contains no data</h1>
15-
<div>
16-
Enable DVC experiment tracking using{' '}
17-
<a href="https://dvc.org/doc/dvclive">DVCLive</a> with{' '}
18-
<CodeBlock language="python" inline>
19-
save_dvc_exp=True
20-
</CodeBlock>
21-
. Use the callback for your framework or log your own metrics. You can
22-
find examples below (
23-
<a href="https://dvc.org/doc/dvclive/api-reference/ml-frameworks">
24-
other frameworks available
25-
</a>
26-
)
27-
</div>
28-
<CodeSlider
29-
codeBlocks={[
30-
{
31-
children: pyTorch.toString(),
32-
language: 'python',
33-
title: 'PyTorch Lightning'
34-
},
35-
{
36-
children: huggingFace.toString(),
37-
language: 'python',
38-
title: 'Hugging Face'
39-
},
40-
{
41-
children: keras.toString(),
42-
language: 'python',
43-
title: 'Keras'
44-
},
45-
{
46-
children: pythonApi.toString(),
47-
language: 'python',
48-
title: 'General Python API'
49-
}
50-
]}
51-
/>
15+
Enable DVC experiment tracking using{' '}
16+
<a href="https://dvc.org/doc/dvclive">DVCLive</a> with{' '}
17+
<CodeBlock language="python" inline>
18+
save_dvc_exp=True
19+
</CodeBlock>
20+
. Use the callback for your framework or log your own metrics. You can
21+
find examples below (
22+
<a href="https://dvc.org/doc/dvclive/api-reference/ml-frameworks">
23+
other frameworks available
24+
</a>
25+
).
5226
</div>
27+
<CodeSlider
28+
codeBlocks={[
29+
{
30+
children: pyTorch.toString(),
31+
language: 'python',
32+
title: 'PyTorch Lightning'
33+
},
34+
{
35+
children: huggingFace.toString(),
36+
language: 'python',
37+
title: 'Hugging Face'
38+
},
39+
{
40+
children: keras.toString(),
41+
language: 'python',
42+
title: 'Keras'
43+
},
44+
{
45+
children: pythonApi.toString(),
46+
language: 'python',
47+
title: 'General Python API'
48+
}
49+
]}
50+
/>
5351
</EmptyState>
5452
)
5553
}

webview/src/setup/components/ProjectUninitialized.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface GitUninitializedProps {
1010
}
1111

1212
const GitIsPrerequisite: React.FC = () => (
13-
<p>A Git repository is a prerequisite of project initialization</p>
13+
<p>A Git repository is a prerequisite of project initialization.</p>
1414
)
1515

1616
const GitUninitialized: React.FC<GitUninitializedProps> = ({
@@ -24,11 +24,11 @@ const GitUninitialized: React.FC<GitUninitializedProps> = ({
2424
<GitIsPrerequisite />
2525
<p>
2626
The extension is unable to initialize a Git repository in this
27-
workspace
27+
workspace.
2828
</p>
2929
<p>
3030
Please open a different folder which contains no Git repositories or a
31-
single existing Git repository at the root
31+
single existing Git repository at the root.
3232
</p>
3333
</EmptyState>
3434
)
@@ -51,7 +51,7 @@ const DvcUninitialized: React.FC<{ initializeDvc: () => void }> = ({
5151
<p>
5252
The current workspace does not contain a DVC project. You can initialize a
5353
project which will enable features powered by DVC. To learn more about how
54-
to use DVC please read <a href="https://dvc.org/doc">our docs</a>
54+
to use DVC please read <a href="https://dvc.org/doc">our docs</a>.
5555
</p>
5656
<Button onClick={initializeDvc} text="Initialize Project"></Button>
5757
</EmptyState>

0 commit comments

Comments
 (0)