-
Notifications
You must be signed in to change notification settings - Fork 29
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 prompt to show/install the Red Hat YAML extension #903
Conversation
@@ -10,3 +10,13 @@ export const getYesOrNoOrNever = ( | |||
Response.NO, | |||
Response.NEVER | |||
) | |||
|
|||
export const getShowOrCloseOrNever = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
105857d
to
19dff72
Compare
const response = await getShowOrCloseOrNever( | ||
'It is recommended that you install the ' + | ||
'[Red Hat YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) ' + | ||
'extension for comprehensive YAML Language support and [DVC YAML schema validation](https://github.com/iterative/dvcyaml-schema).' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] Both links are shown in the demo. Happy to take help with copy.
Relates to #46. |
extension/package.nls.json
Outdated
@@ -49,6 +49,8 @@ | |||
"command.views.experimentsSortByTree.removeSort": "Remove Sort From Experiments Table", | |||
"config.doNotAssociateYaml.description": "Do not ask to add records into the user's settings relating to associating .dvc and dvc.lock files with the YAML data serialization language", | |||
"config.doNotAssociateYaml.title": "Do not ask to associate .dvc and dvc.lock files with YAML.", | |||
"config.doNotRecommendRedHatExtension.description": "Do not prompt the user to install the Red Hat YAML extension to assist with DVC YAML schema validation.", | |||
"config.doNotRecommendRedHatExtension.title": "Do not prompt the user to install the Red Hat YAML extension.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I mistaken to think that these strings are shown to the user somewhere? (the settings maybe?) If so, I would drop the "the user" from both. If these are simply used internally, then never mind my comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And thank you
19dff72
to
808bf0d
Compare
Code Climate has analyzed commit 808bf0d and detected 2 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 94.4% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.4% (0.0% change). View more on Code Climate. |
2/2
master
<- #902 <- thisAs discussed in the planning meeting this morning we don't want to have an explicit dependency on the Red Hat YAML extension.
The best way around that I have found is to show the user the specific extension and let them install it if they choose to.
Demo
Screen.Recording.2021-10-13.at.2.33.09.pm.mov
Thanks to @skshetry for the assist with simplifying the code.