removing the option field for units and unit positioning and replacing with two new options âprependâ and âappendâ will affect existing dashboards.
adding a third property âprependâ
adding a third property âunits 2â positioned prepend if units are appended or appended if units are prependedâŚ
How about changing the widget setup box to only display âprependâ and âappendâ boxes, if/when it loads an existing feedvalue (recognised by the âbefore/afterâ field) it uses the âbefore/afterâ field to populate either the âprependâ or âappendâ box with the existing unit text (leaving the other box blank). And on save it removes the 2 old fields and saves the 2 new fields. So only on editing and saving an existing feedvalue is the change made (we can recommend users resave their widgets anyway) . Old feedvalues remain as is until edited/saved and new feedvalues get the new fields only. This would keep backwards compatibility and only keep 2 fields (for this job), either position and unit or prepend and append, the changes would happen behind the scenes without the user having to do anything.
Likewise in the dashboard view, the feed value would display one of 2 ways depending in whether it has a before/after field, ie it still uses âappendâ and âprependâ variables, but they are populated when the dash loads by either using the before/after to populate one of those vars, or it populates them directly if it has âappendâ and âprependâ args.
Do you have an example feedvalue config? Iâm guessing blind here as I cannot recall looking at these that closely, I just know itâs a JSON object, not a database table
Its not easy to control which options are shown in the editor, but it is relatively straight forward to render widgets with old attributes if they are present and the new ones are not configured. Iâve now done this for the feedvalue widget giving the prepend and append options, pushed to the master branch: backwards compatibility of units ¡ emoncms/dashboard@05ea5a1 ¡ GitHub
@TrystanLea sorry but I realized one thing else that would be useful is a thousands separator option (commas or spaces), it would make big numbers much easier to readâŚ
Also I am using the .org platform so just want to know how long changes like these take to migrate to the online version?
Not all are using this format. We have a different format #â###,## here in Switzerland. As someone working at a Swiss bank I have to deal with this annoyance every day
I did write âcommonlyâ, not âuniversallyâ and especially as your link shows all the Euro currencies using #,###.##
Is the same format always used for non-currency numbers? Iâve very often seen #.###,### format used in Engineering documents from continental Europe - though my experience is largely limited to German sources.