kubeshop / vscode-monokle

An extension for Visual Studio Code to validate your Kubernetes configuration
https://marketplace.visualstudio.com/items?itemName=kubeshop.monokle
MIT License
6 stars 0 forks source link

Add config option when to show validation panel #6

Closed f1ames closed 7 months ago

f1ames commented 1 year ago

The validation panel (SARIF panel) is always shown on startup when there are any resources with validation warning/errors. It might be a bit annoying in a long run.

This behavior should become a configuration option.

IMPORTANT: This is how SARIF openLogs() behaves, so either it will require changes in SARIF extension or a workaround (passing file with no errors to openLogs() API and then populating with validation results). I think contributing would be a viable option here definately.

f1ames commented 9 months ago

As we forked SARIF already this one should be quick. And I found myself, at some point, disabling the extension because appearing panel on every project open was too annoying. @WitoDelnat do you think we can squeeze it somewhere in the upcoming iterations?

WitoDelnat commented 9 months ago

Thanks for surfacing this issue. Given that it should be relatively quick, let's squeeze it in our current iteration. It's important to remove all these frictions that might lead to churn.

f1ames commented 7 months ago

The simplest solution would be adding config option for users to decide when Violations panel should be shown automatically:

WitoDelnat commented 7 months ago

As another option, I wonder if from the highlight or an action we could maybe have a link that "Show details" or something like that. Actually similarly to ESLint now that I think about it (see screenshot below). This is less in your face, but there if you'd like it and more easily discoverable.

One downside I can think of is that often problems overlap in Kubernetes which would lead to too many available actions. To illustrate, it's 3 per problem and you can have like 5 together easily so 15 actions which is way to many 🤔 Maybe at that point we should encourage opening the SARIF viewer and action from there?

Screenshot 2024-01-26 at 14 42 25

f1ames commented 7 months ago

As another option, I wonder if from the highlight or an action we could maybe have a link that "Show details" or something like that. Actually similarly to ESLint now that I think about it (see screenshot below). This is less in your face, but there if you'd like it and more easily discoverable.

...

Screenshot 2024-01-26 at 14 42 25

For a moment I was thinking about this too, this could be useful 🤔

One downside I can think of is that often problems overlap in Kubernetes which would lead to too many available actions. To illustrate, it's 3 per problem and you can have like 5 together easily so 15 actions which is way to many 🤔

Regarding the above, this could be an issue indeed. Should we have a generic quick fix action like "Show documentation/details for violated rules" which will just open the panel then?

Maybe at that point we should encourage opening the SARIF viewer and action from there?

What do you mean exactly, just to leave it as is? I mean go with initial proposal for introducing config or something different?

WitoDelnat commented 7 months ago

Regarding the above, this could be an issue indeed. Should we have a generic quick fix action like "Show documentation/details for violated rules" which will just open the panel then?

+1 for making it one single action for "Show more details for these rules".

What do you mean exactly, just to leave it as is? I mean go with initial proposal for introducing config or something different?

I don't remember if its currently possible to fix or suppress from the SARIF Details pane. What I mean is that if we have like 15+ fix/suppress actions it becomes too much and as an alternative the action could then be merged as "Fix these problems in SARIF viewer" which opens the pane and you can manage it there. I doubt a bit if this idea feels as a good UX though.

f1ames commented 7 months ago

I don't remember if its currently possible to fix or suppress from the SARIF Details pane. What I mean is that if we have like 15+ fix/suppress actions it becomes too much and as an alternative the action could then be merged as "Fix these problems in SARIF viewer" which opens the pane and you can manage it there. I doubt a bit if this idea feels as a good UX though.

Ahhh, I see, this was more generic comment 👍 It's not possible now - only from quick fix panel and problems panel. We can think of extending Details pane to add those actions there too however I would still keep them as quick actions. However, for cases if there are more than 10 maybe we should do some smart filtering grouping... Maybe that's a "wait and see" problem and we can improve the UI as we go 🤔