Skip to content
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

Dashboard/React: "restore defaults" button does not reset BasicDeploymentForm input fields #5025

Closed
dionysius opened this issue Jul 5, 2022 · 4 comments · Fixed by #5412
Closed
Labels
component/ui Issue related to kubeapps UI good first issue kind/bug An issue that reports a defect in an existing feature

Comments

@dionysius
Copy link

dionysius commented Jul 5, 2022

Describe the bug
When using the "restore defaults" button in a helm chart deployment page the input fields don't get reset. The sliders and checkboxes (at least those who hide other fields) do get reset. The Changes Tab are getting correctly reset though, unsure about the YAML tab - needs checking as well. Same behavior in Brave and Firefox.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Catalog
  2. Select any Helm Chart to deploy (which offers the BasicForm, e.g. Joomla!)
  3. Click Deploy
  4. Fill out some form fields including sliders and checkboxes
  5. See that in the Changes Tab the changes are listed
  6. Go back to the Form Tab
  7. Click "Reset defaults" button

Expected behavior
The form is reset as if I would refresh the page with Ctrl+R.

Actual behavior
The form is only partly reset. Sliders and checkboxes seem to correctly reset, but all text or password fields keep the input data, while the Changes tab doesn't list any.

Screenshots

Preparation:
Screenshot_20220705_153621

After Pressing "Reset defaults":
Screenshot_20220705_153648
Screenshot_20220705_153655

Desktop (please complete the following information):

  • Kubeapps version:
$ helm list -A
NAME    	NAMESPACE	REVISION	UPDATED                                 	STATUS  	CHART         	APP VERSION
kubeapps	kubeapps 	1       	2022-07-05 15:21:49.695211917 +0200 CEST	deployed	kubeapps-9.0.3	2.4.6      
  • Kubernetes version:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.7", GitCommit:"42c05a547468804b2053ecf60a3bd15560362fc2", GitTreeState:"clean", BuildDate:"2022-05-24T12:30:55Z", GoVersion:"go1.17.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.8+k3s1", GitCommit:"53f2d4e7d80c09a7db1858e3f4e7ddfa13256c45", GitTreeState:"clean", BuildDate:"2022-06-27T21:48:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}
  • Browser versions:
$ dpkg -l | grep -E "(brave-browser|firefox-esr)"
ii  brave-browser                                               1.40.107                           amd64        The web browser from Brave
ii  firefox-esr                                                 91.11.0esr-1~deb11u1               amd64        Mozilla Firefox web browser - Extended Support Release (ESR)

Additional context
This problem persists already for a while (6+ months or so), before opening the issue I upgraded kubeapps to latest chart version and I don't know my previous version anymore.

@dionysius dionysius added the kind/bug An issue that reports a defect in an existing feature label Jul 5, 2022
@kubeapps-bot kubeapps-bot moved this to 🗂 Backlog in Kubeapps Jul 5, 2022
@dionysius dionysius changed the title Dashboard/React: "Reset defaults" button does not reset BasicDeploymentForm input fields Dashboard/React: "restore defaults" button does not reset BasicDeploymentForm input fields Jul 5, 2022
@dionysius
Copy link
Author

The PR for this feature #1277 does show that a "Hostname" field gets reset (We don't see the full form though)

@antgamdia
Copy link
Contributor

Thanks for reporting it! We'll take a look to confirm it soon.
However, we have other similar issues that we'll try to tackle at once when we finish the new UI for managing different repositories.
Of course, if you want to take a closer look at the issue, please feel free to contribute and send a PR!

@antgamdia antgamdia added the next-iteration Issues to be discussed in planning session label Jul 5, 2022
@antgamdia antgamdia added this to the Form refactor milestone Jul 5, 2022
@dionysius
Copy link
Author

Would be a good start if someone could confirm this behavior or if it is an issue of my browser or kubeapps installation

@antgamdia antgamdia added the component/ui Issue related to kubeapps UI label Jul 13, 2022
@antgamdia
Copy link
Contributor

@dionysius, I've got some time to have a look at it. I can confirm what you discovered, something is wrong with the update of the input fields. Thanks for reporting it.

I have dug into the code and found a workaround, but I haven't checked whether there are unexpected side effects yet.

In

if you replace this onChange with handleBasicFormParamChange(param) the param gets reset on each "reset default" action.

It'd be great if you could give it a try, test it and send a PR! Thanks!!

@ppbaena ppbaena moved this from 🗂 Backlog to 🗒 Todo in Kubeapps Jul 15, 2022
@ppbaena ppbaena added good first issue next-iteration Issues to be discussed in planning session and removed next-iteration Issues to be discussed in planning session labels Jul 25, 2022
@beni0888 beni0888 moved this from 🗒 Todo to 🏗 In Progress in Kubeapps Aug 5, 2022
@beni0888 beni0888 self-assigned this Aug 5, 2022
@ppbaena ppbaena moved this from 🏗 In Progress to 🗒 Todo in Kubeapps Aug 26, 2022
@ppbaena ppbaena assigned antgamdia and unassigned beni0888 and antgamdia Aug 29, 2022
@ppbaena ppbaena moved this from 🗒 Todo to 🗂 Backlog in Kubeapps Aug 29, 2022
Repository owner moved this from 🗂 Backlog to ✅ Done in Kubeapps Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ui Issue related to kubeapps UI good first issue kind/bug An issue that reports a defect in an existing feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants