toz/MediLog
9
51
Fork
You've already forked MediLog
3

Bug/Enhancement : Allow for more precise decimal values in weight input #545

Closed
opened 2025年08月01日 13:04:52 +02:00 by Chepycou · 9 comments

The weight input form does not enable the user to input weight beyond a tenth of a kilogram, the format being 000.0. Adding one or two optional digits would be great for smaller children. It would be better perhaps not display these precisions figures in the placeholder but to allow the user to input 3.425 kg for instance.

Best,

The weight input form does not enable the user to input weight beyond a tenth of a kilogram, the format being `000.0`. Adding one or two optional digits would be great for smaller children. It would be better perhaps not display these precisions figures in the placeholder but to allow the user to input 3.425 kg for instance. Best,

Also one great way would be to round to nearest when a value too precise is input. Ex : 3.4242 being rounded to 3.42 or 3.424

Also one great way would be to round to nearest when a value too precise is input. Ex : 3.4242 being rounded to 3.42 or 3.424
Owner
Copy link

The issue I have with this suggestion is that I use thee number of digits to decide if the cursor needs to jump to the next field.
If I was to change the input mask to "000.00" everyone would have to type in 2 digits before the cursor jumps automatically.

Said this, this might work already via custom fields. Means, you could use e.g. the Temperature tab, define the input mask and label to your liking. You'd lose Weight specific features such as body-fat and tare though. Tare may come in handy if this is for really small children which you weigh with the same towel every time?

The issue I have with this suggestion is that I use thee number of digits to decide if the cursor needs to jump to the next field. If I was to change the input mask to "000.00" everyone would have to type in 2 digits before the cursor jumps automatically. Said this, this might work already via custom fields. Means, you could use e.g. the Temperature tab, define the input mask and label to your liking. You'd lose Weight specific features such as body-fat and tare though. Tare may come in handy if this is for really small children which you weigh with the same towel every time?

Then perhaps make this a setting in the weight tabs setting panel ? Something like "Number of decimal digits", set to 1 at start and which could be changed to 2 or 3 if someone is weighting a newborn. It's true that the weight-related features are still very useful for newborns and toddlers

Then perhaps make this a setting in the weight tabs setting panel ? Something like "Number of decimal digits", set to 1 at start and which could be changed to 2 or 3 if someone is weighting a newborn. It's true that the weight-related features are still very useful for newborns and toddlers
Owner
Copy link

Technically possible, not sure how much work it is. I'll have a look...

Technically possible, not sure how much work it is. I'll have a look...

As an alternative thought, leave the number of digits to the right of the decimal alone.

Add grams (other?) to the Unit of measurement scale. 9071.8 grams is more precise then 9.07 kg.

But, if this changes the input mask problem to "0000.0" then... never mind. :)

As an alternative thought, leave the number of digits to the right of the decimal alone. Add grams (other?) to the Unit of measurement scale. 9071.8 grams is more precise then 9.07 kg. But, if this changes the input mask problem to "0000.0" then... never mind. :)

Well in this case you can perhaps have a simple input mode (plain exact one we have now) which always prompts for 000.0 and a collapsed extended input mode which can be switched to in a tap, and which would separate kilograms and grams for instance.

Well in this case you can perhaps have a simple input mode (plain exact one we have now) which always prompts for 000.0 and a collapsed extended input mode which can be switched to in a tap, and which would separate kilograms and grams for instance.
Owner
Copy link

Your request left me wondering if there are any "for people" scales out there which can measure to the precision of one 1 gramm. After discussing this with a user who happens to be a doctor we came to the conclusion that this is mostly smoke and mirrors. Not even in hospitals do they measure newborns down to the gramm. And 10 gramms is likely already messed up by the towel used on two different days.

That said, I was looking into making the Weight tab customizable anyway, means you will be able to change the label and the input mask as you see fit. If I can get this to work with reasonable effort you can use whatever precision you like.

Your request left me wondering if there are any "for people" scales out there which can measure to the precision of one 1 gramm. After discussing this with a user who happens to be a doctor we came to the conclusion that this is mostly smoke and mirrors. Not even in hospitals do they measure newborns down to the gramm. And 10 gramms is likely already messed up by the towel used on two different days. That said, I was looking into making the Weight tab customizable anyway, means you will be able to change the label and the input mask as you see fit. If I can get this to work with reasonable effort you can use whatever precision you like.

Yeah, in the hospitals I've been to they weighted newborns with a 5g precision (and they would tare out the weight of the towel) but the focus was more on the variation rather than a value, especially in the first month, when a 200g variation is quite substantial.

Yeah, in the hospitals I've been to they weighted newborns with a 5g precision (and they would tare out the weight of the towel) but the focus was more on the variation rather than a value, especially in the first month, when a 200g variation is quite substantial.
Owner
Copy link

Check out the current beta, it's very raw and not tested, but you can now set your template in the Weight settings custom section, at the very bottom of the settings.

image

Check out the current beta, it's very raw and not tested, but you can now set your template in the Weight settings custom section, at the very bottom of the settings. ![image](/attachments/78796ac0-e8cd-4f01-ad08-a58f5640bbee)
9.8 KiB
toz added this to the 3.3.4 milestone 2025年08月21日 14:34:13 +02:00
Sign in to join this conversation.
No Branch/Tag specified
main
3.6.0
3.3.8
master
v3.3.2
v3.2.7
v3.2.5
v3.2.1
v3.2.0
v3.1.2
v3.1.0
v3.0.7
v3.0.6
v3.0.5
v3.0.4
v2.7.4
v3.0.3
v3.0.1
v3.0.0
v2.7.3
v2.7.2
v2.7.1
v2.7.0
v2.6.3
v2.6.2
v2.6.0
v2.5.11
v2.5.10
v2.5.9
v2.5.8
v2.5.7
v2.5.6
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.1
v2.5.0
v2.4.8
v2.4.7
v2.4.6
v2.4.5
v2.4.4
v2.4.3
v2.4.2
v2.4.0
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v3.7.1
v3.6.5
v3.6.4
v3.6.3
v3.6.2
v3.6.0
v3.5.1
v3.5.0
v3.4.1
v3.4.0
v3.3.11
v3.3.10
v3.3.9
v3.3.8
v3.3.7
v3.3.6
v3.3.5
v3.3.4
v3.3.3
v3.3.2
v3.2.7
v3.2.6
v3.2.5
v3.2.4
v3.2.3
v3.2.1
v3.2.0
v3.1.2
v3.1.1
v3.1.0
v3.0.7
v3.0.6
v3.0.5
v3.0.4
v3.0.3
v3.0.2
v3.0.1
v3.0.0
v2.7.3
v2.7.2
v2.7.1
v2.7.0
v2.6.3
v2.6.2
v2.6.1
v2.6.0
v2.5.11
v2.5.10
v2.5.9
v2.5.8
v2.5.7
v2.5.6
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.1
v2.5.0
v2.4.8
v2.4.7
v2.4.6
v2.4.5
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v2.3.0
v2.2.5
v2.2.4
v2.2.3
v2.2.1
v2.2.2
v2.2.0
v2.1.2
v2.1.1
v2.1.0
v2.0.6
v2.0.5
v2.0.1
v3.7.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 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
toz/MediLog#545
Reference in a new issue
toz/MediLog
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?