Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify setup section text blocks #3981

Merged
merged 2 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured this sentence isn't needed but, if thought otherwise, we can add it back with a little tweaking to make the sentences "flow" more.

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