-
-
Notifications
You must be signed in to change notification settings - Fork 68
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 option to hide negligible decimal digits in display #203
Comments
Just saw that "Hide negligible decimal digits" is similar functionality but only for input. Of course this should be separate options. |
Hi, I'm glad you like my plugin. Your issue seems to be a duplicate of #186, isn't it? |
Hi @dm4t2, thank you for your quick reply! So it would be cool if we could keep on discussing that feature as an addition and perhaps you could reopen this issue as feature request? If it's not clear enough what I'm talking about and what's the benefit and use-case, tell me and I'll give my best to explain it more in detail. Thanks a lot! :) |
Sounds good to me. I would introduce a new boolean option |
Happy to hear that! :) I'm still thinking about two things, but am not sure yet, what's the perfect fit:
But I'm not sure yet... |
Also thought about it and I'm not really satisfied with
My new proposal looks like this:
What do you think? |
Yes I understand the naming clash. so if we can't align the behaviour, we should use a different naming. But I think we'll find a matching name in the end. Re proposal: Re So perhaps we should simply set That leads me to the idea that a combined naming could be better than
I'm also okay with Nice discussion btw 😄 Makes me quite happy to see the good results! |
I think Regarding the
|
Hi @dm4t2, thank you! I'm absolutely fine with all the points :)
Re
Warning off-topic starts here ;)
for both display and input, which can simply be overridden by
instead of special distractionFree settings. Or perhaps directly define it that split way or whatever... 😄 of course there are settings that are always global. Trying to think about the "real" nature of such settings and how to be most self-explaining while preventing logical problems. Your library is great, and I don't want to criticize or pretend I knew better it in any way. I don't! 😛 Please don't get me wrong. Just wrote down what went through my head here. 😄 So finally: Pick from our discussion what you think is best and I'm very very very happy to see that your library will provide a solution for the discussed challenge. |
Thank you very much for contributing and the discussion. Let's see what I make of it in the next v2 release candidate 😉 |
…l digits for integer numbers by default (#203)
The changes are now available in 2.0.0-rc.3 🎉 The "all or nothing" precision behavior is now the new default, so there is no need for And finally, there's also a new option You can test it on the playground: |
BREAKING CHANGE: the use case of a precision range is longer given because of the new precision default behavior (hide decimal digits for integer numbers)
Hi and thank you so much for this wonderful library, it saved my day after a lot of headaches ;)
One wonderful improvement (feature request) for the library would be an option to remove zero fraction digits in display.
For example:
Bonus:
Or in code:
So the condition is: If there are relevant digits (
mod 1 != 0
), keep precision. If there are only relevant digits, remove them.This is a little feature request for cases where (due to available space) the numer should be as short as possible.
I guess this should definitely be an optional option.
Additionally, you could even think about instead of removing them to replace them with a certain string (like '-' for typical 10,- €)
If you like the idea, we might discuss a good name and description.
The text was updated successfully, but these errors were encountered: