Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Update tray menu #2411

Merged
merged 1 commit into from
May 5, 2021
Merged

Conversation

xtreme-vikram-yadav
Copy link
Contributor

What this PR does / why we need it: This PR adds the following menu items to tray:

'Contexts' (Shows cluster contexts and allows context switching'
'About Octant' (copied from header)
'Open an Issue' (copied from header)
'Octant Documentation' (copied from header).

Tray icon is also updated to greyscale icon.

Which issue(s) this PR fixes

Copy link
Contributor

@mklanjsek mklanjsek left a comment

Choose a reason for hiding this comment

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

Looking good, only version info needs a bit more work.

menu.append(new MenuItem({label: 'View Logs', type: 'normal', click: () => shell.showItemInFolder(errLogPath)}));

menu.append(this.contextSubMenu());
menu.append(this.aboutOctantSubMenu());
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just have About Octant menu item here that opens the same modal as when invoked from header. I feel it's important to have consistent interface, plus the version and build strings look wonky showing up in sub-menus like that.

Copy link
Contributor Author

@xtreme-vikram-yadav xtreme-vikram-yadav May 4, 2021

Choose a reason for hiding this comment

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

What you are asking makes sense. Opening the same modal in the app window may not work well when there is only tray without any open window. I briefly looked into showing a native about panel to show this information but decided to use menu item as not all the provided options are supported across different OSes. But thanks to your comment, I tried it with a work around which shows the info properly. I have updated the implementation, it is not how about panels options are meant to be used but it works for now.
octant-about-native

Signed-off-by: Vikram Yadav <[email protected]>
@mklanjsek mklanjsek merged commit b34959a into vmware-archive:master May 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Mac menu item useful, or remove it
2 participants