Tryton - Issues

 

Issue2930

Title Float and integer fields should support some operators
Priority wish Status chatting
Superseder Nosy List albertca, ced, pokoli
Type feature request Components
Assigned To albertca Keywords
Reviews

Created on 2012-12-16.12:55:03 by albertca, last changed by ced.

Files
File name Uploaded Type Edit Remove
unnamed albertca, 2012-12-16.14:30:19 text/plain
Messages
msg28990 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-09-24.09:25:32
I do not think it should be invalidate.
There are probably a design that could remove the drawbacks.
For example, there could be a button which pops up a kind of calculator.
msg28984 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2016-09-23.19:23:10
I'm marking the issue as invalid as there are a lot of drawbacks as explained on msg12201

Also this can be implemented as tryton plugin.
msg12201 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-12-16.14:59:43
On 16/12/12 14:30 +0100, Albert Cervera i Areny wrote:
> > > This
> > > would allow the user to write "3.4*2" in the widget and when Tab or Enter
> > > were pressed, he would get the result in the same widget "6.80".
> > 
> > I doubt about such functionnality because it makes the widget more
> > complicated, it doesn't get the right feedback to the user in case of
> > wrong result (ex: too much decimal, NaN etc.).
> > Maybe a calculator popup? But almost all OS has one.
> 
> The idea is to make it much quicker than using OS or a calculator popup. 
> Decimals are rounded automatically so I think the user notices this once he 
> gets out of the widget, the same for NaN because he'd get an empty field.
> 
> That said, maybe a popup could be shown (a blocking or non-blocking one) with 
> those errors. What do you think?

I think what you try to achieve has a lot of design/usability issues.

- if the result of computation can not be set on the field, the user
  must have feedback.

- the current behavior that doesn't allow to type not valid value should
  be keept but once you start to use an expression it is almost
  impossible to keep that.

- if the result is wrong, it should be possible to correct the
  expression used to compute it.

- it should have a clear/visual difference between the mode where you
  type an expression and when it is a number.

- the computation should not be done on focus-out because user would
  want to make some copy/paste.
msg12200 (view) Author: [hidden] (albertca) (Tryton committer) Date: 2012-12-16.14:30:19
A Diumenge, 16 de desembre de 2012 13:50:36, Cédric Krier va escriure:
> Cédric Krier <cedric.krier@b2ck.com> added the comment:
> 
> On 16/12/12 12:55 +0100, Albert Cervera i Areny wrote:
> > Both integer and float widgets could support simple operations such as +,
> > -, *, /, **. Similar functionality is already supported by float_time
> > widget.
> 
> There is no such functionnality in float_time widget.

My mistake, then. But I tried "4h+2h" and it resulted in "6h" so I thought 
there was a calculator there :)

> > This
> > would allow the user to write "3.4*2" in the widget and when Tab or Enter
> > were pressed, he would get the result in the same widget "6.80".
> 
> I doubt about such functionnality because it makes the widget more
> complicated, it doesn't get the right feedback to the user in case of
> wrong result (ex: too much decimal, NaN etc.).
> Maybe a calculator popup? But almost all OS has one.

The idea is to make it much quicker than using OS or a calculator popup. 
Decimals are rounded automatically so I think the user notices this once he 
gets out of the widget, the same for NaN because he'd get an empty field.

That said, maybe a popup could be shown (a blocking or non-blocking one) with 
those errors. What do you think?

> ----------
> nosy: +ced
> 
> _______________________________________________
> Tryton issue tracker <issue_tracker@tryton.org>
> <https://bugs.tryton.org/issue2930>
> _______________________________________________
msg12199 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-12-16.13:50:35
On 16/12/12 12:55 +0100, Albert Cervera i Areny wrote:
> Both integer and float widgets could support simple operations such as +, -, *, 
> /, **. Similar functionality is already supported by float_time widget.

There is no such functionnality in float_time widget.

> This 
> would allow the user to write "3.4*2" in the widget and when Tab or Enter were 
> pressed, he would get the result in the same widget "6.80".

I doubt about such functionnality because it makes the widget more
complicated, it doesn't get the right feedback to the user in case of
wrong result (ex: too much decimal, NaN etc.).
Maybe a calculator popup? But almost all OS has one.
msg12198 (view) Author: [hidden] (albertca) (Tryton committer) Date: 2012-12-16.13:19:31
review614002
msg12197 (view) Author: [hidden] (albertca) (Tryton committer) Date: 2012-12-16.12:55:02
Both integer and float widgets could support simple operations such as +, -, *, 
/, **. Similar functionality is already supported by float_time widget. This 
would allow the user to write "3.4*2" in the widget and when Tab or Enter were 
pressed, he would get the result in the same widget "6.80".
History
Date User Action Args
2016-09-24 09:25:33cedsetstatus: invalid -> chatting
messages: + msg28990
2016-09-23 19:23:10pokolisetstatus: in-progress -> invalid
nosy: + pokoli
messages: + msg28984
2012-12-16 14:59:43cedsetmessages: + msg12201
2012-12-16 14:30:20albertcasetfiles: + unnamed
messages: + msg12200
2012-12-16 13:50:36cedsetnosy: + ced
messages: + msg12199
2012-12-16 13:19:31albertcasetmessages: + msg12198
2012-12-16 12:55:03albertcacreate

Showing 10 items. Show all history (warning: this could be VERY long)