-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 multiselect preset #3080
Add multiselect preset #3080
Conversation
For multiselect fields, field.key should have a ':' on the end of it - we use as the prefix, not the real key field.keys should contain the array of real keys being modified see https://github.com/openstreetmap/iD/blob/master/js/id/ui/preset.js#L17-L45 The address field preset works like this also.. It contains an array of key.fields for all the subfields that might be set. For multiselect fields, we don't know ahead of time what all the subfields are, so we append to the list in `change()` and rebuild list in `tags()`
This is really good! Awesome work @kepta!
First item is because d3.combobox defaults to
Second item: A few things with keypresses:
I fixed a thing in 1a9c111:
Also, I noticed a lot of recycling values don't appear because, because:
Also I'll replace the input placeholder text with something translateable
|
^ related to this, I did some testing today and it looks like we need to adjust the popularity threshold values in the taginfo service code In this case, we need to do a |
^ related to this, I realized today that the So, I'm now thinking I want to add typeAhead to combo boxes too, and maybe merge together some of the code in |
For normal keys it should probably be smaller than 5000. This usecase only applies in the raw tag editor when the user selects a key, so it's not as visible. The purpose is, ostensibly, to filter out garbage keys, but in practice some of the most garbage keys in OSM are also the most popular ( But.. for these multiselectable keys ( |
(all functionality in multiselect.js has been moved to combo.js)
This is coming along really well! I refactored combo.js and moved the multiselect code into there, because it turns out a lot of the code needed to be shared anyway. Hoping to improve the tabbing behavior and merge soon! |
That's interesting, so now the combo type will be handling single or multiple values. Nice job merging them into one, @bhousel :D |
continued from #3055