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

Hide Monokle when workspace is not Kubernetes related #41

Closed
WitoDelnat opened this issue Sep 11, 2023 · 5 comments · Fixed by #43
Closed

Hide Monokle when workspace is not Kubernetes related #41

WitoDelnat opened this issue Sep 11, 2023 · 5 comments · Fixed by #43
Assignees
Labels
enhancement New feature or request

Comments

@WitoDelnat
Copy link

Currently, when I open a directory that does not relate to Kubernetes and is not a git repo then I get a subtle error "Monokle: Needs attention" in the status bar at the bottom of VSC.

In my opinion we should completely hide Monokle when the plugin is irrelevant to the end-user. Great plugins are transparent and you don't notice they are there. The only reason for me to get rid of this indicator is to uninstall the plugin - you don't want to give people those kind of idea!

@WitoDelnat
Copy link
Author

WitoDelnat commented Sep 14, 2023

I've been using the extension for a while and believe we should even go a step further as the red cross with "needs attention" and thinking icon when loading are still to present.

  • Icon colors should be the same as the rest of status bar (white by default; might be defined by theme color?)
  • Icons on their own are sufficient with good hover text. I would omit text like "needs attention" because text changes cause layout shifts in the status bar which draw unwanted attention.
  • The default logo should maybe be the Monokle logo?
  • Thinking icon when loading/working should just be the default logo; it's expected that extensions work in the background and as a user you should not need to be aware of it.

All of this will lead to a much more sober experience which I think will be beneficial. Monokle should be there when you need it and otherwise get out of your way; this is how all good extensions behave.


edit: installing Monokle will also cause both Monokle & Sarif to appear in the bar which both do the same when you click it (i.e. open the validation pane). An alternative is to not show Monokle by default and Monokle only appears when something is off?

@f1ames f1ames added the enhancement New feature or request label Sep 19, 2023
@f1ames f1ames self-assigned this Sep 19, 2023
@f1ames
Copy link
Contributor

f1ames commented Sep 19, 2023

Looks like custom icons are not supported in status bar (see microsoft/vscode#72244 and https://stackoverflow.com/a/70544972, well, as not part of custom theme).

So either we go with one from default set or just a text. Some proposals:

  1. Large circle
    image

  2. Small circle
    image

  3. Monokle text
    image

  4. M letter
    image

Well, apart from dedicated icon, it's just UTF text so we can use any UTF character there (that's how emojis works now), but I haven't found anything suitable TBH. IMHO Monokle seems to do the job for me, it's simple, doesn't take too much space and you don't have to wonder where is the icon from.

And it seems to match to official UX Guidelines:

image


edit: installing Monokle will also cause both Monokle & Sarif to appear in the bar which both do the same when you click it (i.e. open the validation pane). An alternative is to not show Monokle by default and Monokle only appears when something is off?

On this one, the difference is that both icons when clicked have the same action but Monokle one bring additional information when hovered.

@f1ames
Copy link
Contributor

f1ames commented Sep 19, 2023

Currently, when I open a directory that does not relate to Kubernetes and is not a git repo then I get a subtle error "Monokle: Needs attention" in the status bar at the bottom of VSC.

In my opinion we should completely hide Monokle when the plugin is irrelevant to the end-user. Great plugins are transparent and you don't notice they are there. The only reason for me to get rid of this indicator is to uninstall the plugin - you don't want to give people those kind of idea!

For this I think more static status bar icon does the job, but we also have separate related issue which can improve this further - #38. So even if active folder will not be a git repo it can still be validated with local/default policy.

And going even further, if we want to completely hide Monokle icon, we could detect if project contains any K8s resources. If not just hide all extension related UI. But then it will require a bit smarter approach to restore it when such resources are added. so it's not a quick fix.

@f1ames f1ames mentioned this issue Sep 19, 2023
4 tasks
@WitoDelnat
Copy link
Author

We still need an build-in icon for when Monokle needs attention right? What about the following, it's clear this is Monokle and the small-circle is simply there to prevent layout shifts while it has some recognition to our logo.

const icon = needsAttention ? "warning-icon" : "small-circle"
const label = `${icon} Monokle`

I also had a look at Prettier which might be a decent approach? I like the double checkmark wrt validation

Screen.Recording.2023-09-20.at.10.18.31.mov

Wrt hiding, if its not a quick-fix then let's split that for a separate task and tackle it later. This more sober experience will make that less urgent.

@f1ames
Copy link
Contributor

f1ames commented Sep 20, 2023

Ok, yes, let's have the icon so we can show invalid status. I went with first proposal = circle + warning icons.

As for hiding, I extracted it to separate issue as it is more broader than just hiding an icon, see #44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants