Commit graph

39 commits

Author SHA1 Message Date
regexowl
b2d63b3b16 Wizard: Handle expand based on complete pkg info
Expanding rows can no longer be handled based on name only as different application streams share a name of a package.
2025-04-30 17:01:36 +02:00
regexowl
524fd40673 Wizard: Spread modules into row and handle adding/removing from the store
This adds `enabled_modules` to the store schema and handles adding/removing modules to both list of packages and list of enabled_modules.
2025-04-30 17:01:36 +02:00
regexowl
2055f3b393 Wizard: Add application stream column
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.
2025-04-30 17:01:36 +02:00
Katarina Sieklova
97db8c0a12 Wizard: edit naming of analytics traces for consistency 2025-04-29 17:13:20 +02:00
regexowl
318d67c3c4 Wizard: Update search input placeholders
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.
2025-04-25 13:13:31 +02:00
regexowl
e6b030ea4c src: Remove ouia-ids
Since we're moving away from IQE the `ouia-id` atributes should be no longer needed. This removes them from the entire code base.
2025-04-25 11:32:43 +02:00
Simon Steinbeiss
c7dd274298 Wizard: Use SearchInput component for packages
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
2025-04-25 11:06:49 +02:00
Simon Steinbeiss
a1c32f90bb Wizard: Fix 'too short' state in Packages step
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
2025-04-24 15:53:02 +02:00
regexowl
83e57baa0b src: Remove pkgRecs flag
Package recommendations are fully deployed to both stage and production. We can remove the flag from the codebase.
2025-04-23 15:23:52 +02:00
regexowl
457d423d83 Wizard: Remove "Support" column
This removes "Support" column as per recent mocks.
2025-04-17 12:45:00 -05:00
regexowl
7f3d4efb6a Wizard: Add expandable rows
This makes the rows of packages table expandable and moves description down the level from a column to the expandable content.
2025-04-17 12:45:00 -05:00
regexowl
14590c1c41 Wizard: Minor changes
Render selected package count only when higher than 0. Rename "Package name" column to just "Name".
2025-04-17 12:45:00 -05:00
regexowl
ad2d5d8e2b Wizard: Replace toggle with tabs
This replaces the previously used "Included/Other repos" toggle with tabs with the same functionality.
2025-04-17 12:45:00 -05:00
regexowl
fbc0ea13e6 Wizard: Sort only selected on the frontend side
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.
2025-03-13 16:18:41 +01:00
regexowl
ff80aea171 Wizard: Remove "Too many results" state
This removes the "Too many results" state that was rendered when a search term returned more than 100 results.
2025-03-13 16:18:41 +01:00
Dominik Vagner
048baffc3f Wizard: add support of upload custom repositories 2025-03-13 08:57:56 +01:00
Adam Kankovsky
7aa3a3a6d5 Wizard: Edit to keep the last removed package among the selected ones
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
2025-03-06 14:47:31 +01:00
dependabot[bot]
35bb95438b Wizard: Switch view to "Available" when searching for package
this fix an issue when user search for a package, the viewv stay "Selected"
instead of switching to "Available

fix one test
2025-02-24 12:00:31 +01:00
Sanne Raymaekers
fea03a8c72 CreateImageWizard: hide package group alert in cockpit plugin
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.
2025-02-04 10:22:19 +01:00
Gianluca Zuccarelli
eac03ddc7d store/cockpit: add package search
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.
2025-02-03 13:40:30 +01:00
Gianluca Zuccarelli
5988c42b6f store/cockpitApi: getArchitectures endpoint
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.
2025-01-27 17:03:06 +01:00
Gianluca Zuccarelli
aef3f4a3e4 multi: on-prem can't use the unleash flag
Switch the useFlag usage to the stub function defined in the
`useGetEnvironment` utility
2025-01-27 17:03:06 +01:00
Lucas Garfield
3d75b5b5ee Utilities: Extract sorting function
Extracts the function used to sort packages as a utility function so it
can be reused for sorting locales as well.
2024-12-06 16:58:06 -06:00
Gianluca Zuccarelli
0d4bb26e0f multiple: check when var is possibly undefined
In cases where a field on an object might be undefined,
rather omit the value than set the field to undefined.
2024-12-06 12:02:34 -06:00
regexowl
b16243f68a Wizard: Conditionally hide package recommendations
This shows package recommendations only when RHEL 8 or RHEL 9 are selected as a distribution.
2024-12-04 10:51:39 -06:00
regexowl
d8bb3485d8 Wizard: Add v5 PF slug to classNames
This adds v5 PF slug to classNames throughout the code base, making the formatting work properly.
2024-11-25 16:54:59 +01:00
regexowl
dc9ba5121f Wizard: Fix package recommendations
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
2024-11-20 11:43:02 +01:00
regexowl
54f482bddc Wizard: Update description fetching for recommended packages
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.
2024-11-19 18:44:49 -06:00
regexowl
d46f6b83ac Wizard: Fix repos toggle height
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.
2024-10-08 16:44:36 +03:00
regexowl
f33a050120 Wizard: Default to Included repos in package search
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.
2024-10-08 12:39:12 +03:00
regexowl
39d2f91f03 Wizard: Add isPreview property to analytics tracking
This adds `isPreview` property to the analytics tracking with the use of chrome's `isBeta()`.
2024-09-18 12:47:22 +02:00
Anna Vítová
c385417e93 HMS-4459: Use export endpoint 2024-09-04 17:45:11 +02:00
regexowl
be8a00d186 Wizard: Update Amplitude tracking
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.
2024-08-27 12:45:19 +02:00
Andrew Dewar
be95cd9dc0 Fixes 4426: Confirm Image builder is using origin 2024-08-16 10:26:40 +02:00
regexowl
c1049b32ad Wizard: Add analytics tracking for package recommendations
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.
2024-08-15 12:31:06 +03:00
regexowl
79d54eed7b Wizard: Fix information rendered in 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.
2024-08-08 12:50:56 +02:00
regexowl
933e65d590 Wizard: Update docs after move to new preview
`/preview` is no longer used in url.
2024-08-05 13:54:13 +02:00
regexowl
b0725c054e Wizard: Replace isBeta() with conditional flag
This replaces `isBeta()` with a constraint added to the 'image-builder.pkgrecs.enabled' unleash flag.
2024-08-01 13:17:59 +02:00
regexowl
4fb37c187e src: Rename "V2" folders to just Wizard
This replaces all occurences of "CreateImageWizardV2" with just "CreateImageWizard" as it is the only version now.
2024-07-17 11:17:06 +02:00