Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show missing values to the user? #7

Open
danse opened this issue Aug 26, 2015 · 2 comments
Open

How to show missing values to the user? #7

danse opened this issue Aug 26, 2015 · 2 comments

Comments

@danse
Copy link
Contributor

danse commented Aug 26, 2015

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
@danse
Copy link
Contributor Author

danse commented Aug 26, 2015

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 }

@danse
Copy link
Contributor Author

danse commented Aug 26, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant