[ENHANCEMENT]: Range/Number field using tenths (0.0 to 5.0 step 0.5) #1151

Open
opened 2024-07-27 20:14:52 +00:00 by fdinkler · 5 comments
Member

Enhancement Details

Range and Number fields are restricted to integer steps. I need a field that allows steps of tenths (0.1)

Which part of the extension will be affected by this enhancement?

Compilation of component

Additional Context

No response

### Enhancement Details Range and Number fields are restricted to integer steps. I need a field that allows steps of tenths (0.1) ### Which part of the extension will be affected by this enhancement? Compilation of component ### Additional Context _No response_
fdinkler added the
enhancement
label 2024-07-27 20:14:52 +00:00
Owner

Have you tried hard coding this into your component xml form file?

If your able to get it to work... then give me the updated xml and I will see what I can do to adapt JCB. But if you can't get it to work... then this is a Joomla limitation.

Have you tried hard coding this into your [component xml form](https://git.vdm.dev/joomla/Component-Builder/src/branch/5.x/admin/forms/admin_view.xml) file? If your able to get it to work... then give me the updated xml and I will see what I can do to adapt JCB. But if you can't get it to work... then this is a Joomla limitation.
Author
Member

I'm closing this request.
After examining the NumberField.php file, it appears the min, max and step parameters are captured as float even though the JCB field message states integer.

I'm closing this request. After examining the NumberField.php file, it appears the min, max and step parameters are captured as float even though the JCB field message states integer.
Owner

I am not saying JCB is doing it correctly, and I haven't looked at it recently.

If the Joomla XML form can be configured to handle this, then we can update JCB accordingly. All you need to do is check if Joomla allows this, and if it does, provide the XML that supports this functionality.

The XML form file is generated by JCB, and Joomla then uses this to display the form in the Joomla GUI.

Maybe I am too lazy or something to go read the NumberField documentation, and you could have just given me the answer instead. But now you close this issue and seem unwilling to help me.

You know, often things on my side of the JCB community seem quite grim. I have contributed millions of lines of code, and when I ask for help, people just close the issue as if I am rude and unwilling to assist.

Please note that I am/was smiling and normally very willing to change JCB when it is not aligned with Joomla. I would never claim that it is perfectly aligned. In fact, Joomla is changing faster than JCB, and we often find instances where Joomla has moved on and JCB is behind. This is exactly why I made JCB public in the first place—so that others can find these issues and make me aware of them, allowing me to advance JCB for everyone.

I am not saying JCB is doing it correctly, and I haven't looked at it recently. If the Joomla XML form can be configured to handle this, then we can update JCB accordingly. All you need to do is check if Joomla allows this, and if it does, provide the XML that supports this functionality. The XML form file is generated by JCB, and Joomla then uses this to display the form in the Joomla GUI. Maybe I am too lazy or something to go read the NumberField documentation, and you could have just given me the answer instead. But now you close this issue and seem unwilling to help me. You know, often things on my side of the JCB community seem quite grim. I have contributed millions of lines of code, and when I ask for help, people just close the issue as if I am rude and unwilling to assist. Please note that I am/was smiling and normally very willing to change JCB when it is not aligned with Joomla. I would never claim that it is perfectly aligned. In fact, Joomla is changing faster than JCB, and we often find instances where Joomla has moved on and JCB is behind. This is exactly why I made JCB public in the first place—so that others can find these issues and make me aware of them, allowing me to advance JCB for everyone.
fdinkler reopened this issue 2024-07-27 21:47:20 +00:00
Author
Member

Llewellyn - Sorry, I didn't intend any insult...
I finally achieved a clean Demo compile using 5.0.2-Alpha2 for all three J versions, so I'm resuming the learning curve I abandoned last year.
I'm still largely ignorant of JCB internals, but I'm getting there, so adding to the XML form will require more research on my part to understand what I'm actually doing.
So, I'll the XML for the NumberField using the data from Joomla class and let you know...

Llewellyn - Sorry, I didn't intend any insult... I finally achieved a clean Demo compile using 5.0.2-Alpha2 for all three J versions, so I'm resuming the learning curve I abandoned last year. I'm still largely ignorant of JCB internals, but I'm getting there, so adding to the XML form will require more research on my part to understand what I'm actually doing. So, I'll the XML for the NumberField using the data from Joomla class and let you know...
Owner

Thank you, that means a lot to me!

Check out the latest alpha3 releases; it is much more stable.

Additionally, note that adding a float in JCB might work. Have you tried that? I am not 100% sure, but I think JCB does not modify the values all the way into the XML directly to kind of "model" it. We assume you know what you're doing and usually just move the values you enter directly to the XML. So, give it a try and let me know.

Also, to find the XML of your component, it should be in the same path as that in JCB. That's why I added a link to an XML in JCB in my first reply, just as a reference to where to look in your component.

Thank you, that means a lot to me! Check out the latest [alpha3 releases](https://git.vdm.dev/joomla/pkg-component-builder/tags); it is much more stable. Additionally, note that adding a float in JCB might work. Have you tried that? I am not 100% sure, but I think JCB does not modify the values all the way into the XML directly to kind of "model" it. We assume you know what you're doing and usually just move the values you enter directly to the XML. So, give it a try and let me know. Also, to find the XML of your component, it should be in the same path as that in JCB. That's why I added a link to an XML in JCB in my first reply, just as a reference to where to look in your component.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1151
No description provided.