-
Notifications
You must be signed in to change notification settings - Fork 28
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
Open locator popup with shortcut #1951
Open locator popup with shortcut #1951
Conversation
src/ElectronBackend/main/menu.ts
Outdated
icon: nativeTheme?.shouldUseDarkColors | ||
? path.join( | ||
getBasePathOfAssets(), | ||
'icons/location-searching-white.png', | ||
) | ||
: path.join( | ||
getBasePathOfAssets(), | ||
'icons/location-searching-black.png', | ||
), |
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.
It seems this code is repeated a lot. Might be nice to rafactor it such that it takes two file names and returns the icon that fits the theme.
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.
Good idea, I extracted a method for this.
The commit message should contain the issue number and a description what was done. Would be nice if you could add that. |
The popup to locate signals can now be opened via shortcut Ctrl+L/Cmd+L or via the top bar if an Opossum file is opened. This commit also includes a small refactoring which extracts a method to choose the correct icon based on the theme (dark or light) used. Issue: opossum-tool#1947 Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
d749fd1
to
ddee116
Compare
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.
👍
Summary of changes
With this PR the previously introduced popup to locate signals can be openend via the shortcut Ctrl+L or Cmd+L or via the Top bar. I also added a new icon for this functionality.
Context and reason for change
We want to imlement a new feature to be able to locate signals based on criticality and certain licenses.
How can the changes be tested
Run the unittests.

Check out the PR and start OpossumUI. If you don't open a file the shortcut Ctrl+L or Cmd+L and will do nothing. But you will see the option "Locate Signals" in the top bar menu as in the screenshot below.
Next, open a file and use Ctrl+L or Cmd+L and observe that the popup shows up as in the screenshot below.

Solves #1947.