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/BasicDeploymentForm: Number precision issues in SliderParam if sliderStep is set to a floating number #5114

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

Comments

@dionysius
Copy link

dionysius commented Jul 22, 2022

Describe the bug
In a deployment schema, if sliderStep property of a SliderParam is set to a floating point number the displayed slides sometimes show floating precision issues

To Reproduce
Requirements: Have a own chart repository setup with kubeapps.

  1. Make a copy of the chart https://github.com/bitnami/charts/blob/master/bitnami/joomla/
  2. Edit the slider schema to add the property sliderStep and set it to 0.1, e.g. this field: https://github.com/bitnami/charts/blob/master/bitnami/joomla/values.schema.json#L100
  3. Upload the chart to your chart repository
  4. Load your chart in kubeapps
  5. Move the slider of this property and observe the results

Expected behavior
The precision of the resulting input field should always stay 1 floating point, because the sliderStep input was itself as well 1 floating point.

Screenshots
Screenshot_20220722_123739
Screenshot_20220722_123731
Screenshot_20220722_123713
Screenshot_20220722_123653
(I've manipulated the width of the input field to easier display the issue)

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)
@dionysius dionysius added the kind/bug An issue that reports a defect in an existing feature label Jul 22, 2022
@antgamdia
Copy link
Contributor

Thanks for reporting it! We are currently thinking of moving towards an alternative way to render the forms, more focused on a standard json schema. See the milestone: https://github.com/vmware-tanzu/kubeapps/milestone/27

We will probably tackle all the form-related issues at once, when we have enough bandwidth for it. In the meanwhile, we really welcome any PR contributions!

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

3 participants