iets3.opensource icon indicating copy to clipboard operation
iets3.opensource copied to clipboard

Unit expression editing is broken

Open bkolb opened this issue 5 years ago • 2 comments

There are several issues when editing expressions with units. One example is in this expression: image

If the * is replaced with a / the result is this: image

bkolb avatar Feb 24 '20 17:02 bkolb

Hi, we checked the editing of units. We were not able to reproduce the error you mentioned. The newly introduced test ChangeUnitOperator (http://127.0.0.1:63320/node?ref=r%3Aee5b1a89-4907-4bd7-bb79-ba99ef537bd3%28test.ts.expr.os.unitsonly%40tests%29%2F7151854550137080761 ) on branch feature/usability-improvements-unit-editor tests the behavior you mentioned and seems to work.

We, however, investigated the unit editor a bit further and found the following issues:

  • [ ] when editing the actual unit: pressing enter leads to a new unit-part. There is no easy way to get a newline. In the example, if I go to <no Unit> and press enter another <no Unit>-part will be created. grafik

  • [ ] during the first part of the unit pressing "*" has a different behaviour than in the remainding parts. In the first part a multiplication is added in the other parts users need to decide whether to add more parts for the unit of actually having a multiplication.

  • [x] errors in the typesystem on the unit are not presented correctly. This will be fixed once the branch datev-staging is merged and will look as follows: grafik

Are these the issues you had in mind when you wrote "several issues" or do you have additional issues in mind?

(updated on 16.May 2022 by alexanderpann to reflect current state)

MLanghammer avatar Feb 27 '20 17:02 MLanghammer

My initial problem was indeed primarily that units got lost on operator changes. That seems to be fixed on master.

bkolb avatar Mar 05 '20 07:03 bkolb

Most of the usability issues where fixed in the new unit language org.iets3.core.expr.typetags.physunits and the old language should be considered deprecated. That's why the label wonfix was added.

alexanderpann avatar Aug 14 '24 15:08 alexanderpann