You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since this component is configurable, and it is not rendering messages out of custom Javascript logic, its behaviour must be driven by configuration options and thus is a bit rigid. So we want to know how it should behave before coding it.
For example, when a field is missing, is it acceptable to simply substitute its value with "unknown"? This would look like:
Found a possible Ebola case with name Francesco Occhipinti, ward unknown
The text was updated successfully, but these errors were encountered:
With the former approach, configuration options would allow us to define default values like "unknown", but we might also omit the values when we want the placeholder to disappear. For example we might want to ignore a missing otherNames, resulting in:
Found a possible Ebola case with name Occhipinti, ward unknown
What would be hard to do, is to change the text according to the presence or absence of some fields. This because the text is generated with a template like:
A new Ebola suspect was found, the name is ${personId.otherNames} ${ personId.surname }
an alternative could be to design a simple language allowing us to programmatically generating messages, for example by concatenating ordered fragments:
"A new Ebola suspect was found"
otherNames -> ", the name is ${ otherNames }"
surname -> ", the surname is ${ surname }"
ward -> ", the ward is ${ ward }"
As you can see though, this is not fully satisfying and can easily grow in complexity
Since this component is configurable, and it is not rendering messages out of custom Javascript logic, its behaviour must be driven by configuration options and thus is a bit rigid. So we want to know how it should behave before coding it.
For example, when a field is missing, is it acceptable to simply substitute its value with "unknown"? This would look like:
The text was updated successfully, but these errors were encountered: