* Field: fix wikiURL by URL encoding it - and slight refactors
* Field: fix wikiURL only encodeURIComponent instead of redundant full URL
* Field: refactors function to generate wikiURL, ensures anchor part is also URI encoded, ensures the anchor ref is not encoded, adds unit tests
* Field: refactors wikipedia URI encoding of the anchor logic, removes legacy anchorencode effort via try-catch that replaced percentage character with dots, adds unit further tests, reduces exessive inlining
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
Add `utilCombinedTags` method and use it for the raw tag editor as well as fields
Pass `entityIDs` array into fields instead of single `entity` object
Give field revertion its own path separate from `change`
Add multiselection editing to fields in files: access, address, check, combo, cycleway, input, maxspeed, textarea, and wikidata
This also includes a bunch of tweaks to make the tests work
in both PhantomJS and modern browsers like Chrome.
Basically - introduce some more async into the test code so that
the coreData.get promise is guaranteed to settle. Because in
PhantomJS the promise is polyfilled, and Chrome it's native, they
work slightly differently.
(closes#5568)
Several strategies in here:
- Move uiCombobox() from inside the render function to class variable
- Don't render stuff like the raw tag editor when it's collapsed
- Don't show as many fields/combos on hover
- Don't instantiate fields (like universal/more) until they're actually shown
- Bind the combo on enter selection not on update selection
This better describes what it does.
Also, took this opportunity to update a bunch of the uifield code
(no multi line variable declarations, prefix state variables with _,
eliminate unnecessray lodash, etc)
Fixes issue with nested/namespaced fields, such as `maxspeed/advisory`,
in situations where would try to use a css selector or element id.
Can't use characters like '/' in a css selector.
(closes#3324)
Previously we allowed devs to swap out services that they didn't need.
This became difficult now that ES6 exports are immutable bindings.
But we can wrap the immutable bindings themselves in a live object,
to get back the flexibility that we used to have.
This change also drops the `taginfo` accessor on Context, since devs who want
to swap out taginfo service with something else can now do so through the live
binding. `iD.services.taginfo = myTaginfo()`