Commit graph

18 commits

Author SHA1 Message Date
Michal Gold
7391652e17 Wizard: Replace deprecated innerRef with ref in RegionsSelect MenuToggle
Replace `innerRef` prop with standard React `ref` prop in MenuToggle component
2025-08-21 19:42:39 +00:00
regexowl
bb345c0e4f ESLint: All the single quotes 2025-08-05 13:56:59 +00:00
regexowl
eafcd200ae ESLint: Set trailingComma to all and run lint fix 2025-08-05 13:56:59 +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
4312cca4dd src: Run class-name-updater
This runs `npx @patternfly/class-name-updater src --v6 --fix`.
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
96cf08bf4d src: Remove width limiting for Wizard and ImagesTable
This removes `isWidthLimited` prop from Page component in Wizard and ImagesTable.
2025-03-18 14:37:53 -05:00
regexowl
223a6a6780 Wizard: Deprecate Chip and ChipGroup components
`Chip` and `ChipGroup` components will be deprecated in PF6. This replaces them with recommended `Label` and `LabelGroup`.
2025-03-04 08:36:41 +01: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
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
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
mgold1234
b8c634eac0 fix some lint warning message 2023-11-20 09:37:12 +01:00
mgold1234
536312680d fix some react-hooks/exhaustive-deps lint warning message
this commit fixes some react-hooks/exhaustive-deps linting warning message
2023-11-13 10:51:52 +01:00
jkozol
cf1d477544 ShareImageModal: update the typeahead selector to pf5
This dropdown needed to be update as part of the overall pf5 upgrade.
Each of the components in the select now need to be declared and
handled. Also, some of the Select and SelectOption props come from the
Menu props since Select inherits Menu.
2023-10-25 09:02:47 +02:00
jkozol
a5b1b1f775 package.json: upgrade patternfly to version 5
This upgrade requires multiple package updates. There are many style
updates to reflect pf5's syntax and structure changes
2023-10-25 09:02:47 +02:00
lucasgarfield
89f1da11bf API: Move notification dispatch to Image Builder API slice
This commit moves the notification dispatching for creating composes and
clones into a more sensible location – the Image Builder API slice.

It is more sensible because it separates the logic of the React
component (the wizard or share images modal) from the logic of handling
the request life cycle (which is now handled entirely in the slice).

There is a subtle but significant change – a new request will be
dispatched for every request. This is the correct way to do things as it
is possible that some requests succeed, and that others fail. Insights
causes the notifications to stack on top of each other neatly, so there
is no UI problem.

To facilitate this, we also need to use use Promise.allSettled instead
of Promise.all.
2023-10-13 11:44:33 +02:00
lucasgarfield
7b9e726151 ImagesTable: Convert ImagesTable to Typescript & RTK Query
This commit converts the Images Table to Typescript and converts all API
calls to image-builder to use RTK Query hooks.

This should increase the performance of the app significantly.
Previously our calls to the image-builder API were made in series. They
are now made in parallel. We may want to investigate the possibility of
hitting rate limiting now that we will be issuing requests in much more
rapid succession.

In the tests, moving to RTK Query hooks has allowed us to remove
virtually all Jest mocking. However, this means that some of our
previous tests which tested against implementation details were broken.
Most notably, we no longer check the Redux store to verify that clones
have been added correctly and we no longer check that compose requests
were issued successfully. Test coverage will be restored in a follow-up
PR where the dev-dependency @msw/data is added. Adding a persistent data
layer to the tests using @msw/data will allow us to verify that our POST
requests (creating composes and cloning them) are working by testing
that the Images Table has been updated.
2023-09-18 10:35:04 +02:00
Renamed from src/Components/ShareImageModal/RegionsSelect.js (Browse further)