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.
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.
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.