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

Point users to Python extension in DVC Setup #4124

Merged
merged 7 commits into from
Jun 19, 2023

Conversation

julieg18
Copy link
Contributor

@julieg18 julieg18 commented Jun 15, 2023

  • add link to python extension if users don't use it and disable buttons instead of removing completely

Demo

https://github.com/iterative/vscode-dvc/assets/43496356/aec5ac6e-d39b-4799-aa52-3468a0fd8e03

Screen.Recording.2023-06-19.at.11.01.20.AM.mov
Screenshot 2023-06-19 at 11 01 48 AM

Part of #3935

@julieg18 julieg18 added the product PR that affects product label Jun 15, 2023
@julieg18 julieg18 self-assigned this Jun 15, 2023
@@ -187,6 +186,28 @@ describe('App', () => {
})
})

it('should show "Set Env" and "Install (pip)" button tooltips when dvc is unavailable and Python extension is not installed', () => {
Copy link
Contributor Author

@julieg18 julieg18 Jun 17, 2023

Choose a reason for hiding this comment

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

My original plan was to add tests for checking if buttons and tooltips were disabled depending on circumstances but for some reason, tooltips and buttons weren't disabling in the tests. They are working in Storybook and in development but not in testing. Any ideas what's going on?

Copy link
Member

Choose a reason for hiding this comment

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

the magic virtual dom probably doesn't set the properly correctly

webview/src/setup/components/dvc/CliUnavailable.tsx Outdated Show resolved Hide resolved
}> = ({ dataTestId, disabled, children }) => (
<Tooltip
content={
<span data-testid={dataTestId}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if we need the extra tooltips since it does tell you to install the python extension in the text 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the tooltip either. It looks very strange with almost the same text popping up next to the original.

@julieg18 julieg18 marked this pull request as ready for review June 17, 2023 01:03
}> = ({ dataTestId, disabled, children }) => (
<Tooltip
content={
<span data-testid={dataTestId}>
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the tooltip either. It looks very strange with almost the same text popping up next to the original.

@@ -2,14 +2,13 @@ import React from 'react'
import styles from './styles.module.scss'
import { Icon } from '../../../shared/components/Icon'
import { Extensions } from '../../../shared/components/icons'
import { ExtensionLink } from '../shared/ExtensionLink'
Copy link
Member

Choose a reason for hiding this comment

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

[Q] Why not move the text out from the original paragraph, put it under the buttons and use this component?

I think that would

  1. draw attention to the text
  2. remove the need to show a tooltip.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea! Here's what that looks like so far:

Screenshot 2023-06-19 at 11 01 48 AM

I adjusted the paragraph styling so that it looks more connected to the disabled buttons vs a separate paragraph entirely.

@julieg18 julieg18 requested a review from shcheklein June 19, 2023 16:05
@julieg18 julieg18 enabled auto-merge (squash) June 19, 2023 23:06
@codeclimate
Copy link

codeclimate bot commented Jun 19, 2023

Code Climate has analyzed commit b92216c 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 95.2% (0.0% change).

View more on Code Climate.

@julieg18 julieg18 merged commit a0598ce into main Jun 19, 2023
@julieg18 julieg18 deleted the add-python-ext-ref-to-dvc-setup branch June 19, 2023 23:29
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants