-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: offer package search suggestions #2410
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davidmundelius
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 13, 2023 07:34
4e37008
to
9b1634c
Compare
mstykow
requested changes
Dec 13, 2023
davidmundelius
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 13, 2023 08:40
9b1634c
to
ea9969e
Compare
mstykow
requested changes
Dec 13, 2023
davidmundelius
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 13, 2023 08:55
ea9969e
to
a394e03
Compare
mstykow
requested changes
Dec 13, 2023
davidmundelius
force-pushed
the
feat-add-package-name-suggestions
branch
2 times, most recently
from
December 13, 2023 10:10
6e0f3e7
to
0c7fbd1
Compare
mstykow
approved these changes
Dec 13, 2023
davidmundelius
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 13, 2023 12:16
0c7fbd1
to
e0ed7b5
Compare
mstykow
requested changes
Dec 13, 2023
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.
Let's wait to merge this until the suggestions feature is complete and usable.
mstykow
force-pushed
the
feat-add-package-name-suggestions
branch
4 times, most recently
from
December 14, 2023 11:49
b69ba7a
to
6fda270
Compare
mstykow
changed the title
feat: load package search suggestions
feat: offer package search suggestions
Dec 14, 2023
mstykow
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 15, 2023 10:45
42824e6
to
05f7610
Compare
mstykow
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 18, 2023 11:24
05f7610
to
9188587
Compare
This was
linked to
issues
Dec 18, 2023
mstykow
changed the title
feat: offer package search suggestions
[STORY] feat: offer package search suggestions
Dec 19, 2023
mstykow
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 19, 2023 18:50
eee63d5
to
c62d951
Compare
mstykow
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 20, 2023 13:15
10e96c0
to
c0f1bc1
Compare
mstykow
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 21, 2023 13:29
35556c3
to
494de72
Compare
- Use react query to load search suggestions from deps.dev - Create faker module for mocking package search hooks - Add ESLint plugin for TanStack Query Signed-off-by: davidmundelius <david.mundelius@tngtech.com>
- do not retry errored queries - load package versions from deps.dev given a name and system and convert them to autocomplete suggestions - sort versions by semantic versioning - display defaults also in attribution view - add possibility to add suffixes to package attribute labels Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
Signed-off-by: davidmundelius <david.mundelius@tngtech.com>
- get URL and license from deps.dev when user adds an attribution via a version suggestion - create "tryit" util to catch errors and convert them to undefined Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
- extend list of common package types - remove golang from list of types that are requiring namespaces because there is debate in the community about this - do not include preferred attributions in autocomplete suggestions because they are meant for a specific resource-attribution combination - add optional group action to autocomplete component Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
- offer namespace suggestions, when relevant, based on package name and type - do not highlight package version and URL in attribution view since they are not essential information when determining legal information (it's rare albeit not impossible that different versions have different licenses) Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
- for packages stored on GitHub or GitLab, extract copyright in addition to license name when loading the license information - use default package version for all further requests if no package version has been provided Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
- offer GitHub and GitLab project tags as version suggestions - GitLab narrows down suggestions by taking current version value as search param while GitHub API has no such feature and thus always returns the latest 100 tags - take latest tag as default version for GitHub and GitLab packages - always re-compute legal and URL to ensure that a new choice of version also updates legal information Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
- remove unnecessary test blocks and setup from setupTests.ts and test suites - add linter rules to ensure that it/test and jest.spyon is correctly used Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
- create generic confirmation dialog with custom handlers for onConfirm and onCancel - make user confirm changes to previously preferred attributions immediately rather than on save Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
- no longer needed since the package autocompletes can fetch licenses more effectively (via the "+" button) Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
mstykow
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 21, 2023 14:39
ce7a45c
to
bf7640c
Compare
- ensure that the autocomplete suggestion "+" button overwrites all previously entered data so that there cannot be confusion about what was and what wasn't replaced by the user's action - make autocomplete suggestion "+" button more visually distinct from the primary suggestion action of just adding the single attribute so that it becomes clearer that there really are two separate actions on the suggestion card - ensure click on entire autocomplete input field opens option popper and not just a click on the underlying HTML input element - catch unhandled errors produced by the PackageURL constructor and instead display "INVALID URL" - do not set a default version when user adopts a suggestion via autocomplete "+" button because the default (latest) version will almost always be the wrong one Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
feat: fine-tune autocomplete suggestions
- add description, homepage, origins from Open Source Insights (deps.dev) to attribution comment when the user selects a suggestion from one of the package comboboxes via the "+" button Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
…into-comment feat: add package description and homepage into comment field Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
mstykow
force-pushed
the
feat-add-package-name-suggestions
branch
from
December 21, 2023 15:09
e72da72
to
8d92f1a
Compare
mstykow
approved these changes
Dec 21, 2023
mstykow
changed the title
[STORY] feat: offer package search suggestions
feat: offer package search suggestions
Dec 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
Context and reason for change
A step toward #2394
How can the changes be tested
Start the app and open the file opossum_input.opossum from the example-files folder.
In Audit View, choose the root folder. In the Network tab of the DevTools, check that there is an entry with name "suggest?q=Vue". Check that the respone for this entry contains the desired search results.