This reverts an update of:
- `@data-driven-forms/pf4-component-mapper`
- `@data-driven-forms/react-form-renderer`
from version 3.20.8 to version 3.20.5.
The reason being a bug ending up in an "Node.removeChild: The node to be removed is not a child of this node"
Steps to reproduce the bug:
1. Open Image Wizard with a Create image button
2. Close the Wizard with Cancel button
3. Repeat two or three times
Also can be reproduced with:
1. Click on Kebab in the image row of the Images Table
2. Choose Recreate image
3. Close the Wizard with Cancel button
This commit adds types for the APIs that we currently query using RTK
Query. The OpenAPI schema were converted to Typescript types using the
openapi-typescript package: https://www.npmjs.com/package/openapi-typescript
In the future, we would like to add a script to a /tools directory that
will automatically generate the types from the schema. That isn't
possible now because the OpenAPI schema on consoledot require
authorization to acccess, but exposing them without auth is on the
roadmap and once that is complete we will add a script to automate the
process of generating these types.
This commit adds the initial setup for using Typescript in our project.
The tsconfig.json is very minimal at this point, we will introduce
stricter rules as our Typescript migration progresses.
Unleash is being used to determine whether or not to use the Launch
wizard for Azure and GCP images. Unleash is not yet supported in our
ephemeral environments, but we want our ephemeral environments to have
parity with beta. This commit ensures that the Launch wizard opens for
Azure and GCP images in ephemeral.
Related to HMS-1886: Clicking the recreate button on a build with a lot
of packages results in the user being rate limited.
Package summaries are obtained by querying the Content Sources API. A
large number of packages requires a large number of requests and leads
to the rate limiting problem when using the 'Recreate image' function.
This commit fixes the problem by not requesting or displaying package
summaries when 'Recreate image' is used. (Note that newly added packages
will still request and display a summary.)
The 'Recreate image' function will soon be replaced by
blueprints. This hotfix should carry us forward until then.
This commit integrates Mock Service Worker into the browser. This will
allow us to use MSW to mock network requests at the API level from a
browser using the same MSW fixtures that we are currently using for our
testing. This means we will be able to have the same environment for
debugging, development, and testing if desired.
To develop using MSW, the developer will now use `npm run
stage-beta:msw`. The dev server will start as normal, but now any
request made that has a corresponding fixture will be intercepted and
the fixture used to generate the response.
This adds an MSW=TRUE environment variable to the run script. When this
environment variable is present, the dev webpack config will copy
mockServiceWorker.js into the build directory (/dist) using CopyPlugin
and will add some necessary headers to the dev server's responses using
DefinePlugin.
This commit removes the base URL from the MSW handlers. This is
necessary in order for MSW to integrate into the browser (future commit)
and does not adversely affect the current test integration with MSW.
By using the standard HTML property name, PF4 considered the Radio
uncontrolled. This causes warnings in the console.
By using the correct property names, PF4 correctly considers the
component controlled.
If an image does not contain a subscription_id property, the link to
view the image in Azure will be malformed. This happens when a user
creates an Azure image in beta/preview using sources, and then clicks
the 'View uploaded image' link in stable.
Now, if an Azure image was created using sources (as evidenced by presence
of a source_id in request's upload options), the Launch button appears
and its popover has a link to Preview.
If an image does not contain a share_with_accounts property, launch
links do not appear in the launch popover. This happens when a user
creates an AWS image in beta/preview, and then clicks Launch in stable.
A message is now displayed that explains the image was created using
Preview features, and the link to Preview has been clarified to be more
explicit.
This disables sharing to new regions in case of failed build of the parent image.
The regions that always end in failure were also disabled in the `ShareImageModal`.
This makes the wizard feel much 'faster' for a better user experience.
The implementation uses RTK Query for prefetching. For most API
requests, prefetching is done when the 'next' button is hovered over on
the previous step.
This adds a temporary value of current date to `created_at` for newly created images.
This is not the most elegant solution and will be reworked after the ImagesTable refactor.