-
Notifications
You must be signed in to change notification settings - Fork 30
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: fetch feature flag for Code Consistent Ignores [IDE-274] #455
Conversation
- Added a new feature flag `snykCodeLsp` to enable the Snyk Code Panel Rendering via LSP.
- The conditional rendering logic can be achieved in `CodeSuggestionWebviewProvider`
@@ -25,6 +27,9 @@ class ConfigurationWatcher implements IWatcher { | |||
constructor(private readonly logger: ILog) {} | |||
|
|||
private async onChangeConfiguration(extension: IExtension, key: string): Promise<void> { | |||
if (key === ADVANCED_ORGANIZATION_SETTING) { | |||
await configuration.fetchAndSetFeatureFlag(FEATURE_FLAGS.consistentIgnores); |
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.
Could we not make this call for ADVANCED_ORGANIZATION
so we don't need to add a new configuration key? We basically want to update the feature flag whenever the org changes right?
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.
I'm saying that I think ADVANCED_ORGANIZATION
is already meant to represent a change for that panel: https://github.com/snyk/vscode-extension/blob/main/src/snyk/common/constants/settings.ts#L19. It looks like we're not listening to this in onChangeConfiguration
though, for some weird reason.
What is the difference between ADVANCED_ORGANIZATION_SETTING
and ADVANCED_ORGANIZATION
?
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.
Oh! I'm sorry! You were saying that I duplicated a variable!
You are right! I didn't realise I duplicated snyk-advanced.organization
.
There is no difference, I made a mistake declaring a variable that already exists.
Deleting it now, thank you.
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.
Tested it and it works! Thanks
Description
This is the foundation work for the Code details panel dynamic rendering. When enabled, Code details will render HTML provided by LSP
Checklist
Screenshots / GIFs