-
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
Add search icons to CriticalLicensesTable
in ProjectStatisticsPopup
#1997
Add search icons to CriticalLicensesTable
in ProjectStatisticsPopup
#1997
Conversation
@@ -73,6 +74,10 @@ interface LabelDetailIconProps extends IconProps { | |||
disabled?: boolean; | |||
} | |||
|
|||
interface SearchLicenseIconProps extends IconProps { |
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.
We typically call it "locate". I.e. LocateLicense...
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.
I renamed everything according to LocatorPopup
. In particular, it is searching for attributions
(see button label). I guess to keep everything as generic as possible (one could think about searching for attributions via licenses and other properties).
}; | ||
const buttonIsEnabled = Boolean(totalNumberOfAttributions); | ||
const tooltipTitle = buttonIsEnabled | ||
? `search for "${licenseName}" in resource browser` |
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's not a "search" but a "locate" in our terms
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.
and I am not sure that every user knows what resource browser is. I propose something like: "locate resources with 'some license' "
Maybe it would be more consistent to use the "locate" icon instead of the search icon |
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.
src/Frontend/Components/CriticalLicensesTable/CriticalLicensesTable.tsx
Outdated
Show resolved
Hide resolved
src/Frontend/Components/CriticalLicensesTable/CriticalLicensesTable.tsx
Outdated
Show resolved
Hide resolved
}; | ||
const buttonIsEnabled = Boolean(totalNumberOfAttributions); | ||
const tooltipTitle = buttonIsEnabled | ||
? `search for "${licenseName}" in resource browser` |
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.
and I am not sure that every user knows what resource browser is. I propose something like: "locate resources with 'some license' "
b8d93ff
to
210eb34
Compare
210eb34
to
eb13c51
Compare
eb13c51
to
68a74e6
Compare
@@ -19,6 +19,12 @@ import { LicenseNamesWithCriticality } from '../../types/types'; | |||
|
|||
const PLACEHOLDER_ATTRIBUTION_COUNT = '-'; | |||
|
|||
const classes = { | |||
rowNameWithIconButton: { | |||
marginRight: '8px', |
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.
I'd attach the margin to the button instead. The butten itself should take care of it.
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.
just minor comment
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.
Just a minor thing about naming:
do we locate attributions or resources?
}; | ||
return ( | ||
<IconButton | ||
tooltipTitle={`locate attributions with "${licenseName}"`} |
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.
why attributions? should it be resources?
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.
I, personally, would argue that it is signals that we are locating.
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.
To my understanding, we locate attributions (license is a property of an attribution). As attributions are attached to resources, we locate resources at the same time. It's correct that the visual hints (arrows) point to resources, but I see that as some kind of incompleteness of the location approach we employ. Ideally, we would mark the located attributions, not only the resources. But that would be overkill as the user can easily identify the attribution of interest given the correct resource. Regarding the tooltip, a correct title would be something like 'locate resources that have attributions with attached'. But I don't like that.
The new search icons allow for searching licenses in the `ResourceBrowser` according to the functionality of the `LocatorPopup`. This commit only adds the icons. The logic is implemented in an upcoming PR. Fix: opossum-tool#1984 Signed-off-by: Lennart Holstein <lennart.holstein@tngtech.com>
68a74e6
to
64e452b
Compare
Summary of changes
This commit adds icons for searching licenses to the
CriticalLicensesTable
inProjectStatisticsPopup
. The logic is implemented in an upcoming PR.Context and reason for change
We want the user to be able to search for resources with specific licenses via the
ProjectStatisticsPopup
. The new search icons allow for searching licenses in theResourceBrowser
according to the functionality of theLocatorPopup
.How can the changes be tested
Automatic testing:
Run
ProjectStatisticsPopup.test.tsx
.Manual testing:
Load test file, open
ProjectStatisticsPopup
, and hover over the icons in the third column of theCriticalLicensesTable
.Fix: #1984