This adds application stream column to the packages table and populates it with `pkg.package_sources.stream` value or 'N/A' if the result is a single package or a group.
The placeholders we tend to use are usually quite specific. "Type to search" felt quite vague for some reason. Also repositories had no placeholder, I believe "filter" is clearer than "search" here as we're not fetching any results, just filtering through the already existing list of repositories.
As a small simplification and also to make the UX more consistent, let's
use a SearchInput widget over the custom InputGroup structure.
The only aspect lost in the process is the `validation` property that
doesn't exist in the SearchInput widget. It however only affects the CSS
styling of the searchbox and renders the 'error' state when there's only
a single character in the box. This may not even be desirable, given
that it's not really an error and that we show a note right below the
input box about this anyway.
This means the search boxes will also be consistent between the
repository and package search pages.
Fixes#3133
Currently, when a search term is entered and then reduced to a single
character in the Wizard's packages step, the previous results are still
shown.
What is expected is that the empty state hinting at the search term
being too short would be shown.
The condition in bodyContent was wrong, because it assumed that the list
of results would be 0 when in fact it wasn't being cleared.
Fixes#3139
This removes sorting on the frontend side where it's already handled by the content sources API.
Since we manipulate selected packages by joining the, with `currentlyRemovedPackages` list, the sorting is added there to keep the packages from jumping around when unselected.
Modify the logic of removing a package so that it remains in the selected table for possible
re-addition until another package is removed or the wizard is switched to another screen
Searching for groups isn't possible sadly, as the search works slightly
differently than content sources. Replace the alert with an alert on how
to use globbing.
Add initial package search. Include the version, release & arch information
in the summary, since some packages might have a release with the specific
architecture and a `noarch` version.
We were making a call to a dead endpoint to get the architectures.
Instead, create a custom query function to return the list of architectures
and image types.
Previously the Wizard crashed when looking for recommendations for packages that had none.
How to reproduce the crash:
- go to the Packages step
- search for and select `tmux` package
After fix:
- when selecting a `tmux` package or any other package without recommendations, the recommendations stay empty, but the Wizard doesn't crash
This update the way recommended packages' descriptions are fetched.
contentSources API was updated to accept an array of packages as a searchRpm argument, meaning we can now send a request to fetch all package descriptions at once.
The repos toggle height was slightly bigger than the Available/Selected toggle. This was caused by the popover button. Changes its size to small to fix the issue.
Previously when you searched for package from repositories recommendations and switched to "Other repos", new search left you in Other repos and didn't show results even if they were found in "Included". Since we search for recommendations only when no matches were found in distro and custom repos, the results will be always empty.
This solves the problem by defaulting to "Included repos" toggle with every new search, limiting clicks required from the user.
How to reproduce previous behaviour:
1. search for 'gnuplot' packages
2. no results should be found, switch to "Other repos"
3. search for a distro/custom repo package like "vim"
Previous behaviour - the "Other repos" toggle is still selected, showing no results. When switching to "Included repos" manually, the results can be found there.
New behaviour - "Included repos" gets automatically selected, showing results for packages found in distro and custom repos.
This updates snippets used for event tracking in Amplitude, adding `imageBuilder` to the name of the event and as a `module` property.
Two more typed events were also added to track number of created blueprints. Name for both events is the same `blueprintCreated`, the differentiation between Create and Create and build images is captured in the `type` property.
These new events will allow to calculate percentage of users that were shown recommendations and of those who added a recommended package while succesfully finishing blueprint creation.
This adds a code snippet to track package recommendations via Amplitude.
Tests were failing without default mock for `analytics.track()` value used to track package recommendations.
When a package got selected and deselected again, landing on 0 for selected packages, the information shown in the package recommendations was "Select packages to generate recommendations.No recommendations found for the set of selected packages", this updates the logic to separate the messages.