-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add several values for the same property #168
Comments
@cquest do you have an opinion on that (or can you share OSM experience on that ?) |
On my side, I think option 1 is best for now. Option 2 would:
For option 1, it should be well documented what the UI does. I think going for "," as a separator is better than ";" because it's more standard (for example it's permitted to represent parameters as list in OpenAPI). Then you have either to deal with values containing "," or refuse them. If you deal with them, I strongly encourage using csv style (handling quote) as there are a lot of libs to deal with it and avoid silly bugs. In my opinion, the UI should clearly handle lists (one input box per value) instead of trying to magically guess, which have the risk to lead to complicated cases (explicit is better than implicit). Also don't try to handle more than lists, as dict, for example must be encoded in property name. (one could even argue that list could be encoded as my::value::1="value 1", my::value::2="value 2", etc., but it might be overcomplicated !) We could even argue that list could be handled by property name: ` |
BTW, this also relates to #151 |
Reported by Alizarine on Slack (2024-03-24).
Indeed, the example provides a simple use case: a product could have multiple
producer_data_issue
.Option 1: do not change the API, manage it with the UI
With the UI it would be possible to enter a property several times.
In the database, the different values would be stored in a unique
property
/value
, separated by a given sign (a;
for example).The UI would have to manage the following cases:
Option 2: change the API, do not change the UI
There would be probably no change at all in the UI.
The text was updated successfully, but these errors were encountered: