Commit graph

17 commits

Author SHA1 Message Date
Gianluca Zuccarelli
9a17373234 Hooks: extract auth.getUser to its own hook
This code was being called in multiple places and was causing issues
with the on-prem frontend. Extract the logic to a single hook and only
get the `userData` for the hosted frontend.
2025-08-21 16:12:09 +00:00
regexowl
bb345c0e4f ESLint: All the single quotes 2025-08-05 13:56:59 +00:00
regexowl
327e1cd48f src: Fix useChrome import, update mock, solve some lint warnings
This fixes the way we're importing `useChrome` in some places. The mock was also updated to reflect the changes. This resolves several lint warnings.
2025-08-01 10:03:39 +00:00
regexowl
25a5f140d8 ESLint: Add rule to sort imports alphabetically
The `import/order` rule isn't enough to sort import within a single import group alphabetically.

This adds `sort-imports` rule that handles the sorting within groups.
2025-07-15 16:52:45 +00:00
Gianluca Zuccarelli
e8d46dd716 deps: migrate fec/notifications
The frontend component library decoupled notifications from redux.
Dispatching notifications via the notifications middleware was replaced
by a new `useAddNotifications` hook.

We mostly used the notifications middleware outside of React Components
in our `enhancedImageBuilderApi` store for mutation events. I created a
wrapper around the RTK hooks that uses the `useAddNotification` hook
and created a directory for the new hooks.

In other places, where we were using the notification dispatcher inside
React components, I replaced the call with the new hook.

[1] b1d4973144/packages/notifications/doc/migration.md

bump @redhat-cloud-services/frontend-components-notifications

---
updated-dependencies:
- dependency-name: "@redhat-cloud-services/frontend-components-notifications"
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Co-authored-by: dependabot[bot] <support@github.com>
Assisted-by: cursor ide for generalizing the `useMutationWithNotification`
hook.
2025-07-01 09:17:38 +00:00
regexowl
0597541af2 Manually revert "Fedora-services: add support for fedora env"
This reverts #2984 as Fedora service frontend is not being currently actively maintained.
2025-06-27 14:15:05 +02:00
regexowl
7039db2585 Wizard: Spacing between footer buttons on Review step 2025-05-28 09:08:52 -05:00
regexowl
1fc1f0cb8d src: Run codemods and lint
Run `npx @patternfly/pf-codemods@latest src --v6 --fix` and lint autofix to get the bulk of the changes in.
2025-05-28 09:08:52 -05:00
regexowl
aedbbdc53a src: Remove unused data-testids
This removes unused `data-testid`s from the code base.
2025-05-09 10:14:54 +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
Amir
1d86950f45 Fedora-services: add support for fedora env 2025-04-03 11:50:51 +02:00
Sanne Raymaekers
52a43b0f2d CreateImageWizard: support edit mode on premise
The way the on premise wizard is initialized needed to be tweaked to
make it work for isEdit. Let's assume that the host distro and host
architecture are already correct in the blueprint.
2025-02-05 13:11:14 +01:00
Gianluca Zuccarelli
94f24ce085 store/cockpitApi: add create blueprint mutation 2025-01-28 13:29:21 +01:00
Gianluca Zuccarelli
a3529f9108 CreateImageWizard: ignore org-id for on-prem
We can ignore the org-id when trying to get the state of the
blueprint during the blueprint creation. This is unnecessary
info for `on-prem`
2025-01-28 13:29:21 +01:00
Sanne Raymaekers
0897257125 src/store: Remove server store hooks
Removing the server store makes the way we handle data going in and out
of the wizard state more consistent. Each customisation is mapped into
the wizard state and pulled out when generating the blueprint
payload.

When the services and kernel customisations are implemented, this
information will need to be stored inside of the wizard state anyway.

Lastly this will make implementing a compliance step easier for edit
mode, removing the need to write to the wizard state from within the
server store when only a compliance policy id is available (on the
review page), which would be used to fetch the profile ref id, which
would in turn be used to fetch the customisations not stored in the
wizard state.
2024-09-16 11:45:54 +02:00
regexowl
5d73adfbd6 src: Absolute imports
While running build there was a bunch of PatternFly imports that were resolved as undefined. This adds an absolute path for each of those imports.
2024-08-09 09:22:17 +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
Renamed from src/Components/CreateImageWizardV2/steps/Review/Footer/Footer.tsx (Browse further)