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

Add support for float, decimal and double numbers in parameter control #50

Open
cezar06 opened this issue Jul 1, 2024 · 4 comments
Open

Comments

@cezar06
Copy link

cezar06 commented Jul 1, 2024

Currently, the parameter control for numbers only supports integers.

Feature request: Modify/Add parameter control to support float, decimal and double values in addition to integers.

@cezar06 cezar06 changed the title Add support for decimal and double numbers in parameter control Add support for float, decimal and double numbers in parameter control Jul 2, 2024
@jsakamoto jsakamoto moved this to Todo in Blazing Story Aug 7, 2024
@jsakamoto jsakamoto moved this from Todo to In Progress in Blazing Story Aug 8, 2024
@jsakamoto
Copy link
Owner

jsakamoto commented Aug 8, 2024

Todo list

  • When users click the "Set number" button, it is always initialized by default(int) even though the parameter type is not int. (35e5ca7)
  • When users type a number text into the number input box with decimal points, the input box shows a validation error. (The step attribute must be set appropriately.) (009fb9d)
  • When users switch to the null on the nullable number input box, and the input box is empty, the input box shows a validation error. (It must be removed the require attribute when the null radio button is selected.) (96f8d81)

@jsakamoto
Copy link
Owner

Hi @cezar06
Thank you for your feedback!

Today, I released a new version of the "Blazing Story", v.1.0.0 Preview 40, which added support for all numeric types for parameter controls.

Could you try it out?
Thanks!

@cezar06
Copy link
Author

cezar06 commented Sep 17, 2024

Hello @jsakamoto
The update works fine, thanks :)
As a small observation, when using the little arrows on the right to change the number, it behaves like this:
56.959 -> 56.96 -> 56.97 -> 56.98 -> 56.99 -> 57

I expected it to behave like this:
56.959 -> 56.96 -> 56.961 -> 56.962 -> 56.963 -> .... -> 56.97 -> 56.971 -> 56.972 -> ... -> 56.98

If the first way is the intended way, then it's all good. If not, maybe you could consider a fix.
Anyway, thank you for the support

jsakamoto added a commit that referenced this issue Sep 27, 2024
@jsakamoto
Copy link
Owner

Hi @cezar06,
Thank you for your feedback.
Actually, I knew the numeric input control's behavior was not smart, but I could not improve it at that time.

However, I finally improved it to be the same as the behavior you expected. Could you try the latest version of the "Blazing Story"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Wait for response
Development

No branches or pull requests

2 participants