-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove old js components: Spinner, Alert #6554
Remove old js components: Spinner, Alert #6554
Conversation
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]> Conflicts: dashboard/src/components/AppList/AppListItem.tsx dashboard/src/components/AppView/AccessURLTable/AccessURLTable.tsx dashboard/src/components/AppView/AppControls/RollbackButton/RollbackDialog.test.tsx dashboard/src/components/Config/PkgRepoList/PkgRepoList.tsx dashboard/src/components/SearchFilter/SearchFilter.tsx dashboard/src/components/hooks/useOutsideClick/useOutsideClick.test.tsx dashboard/src/components/js/hooks/useOutsideClick/useOutsideClick.test.js
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
✅ Deploy Preview for kubeapps-dev canceled.Built without sensitive environment variables
|
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]> Conflicts: dashboard/src/components/AppView/AppView.tsx dashboard/src/components/Catalog/Catalog.tsx dashboard/src/components/DeploymentForm/DeploymentForm.tsx dashboard/src/components/OperatorInstance/OperatorInstance.tsx dashboard/src/components/OperatorList/OperatorList.tsx dashboard/src/components/OperatorNew/OperatorNew.tsx dashboard/src/components/OperatorView/OperatorView.tsx dashboard/src/components/PackageHeader/PackageView.test.tsx dashboard/src/containers/ConfigLoaderContainer/ConfigLoaderContainer.ts dashboard/src/containers/RoutesContainer/Routes.test.tsx dashboard/src/containers/RoutesContainer/Routes.tsx
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]> Conflicts: dashboard/src/components/AppView/AppView.tsx dashboard/src/components/Catalog/Catalog.tsx dashboard/src/components/ConfigLoader/ConfigLoader.tsx dashboard/src/components/DeploymentForm/DeploymentForm.tsx dashboard/src/components/Header/ContextSelector.test.tsx dashboard/src/components/OperatorInstance/OperatorInstance.tsx dashboard/src/components/OperatorInstanceForm/OperatorInstanceForm.tsx dashboard/src/components/OperatorInstanceUpdateForm/OperatorInstanceUpdateForm.test.tsx dashboard/src/components/OperatorInstanceUpdateForm/OperatorInstanceUpdateForm.tsx dashboard/src/components/OperatorList/OperatorList.tsx dashboard/src/components/OperatorNew/OperatorNew.test.tsx dashboard/src/components/OperatorNew/OperatorNew.tsx dashboard/src/components/OperatorView/OperatorView.test.tsx dashboard/src/components/OperatorView/OperatorView.tsx dashboard/src/components/PackageHeader/PackageView.test.tsx dashboard/src/components/PackageHeader/PackageView.tsx dashboard/src/components/UpgradeForm/UpgradeForm.tsx dashboard/src/components/js/Button/Button.test.js dashboard/src/containers/ConfigLoaderContainer/ConfigLoaderContainer.ts
Signed-off-by: Antonio Gamez Diaz <[email protected]> Conflicts: dashboard/src/components/AppList/AppListGrid.tsx dashboard/src/components/AppUpgrade/AppUpgrade.test.tsx dashboard/src/components/AppUpgrade/AppUpgrade.tsx dashboard/src/components/AppView/AppControls/RollbackButton/RollbackDialog.tsx dashboard/src/components/AppView/AppView.tsx dashboard/src/components/Catalog/Catalog.tsx dashboard/src/components/ConfirmDialog/ConfirmDialog.tsx dashboard/src/components/DeploymentForm/DeploymentForm.tsx dashboard/src/components/Header/ContextSelector.tsx dashboard/src/components/OperatorInstance/OperatorInstance.tsx dashboard/src/components/OperatorInstanceForm/OperatorInstanceForm.tsx dashboard/src/components/OperatorInstanceUpdateForm/OperatorInstanceUpdateForm.tsx dashboard/src/components/OperatorList/OperatorList.tsx dashboard/src/components/OperatorNew/OperatorNew.tsx dashboard/src/components/OperatorView/OperatorView.tsx dashboard/src/components/PackageHeader/PackageReadme.tsx dashboard/src/components/PackageHeader/PackageView.tsx dashboard/src/components/SelectRepoForm/SelectRepoForm.tsx dashboard/src/components/UpgradeForm/UpgradeForm.tsx dashboard/src/components/js/Button/Button.test.js
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Additionally, I have collected all the messages we currently have. I think we should uniformize them at some point ("unable to...", "an error occurred...", "an error occurred while....", "there is a problem..."). Find below the list, but here is a summary of the main occurrences:
Normalized unique instancesAn error occurred while creating the instance: demo message.
An error occurred while creating the operator OPERATOR_NAME: demo message.
An error occurred while creating the repository: demo message.
An error occurred while deleting the repository: demo message.
An error occurred while fetching Operators: demo message.
An error occurred while fetching repositories: demo message.
An error occurred while fetching the ClusterServiceVersion: demo message.
An error occurred while fetching the Operator OPERATOR_NAME: demo message.
An error occurred while fetching the application: demo message.
An error occurred while fetching the catalog: demo message.
An error occurred while fetching the instance: demo message.
An error occurred while fetching the operator OPERATOR_NAME: demo message.
An error occurred while fetching the repository: demo message.
An error occurred while updating the repository: demo message.
An error occurred: demo message.
Found an error updating the instance: demo message.
It's not possible to install a namespaced operator in the "operators" namespace.
Operator OPERATOR_NAME doesn't define a valid channel. This is needed to extract required info.
Resource RESOURCE_NAME not found
The CRD "CRD_NAME" was not found in the definition of "CSV_NAME".
The Operator OPERATOR_NAME doesn't define a valid channel. This is needed to extract required info.
There is a problem with this package: demo message.
Unable to delete the application. Received: demo message.
Unable to fetch the package "PACKAGE_ID (PACKAGE_VERSION)": demo message.
Unable to fetch the package's README: demo message.
Unable to fetch the package: demo message.
Unable to load the Kubeapps configuration: demo message.
Unable to retrieve API info: demo message.
Unable to retrieve the CustomResourceDefinition for RESOURCE_KIND in CSV_METADATA_NAME
Unable to retrieve the current app: demo message.
Unable to retrieve the package: demo message.
demo message
demo message. Raw listDeploy applications on your Kubernetes cluster with a single click.
Unable to retrieve the CustomResourceDefinition for ${resource.kind} in ${csv.metadata.name}
Unable to retrieve the current app: {error.message}.
An error occurred while fetching the application: {error?.message}.
There is a problem with this package: {error["message"]}.
Unable to delete the application. Received: {error["message"]}.
An error occurred: {error["message"]}.
There is a problem with this package: {error["message"]}.
Unable to delete the application. Received: {error["message"]}.
An error occurred: {error["message"]}.
An error occurred while fetching the catalog: {error.message}.
An error occurred while creating the repository: {createError.message}.
An error occurred while updating the repository: {updateError.message}.
An error occurred while deleting the repository: {deleteError.message}.
An error occurred while fetching the repository: {fetchError.message}.
Package Repositories can't be managed from this cluster. <br /> <br /> Currently, the <b> Package Repositories must be managed from the default cluster </b>{" "} (the one on which Kubeapps has been installed). <br /> <br /> Any <i>global</i> Package Repository defined in the default cluster can be later used across any target cluster. <br /> However, <i>namespaced</i> Package Repositories can only be used on the default cluster.
An error occurred while fetching repositories: {errors.fetch.message}.
An error occurred while deleting the repository: {errors.delete.message}.
An error occurred while deleting the repository: {errors.delete.message}.
Unable to load the {kubeappsTitle} configuration: {error?.message}.
There is a problem with this package: {error["message"]}.
Unable to delete the application. Received: {error["message"]}.
An error occurred: {error["message"]}.
Unable to retrieve the package: {(error as FetchError)?.message}.
An error occurred: {error.message}.
Unable to fetch the package "{decodeURIComponent(packageId)} ({packageVersion})":{" "}{error.message}.
An error occurred: {error.error.message}.
An error occurred: {error.message}.
Unable to retrieve API info: {kindsError.message}.
An error occurred while fetching the instance: {errors.fetch.message}.
An error occurred: {error.message}.
The CRD "{crdName}" was not found in the definition of "{csvName}".
An error occurred while fetching the ClusterServiceVersion: {fetchError.message}.
An error occurred while creating the instance: {createError.message}.
{parseError.message}.
Resource {resourceName} not found
An error occurred while fetching the ClusterServiceVersion: {fetchError.message}.
Found an error updating the instance: {updateError.message}.
Operators integration is under heavy development and currently in beta state. If you find an issue, please{" "} <a target="_blank" rel="noopener noreferrer" href="https://github.com/vmware-tanzu/kubeapps/issues/new" > report it here </a> .
An error occurred while fetching Operators: {error.message}.
An error occurred while fetching the operator {operatorName}: {errors.fetch.message}.
An error occurred while creating the operator {operatorName}: {errors.create.message}.
The Operator {operatorName} doesn't define a valid channel. This is needed to extract required info.
It's not possible to install a namespaced operator in the "operators" namespace.
Operator {operator.metadata.name} doesn't define a valid channel. This is needed to extract required info.
An error occurred while fetching the Operator {operatorName}: {error.message}.
Operator {operatorName} doesn't define a valid channel. This is needed to extract required info.
Unable to fetch the package's README: {error}.
Unable to fetch the package: {selectedPackage.error.message}.
An error occurred: {fetchError.message}.
No repositories found. <br /> Manage your repositories in Kubeapps by visiting the{" "} <Link to={url.app.config.pkgrepositories(cluster, namespace)}> Package Repositories configuration </Link>{" "} page.
An error occurred: {packageError.message}.
An error occurred: {error?.message}.
{message} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, this PR is pretty extensive (sorry!)
No problem - thanks for the cleanups! Great to be removing the old non-TS code.
## Description of the change This PR is following up #6554 (and requires it to get merged first). In this final one, the focus is on: - Transform the `Card` and its sub-components to tsx. - Transform the `Table` to tsx - Remove the remaining test snapshots ### Benefits No cool before/after pics this time :P Here we have just migrated js-based code to typescript. However, after this PR we will able to say we finally got rid of the legacy js-components!! ### Possible drawbacks N/A - hopefully. ### Applicable issues Related to #6563 ### Additional information While transforming the `Card` to tsx I also had a look at the `CdsCard` from Clarity. Unfortunately, there is no drop-in replacement; a migration would require plenty of style-related changes. Besides, the "native" style differs a bit from the general style we have in Kubeapps. Below are some examples: <details><summary>Example from the Clarity website</summary> ![image](https://github.com/vmware-tanzu/kubeapps/assets/11535726/c0b783b0-25dd-48ba-b673-abd85fddd830) </details> <details><summary>Quick/dirty replacement, it does not look good</summary> ![image](https://github.com/vmware-tanzu/kubeapps/assets/11535726/34a6c2c5-d5c0-418e-83d3-6143766d4170) </details> <details><summary>Our current custom card</summary> ![image](https://github.com/vmware-tanzu/kubeapps/assets/11535726/4bf0def2-3a8f-4680-bf01-56f3ea390d6a) </details> --------- Signed-off-by: Antonio Gamez Diaz <[email protected]>
Description of the change
This PR is following up #6550 (and requires it to get merged first). In this one, the focus is on:
Spinner
old js component in favor ofCdsProgressCircle
.Alert
with theAlertGroup
component we already had. It is just a wrapper with some handy configuration of the clarity components.<button>
(we weren't able to back in time due to an upstream bug).Again, this PR is pretty extensive (sorry!)
Benefits
Again, let me show some visual examples :) (the error messages like "error.message" are just placeholders while developing, they are removed in the PR).
Initial emptyKubeapps alert
Typical error alert
Error with action (in accordance with the clarity guidelines)
Error with action (another example)
New update available
Operators warning
General error (note the proper margins now)
Repos in !kubeappsCluster
Add repo error
Error in a modal (note the margins again)
Possible drawbacks
N/A (hope any!)
Applicable issues
Related to #6563
Additional information
After this PR there are just two remaining js components:
Table
andCard
. I will work on them soon!