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

Add completion status to setup sections #3823

Merged
merged 13 commits into from
May 8, 2023
Merged

Conversation

julieg18
Copy link
Contributor

@julieg18 julieg18 commented May 3, 2023

  • replaces section tooltip with an icon depending on status

Demo

https://user-images.githubusercontent.com/43496356/236336529-94e7ab49-cb57-4218-a384-a43ded399a36.mov

trimmed.mov

image

image

Part of #3434

@julieg18 julieg18 added the product PR that affects product label May 3, 2023
@julieg18 julieg18 added this to In progress in VS Code May 2 via automation May 3, 2023
@julieg18 julieg18 self-assigned this May 3, 2023
const tooltipContent = (
<div className={styles.infoTooltip}>
{infoIcon}
{SectionDescription[sectionKey]}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want to adjust the tooltip text to include information about a section status or is the icon enough? We could add a generic message like "This section is incomplete" 🤔

Copy link
Member

Choose a reason for hiding this comment

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

The current text should be ok for now. If we want to revisit we should add very clear text for the expectation/usage of the section. E.g Configure the extension to start working with DVC. Under the current configuration, the extension cannot initialize. Please follow the steps laid out in the section in order to get up and running.

Copy link
Member

Choose a reason for hiding this comment

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

up to you

@@ -17,6 +17,7 @@ $error-color: var(--vscode-errorForeground);
$meta-cell-color: var(--vscode-descriptionForeground);
$accent-color: var(--button-primary-background);
$accent-color-transparent: var(--accent-transparency-3);
$passed-color: var(--vscode-testing-iconPassed);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a better variable for this color that I missed?

Copy link
Member

Choose a reason for hiding this comment

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

this is fine

@@ -128,6 +134,7 @@ export const App: React.FC = () => {
title="Studio"
sectionCollapsed={sectionCollapsed}
setSectionCollapsed={setSectionCollapsed}
hasError={!cliCompatible}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noticed that the studio section shows the "DVC Not Available" screen if DVC is not compatible but shows the setting screen if the project is not initialized. Is this expected?

Copy link
Member

@mattseddon mattseddon May 8, 2023

Choose a reason for hiding this comment

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

That is how I set it up. Although connecting to Studio is a secondary concern we can connect without a project. We cannot however check to see if Studio is connected if we don't have access to the CLI (need to run dvc config studio.token).

@julieg18 julieg18 marked this pull request as ready for review May 4, 2023 21:45
@julieg18 julieg18 requested a review from shcheklein May 4, 2023 21:45
@julieg18
Copy link
Contributor Author

julieg18 commented May 4, 2023

After a discussion with Matt, we're going to remove the white checkmark icon, replacing it with the red error icon. It will reduce states and make things more clear :) Should be a quick change but converting this pr to a draft since I won't be working on it till tomorrow morning!

@julieg18 julieg18 marked this pull request as draft May 4, 2023 23:04
@julieg18 julieg18 marked this pull request as ready for review May 5, 2023 15:33
webview/src/setup/components/App.test.tsx Outdated Show resolved Hide resolved
webview/src/setup/components/App.tsx Outdated Show resolved Hide resolved
const tooltipContent = (
<div className={styles.infoTooltip}>
{infoIcon}
{SectionDescription[sectionKey]}
Copy link
Member

Choose a reason for hiding this comment

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

up to you

@@ -17,6 +17,7 @@ $error-color: var(--vscode-errorForeground);
$meta-cell-color: var(--vscode-descriptionForeground);
$accent-color: var(--button-primary-background);
$accent-color-transparent: var(--accent-transparency-3);
$passed-color: var(--vscode-testing-iconPassed);
Copy link
Member

Choose a reason for hiding this comment

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

this is fine

hasData: true,
isPythonExtensionUsed: true,
isStudioConnected: true,
needsGitCommit: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is only a suggestion, but by having anything that is set to false or undefined be optional in renderApp that would make it easier to see what is it that a test is actually testing with and for. It'd make writing new test much easier as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking about this as well since that's how we write other test files when it comes to a lot of props. Will update renderApp and adjust the rest of the tests in a followup.

@julieg18 julieg18 enabled auto-merge (squash) May 8, 2023 19:10
@codeclimate
Copy link

codeclimate bot commented May 8, 2023

Code Climate has analyzed commit 16a228b and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (85% is the threshold).

This pull request will bring the total coverage in the repository to 94.8%.

View more on Code Climate.

@julieg18 julieg18 merged commit 59ae23d into main May 8, 2023
7 checks passed
VS Code May 2 automation moved this from In progress to Done May 8, 2023
@julieg18 julieg18 deleted the show-setup-completion branch May 8, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR that affects product
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants