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.
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.
With the change to PF6 the list of items in the table section was not
padded properly, we can fix this by wrapping the code in a `PageSection`
component.
The AWS regions indicator that is currently baked into each row
containing an AWS image is currently off by one due to incorrect
parentheses in the code.
This is now fixed, so it displays '(1)' when there is one region (which
is the default, us-east-1) instead of '(0)' which was both wrong and
confusing.
Since the implementation of the cockpitApi and imageBuilderApi are different,
we should make sure to export the correct one depending on the environment
we are in.
The filtering was defaulting to version '1', making images of other versions not appear when selecting a blueprint.
How to reproduce:
1. create a blueprint
2. build an image
3. edit the blueprint to get it to version 2
4. build another image
Current behaviour:
- only image with version 1 is visible
After fix:
- both image for version 1 and image for version 2 of the blueprint should be visible when the blueprint is selected
Set sane defaults for some types rather than setting them to `undefined`.
This is so that we can set `exactOptionalPropertyTypes` to true in our
tsconfig.
Set the option to generate union undefined types for objects that have
optional items. This will allow us to enable `exactOptionalPropertyTypes`
in our tsconfig [1].
[1] This is a recommended setting, see:
https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes