A calculation row in this component is referencing another component with a value of 90% but it's then being used as 90 not 0.9 so it becomes 9000% not 90%
Value from source component should be provided as 0.9 (i.e. 90% == 90 * 0.01 == 0.9)
Additional context
The source component's value is saying 90, 95 instead of 90%, 95% and this is whilst the values entered into the two VAPs are 90% and 95%.
We need to allow for the value e.g. 90% == 90*0.01 == 0.9 to be separate from the presentation e.g. 0.9 displays as 0.9 when normally presented or 90% when presented as a percentage.
When a user enters a value as 0.9 or 90% then it should equate to the same value, but in both cases the user can choose to present this value as 0.9 or 90% and have this presentation feed through to the component's self reported value as a string. And have this value feed through to other components that are referencing it... i.e. 90% should have a value of 0.9 not 90 to avoid it then becoming 9000% when formatted as a percentage.
Additional features
[x] F1. When component is of type state with subtype of number then show a warning triangle above the VAP set value, min and max fields if the value is not a valid number. This should look similar to the warning triangle above the calculation row when there is an error report by simulation.js in parsing / simulating the calculation row value (e.g. see below)
[ ] F2. Decide how the invalid numbers should be displayed on the VAP set and the component. For example with a VAP set with values of a90%, 95%, .3e2 * 2, these are currently displayed as is on the VAP set but as NaN, 95%, NaN on the component under it's title and in the component node e.g.:
With feature F1 (above) we have alerted the editor when they've entered an invalid number, but when a consumer comes along it is not obvious which components are "broken" and what NaN means. Instead perhaps we replace NaN with the warning triangle and include the invalid value (not NaN). Optionally we could also cross it out &/ colour it red. We could also set the component node background to red to highlight that is has a problem.
Describe the bug
A calculation row in this component is referencing another component with a value of 90% but it's then being used as 90 not 0.9 so it becomes 9000% not 90%
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Value from source component should be provided as 0.9 (i.e. 90% == 90 * 0.01 == 0.9)
Additional context
The source component's value is saying
90, 95
instead of90%, 95%
and this is whilst the values entered into the two VAPs are90%
and95%
.We need to allow for the value e.g. 90% == 90*0.01 == 0.9 to be separate from the presentation e.g. 0.9 displays as 0.9 when normally presented or 90% when presented as a percentage.
When a user enters a value as 0.9 or 90% then it should equate to the same value, but in both cases the user can choose to present this value as 0.9 or 90% and have this presentation feed through to the component's self reported value as a string. And have this value feed through to other components that are referencing it... i.e. 90% should have a value of 0.9 not 90 to avoid it then becoming 9000% when formatted as a percentage.
Additional features
state
with subtype ofnumber
then show a warning triangle above the VAP setvalue
,min
andmax
fields if the value is not a valid number. This should look similar to the warning triangle above the calculation row when there is an error report by simulation.js in parsing / simulating the calculation row value (e.g. see below)a90%, 95%, .3e2 * 2
, these are currently displayed as is on the VAP set but asNaN, 95%, NaN
on the component under it's title and in the component node e.g.:With feature F1 (above) we have alerted the editor when they've entered an invalid number, but when a consumer comes along it is not obvious which components are "broken" and what NaN means. Instead perhaps we replace NaN with the warning triangle and include the invalid value (not NaN). Optionally we could also cross it out &/ colour it red. We could also set the component node background to red to highlight that is has a problem.