iets3.opensource
iets3.opensource copied to clipboard
Unit expression editing is broken
There are several issues when editing expressions with units.
One example is in this expression:
If the * is replaced with a / the result is this:
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.
-
[ ] 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:
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)
My initial problem was indeed primarily that units got lost on operator changes. That seems to be fixed on master.
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.