From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 6436D1FF13B for ; Wed, 25 Mar 2026 13:09:17 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B84AA1686A; Wed, 25 Mar 2026 13:09:38 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 25 Mar 2026 13:09:34 +0100 Message-Id: Subject: Re: [RFC PATCH yew-widget-toolkit 1/2] widget: form: number: round floats to nearest step value From: "Christoph Heiss" To: "Dominik Csapak" X-Mailer: aerc 0.21.0 References: <20260319170432.1533393-1-c.heiss@proxmox.com> <20260319170432.1533393-2-c.heiss@proxmox.com> <57e99cba-a8c3-4ff4-ba49-87352877ad64@proxmox.com> In-Reply-To: <57e99cba-a8c3-4ff4-ba49-87352877ad64@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774440527368 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.054 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: FDZRU5CFQJRYZDQZWSWIFJKYQXYLPJIP X-Message-ID-Hash: FDZRU5CFQJRYZDQZWSWIFJKYQXYLPJIP X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: yew-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Yew framework devel list at Proxmox List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Thanks for taking a look! On Mon Mar 23, 2026 at 9:51 AM CET, Dominik Csapak wrote: > my first instinct would have been to simply change the formatting to > round to some value of precision but you're right that it's just masking > the symptom. > > but I think this patch is also missing some parts. I think > ideally we want to have a 'decimalPrecision' property that controls > the value also on setting/reading, change event etc. > (like it exists in ExtJS) > > that should by default use a sensible value (like you did here > with 100_000 it can be just '5') > > what do you think? Yeah, I was thinking about that too briefly. Would be bit more effort, but sure, definitely makes sense! I'll spin a v2 with that, mostly wanted to get some early feedback with this patch, whether the overall approach of this fix is acceptable.