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

feat: disable default props #606

Merged
merged 7 commits into from
Jan 10, 2022

Conversation

p-spacek
Copy link
Contributor

@p-spacek p-spacek commented Dec 7, 2021

What does this PR do?

Add config to exclude not required default props from completion.
fix: required prop with default value or with const

The reason why users appreciated this feature is that users don't have to specify default properties. Only if the default value needs to be changed, it makes sense to add them (but not all of them automatically).

What issues does this PR fix or reference?

no ref

Is it tested? How?

add unit tests

@coveralls
Copy link

coveralls commented Dec 7, 2021

Coverage Status

Coverage increased (+0.02%) to 79.615% when pulling 23a6724 on p-spacek:feat/disable-default-props into af7d0c3 on redhat-developer:main.

@evidolob
Copy link
Collaborator

evidolob commented Dec 8, 2021

@p-spacek It would be nice if you add description for new settings item in to README.md

Copy link
Collaborator

@gorkem gorkem left a comment

Choose a reason for hiding this comment

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

A small improvement to the test cases but otherwise LGTM. Is there a corresponding PR needed for the vscode-yaml repo?

properties: {
scripts: {
type: 'object',
properties: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we possibly have a second non-string property added to this test case?

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'm sorry for the longer delay...
I modified the UT. Have a look if I understood correctly your note, please.
vscode-yaml PR is here redhat-developer/vscode-yaml#667

properties: {
scripts: {
type: 'object',
properties: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we have a non-string property added?

@p-spacek p-spacek requested a review from gorkem December 22, 2021 09:36
Copy link
Collaborator

@gorkem gorkem left a comment

Choose a reason for hiding this comment

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

This looks ready to go. I am not sure why CI is unhappy with the new test though

@evidolob
Copy link
Collaborator

@p-spacek Test fails because of #609 , could you update this?

@p-spacek
Copy link
Contributor Author

@p-spacek Test fails because of #609 , could you update this?

oh sure.
updated

@evidolob evidolob merged commit 2bc8f89 into redhat-developer:main Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants