Skip to content

Commit

Permalink
Simplify setup section text blocks (#3981)
Browse files Browse the repository at this point in the history
  • Loading branch information
julieg18 authored May 26, 2023
1 parent 213b3f6 commit 877573d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
21 changes: 10 additions & 11 deletions webview/src/setup/components/dvc/GitUnitialized.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,25 @@ export const GitUninitialized: React.FC<PropsWithChildren> = ({ children }) => {
(state: SetupState) => state.dvc.canGitInitialize
)

const startingSentence =
'A Git repository is a prerequisite of project initialization.'

const conditionalContent = canGitInitialize ? (
<Button onClick={initializeGit} text="Initialize Git" />
) : (
<>
<p>
The extension is unable to initialize a Git repository in this
workspace.
</p>
<p>
Please open a different folder which contains no Git repositories or a
single existing Git repository at the root.
</p>
<p>{startingSentence}</p>
<Button onClick={initializeGit} text="Initialize Git" />
</>
) : (
<p>
{startingSentence} Please open a different folder which contains no Git
repositories or a single existing Git repository at the root.
</p>
)

return (
<EmptyState isFullScreen={false}>
<h1>DVC is not initialized</h1>
{children}
<p>A Git repository is a prerequisite of project initialization.</p>
{conditionalContent}
</EmptyState>
)
Expand Down
6 changes: 2 additions & 4 deletions webview/src/setup/components/studio/Connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ export const Connect: React.FC = () => {
</h1>
<p>
Share experiments and plots with collaborators directly from your IDE.
</p>
<p>
An{' '}
Start sending data with an{' '}
<a href="https://dvc.org/doc/studio/user-guide/projects-and-experiments/live-metrics-and-plots#set-up-an-access-token">
access token
</a>{' '}
can be generated from your Studio profile page.
generated from your Studio profile page.
</p>
<Button
appearance="primary"
Expand Down

0 comments on commit 877573d

Please sign in to comment.