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

Update missing color in Connect, reorder More Options menu items #24593

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions web/packages/teleterm/src/ui/TopBar/MoreOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ function useMenuItems(): MenuItem[] {
const isSearchBarEnabled = configService.get('feature.searchBar').value;

const menuItems: MenuItem[] = [
{
title: 'Open new terminal',
isVisible: isSearchBarEnabled,
Icon: icons.Terminal,
keyboardShortcutAction: 'newTerminalTab',
onNavigate: openTerminalTab,
},
Comment on lines +67 to +73
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about adding a separator between 'Open new terminal' and 'Open config file'?
It seems to me that 'Open config file', 'Install tsh in PATH' and 'Remove tsh from PATH' can be considered as a logical group.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure about it, how does opening a config file relate to installing tsh in PATH? If anything, opening a new terminal could be grouped with the two tsh items. But then we'd also have to make the separator not show up on platforms other than macOS since they don't have those extra tsh items.

Copy link
Contributor

Choose a reason for hiding this comment

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

how does opening a config file relate to installing tsh in PATH?

I think about it as config-related stuff, 'Open config file' configures Connect, installing tsh in PATH configures your OS. But it is just an idea, I'm fine with merging it as is.

{
title: 'Open config file',
isVisible: true,
Expand All @@ -73,13 +80,6 @@ function useMenuItems(): MenuItem[] {
notificationsService.notifyInfo(`Opened the config file at ${path}.`);
},
},
{
title: 'Open new terminal',
isVisible: isSearchBarEnabled,
Icon: icons.Terminal,
keyboardShortcutAction: 'newTerminalTab',
onNavigate: openTerminalTab,
},
{
title: 'Install tsh in PATH',
isVisible: isSearchBarEnabled && isDarwin,
Expand Down Expand Up @@ -222,7 +222,7 @@ function MenuItem({
padding: ${props => props.theme.space[1]}px
${props => props.theme.space[1]}px;
`}
bg="primary.main"
bg="levels.surfaceSecondary"
>
{getAccelerator(item.keyboardShortcutAction)}
</Text>
Expand Down