Commit Graph

74 Commits

Author SHA1 Message Date
Quincy Morgan dc8fd13586 Enable array-callback-return eslint rule 2020-10-23 13:47:09 -04:00
Quincy Morgan cb6ab1405b Enable additional eslint rules, including no-unreachable-loop 2020-10-23 10:54:28 -04:00
Quincy Morgan 49526a7a67 Fix JS error upon changing addablePresetIDs after initial load
Accept addablePresetIDs as an array
Add code tests for invalid preset IDs in addablePresetIDs
2020-06-02 11:19:30 -04:00
Quincy Morgan 78a4b75e55 Fix regression where explicit addable presets were not populating the default preset list 2020-05-28 16:16:35 -04:00
Quincy Morgan 90b1395df4 Fix code tests 2020-04-01 13:27:30 -07:00
Quincy Morgan 60f7dc7c0b Replace presets property of context with singleton
Remove utilPreset
2020-04-01 13:08:45 -07:00
Quincy Morgan 527faa7b42 Remove need for coreContext in presetIndex 2020-04-01 11:25:45 -07:00
Quincy Morgan a58abe3c6f Move localStorage interface from a property of coreContext to a corePreferences function 2020-04-01 11:00:48 -07:00
Quincy Morgan a950b193d1 Fix preset categories 2020-03-31 16:41:46 -07:00
Quincy Morgan a1af118f0e Ensure locales and presets are loaded before the UI loads (close #7406)
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
2020-03-31 12:23:31 -07:00
Bryan Housel 3608659d21 Restore field inheritance 2020-02-10 16:22:13 -05:00
Bryan Housel 2149692bee Make sure the addablePresetIDs can be reset back to null too 2020-02-07 12:55:16 -05:00
Bryan Housel 1155498766 Restore the addablePresetID feature 2020-02-07 12:06:59 -05:00
Bryan Housel 9faf8c0fe5 Test that fallback presets are there before data is loaded
Also, we don't actually need a vertex preset anymore, it was removed a while ago
2020-02-06 17:04:11 -05:00
Bryan Housel 3c6ba9703a presetIndex.build -> presetIndex.merge, and make it merge data 2020-02-05 21:13:15 -05:00
Bryan Housel 147af19626 Seed presetIndex collection with fallback presets
- amazingly, this passes all tests, but iD ends up pretty non-functional
2020-02-05 12:21:33 -05:00
Bryan Housel e3e7cd3003 Memoize presetCollection.item (it's an Array.find)
Also add tests for `matchAllGeometry`
2020-02-05 10:32:20 -05:00
Bryan Housel 0fe766d9a4 WIP on external presets
- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
2020-02-05 09:38:26 -05:00
Quincy Morgan 41355bf2a0 Rename "visible" property of presets to "addable" (re: a06ec59514b30a52601e3614ef69006d2dc1bc91) 2020-01-15 14:29:45 -05:00
Quincy Morgan f6769238ed Revert references to the v3 UI in the Keyboard Shortcuts menu
Remove unused preset favoriting functionality
2019-12-20 12:05:04 -05:00
Bryan Housel 6dfdec06ad Ignore junction in areaKeys code and remove the unsearchable presets
(closes #6933)

We should not be adding unsearchable junction presets for every kind of
junction as a hacky workaround to let `junction=yes` be an area.

This should remove the special treatment of junction tag.
* `junction=*` will not be treated as an area by default
* `junction=*` will not trigger validator warnings that they should be closed
* `junction=yes` mapped as an area _will_ need an `area=yes` now, which iD will add
(afaik this is the only junction tag that should be treated as an area)
2019-11-04 10:53:36 -05:00
Quincy Morgan b1eaa2c29d Allow values in addTags to blacklist tags from implying a way should be an area (close #6800) 2019-09-19 09:06:42 -04:00
Quincy Morgan 3bf3ecf560 Populate the default preset list with the presets parameter values, if any (close #6703) 2019-07-31 16:18:10 -04:00
Quincy Morgan 2ad2bac931 Limit addable presets via comma-separated IDs in the presets URL parameter (close #6553) 2019-06-24 12:38:32 -04:00
Quincy Morgan 409968dfc2 Add index of tags that positively identify points or vertices, derived from the presets
Delete nodes that can only be vertices when deleting parent ways (close #6230)
Allow snapping ways to nodes that cannot be positively identified as vertex-only
2019-05-14 12:09:44 -04:00
Bryan Housel e6bc9d9e8f Swap out d3-request, swap in d3-fetch 2019-04-24 16:25:25 -04:00
Bryan Housel 3896b2282f Remove lodash isNaN, isNumber, isString, bind, uniqBy
(re: 6087)
2019-03-27 23:11:45 -04:00
Quincy Morgan 53625a9364 Fix issues with the walkthrough 2019-03-27 17:41:15 -04:00
Bryan Housel 5b4aa529de Replace lodash uniq
(re: 6087)
2019-03-27 02:43:25 -04:00
Bryan Housel 5280d07bad Remove lodash reject (re: #6087) 2019-03-23 12:51:13 -04:00
Quincy Morgan 4addd0e216 Add presets for basic indoor features (close #6082)
Don't use deprecated presets to determine area keys
2019-03-22 11:40:03 -04:00
Quincy Morgan 7e92f6aa89 Combine vertex and point geometries into a single Point fallback preset 2019-03-18 12:36:20 -04:00
Quincy Morgan 9216c93334 Remove item from recents when removing it as a favorite from the ribbon so it doesn't still appear 2019-03-08 11:21:19 -05:00
Quincy Morgan 8e0ed8cd8b Make recent presets reorder-able in the ribbon 2019-03-08 10:54:18 -05:00
Quincy Morgan 4a39d8a444 Automatically show recent presets in the top bar ribbon 2019-03-08 10:10:31 -05:00
Quincy Morgan 213d0ee3e8 Move preset favoriting functions from core/context.js to presets/index.js
Make recent presets persistent and compatible with favorite presets
2019-03-07 16:49:29 -05:00
Quincy Morgan 7eb007d27a Make recent presets geometry-specific 2019-03-07 12:14:18 -05:00
Quincy Morgan 9c19a1d714 Nicer display of name suggestion index presets 2019-03-06 12:19:44 -05:00
Quincy Morgan 36ad1b0242 Use "building" label instead of "area" when adding POIs as buildings 2019-03-06 11:39:17 -05:00
Quincy Morgan 12b1af7002 Don't say tags imply area for tags that iD doesn't have a preset for (close #5933) 2019-02-25 12:42:39 -05:00
Quincy Morgan ced652806b Fix an issue where some tagged nodes or existing vertices could not be snapped to (close #5942) 2019-02-25 08:54:30 -05:00
Quincy Morgan 96a1ec92c7 Fix prior commit
Apply same node snap suppression behavior to dragging vertices as to drawing ways
2019-02-15 10:28:43 -05:00
Quincy Morgan 11dc86ca9b Add check for entity geometry type in allowsVertex function (re: #5875) 2019-02-11 09:59:43 -05:00
Max Grossman b7786fd081 if on address interpolation, match and don't look through keys...
ref #5811
2019-02-01 17:58:15 -05:00
Max Grossman 58e31bc45a initial update to draw modes and hover behavior
ref #5811
2019-02-01 17:34:40 -05:00
Quincy Morgan 9f7ef21e5c The additional fields dropdown now mixes universal and moreFields and is sorted alphabetically 2019-01-17 11:37:05 -05:00
Quincy Morgan ae7c099c8a Moved field inheritance resolution from the data build to the preset initialization
Removed the data build check for duplicate values between fields and moreFields
Renamed the shop field from Type to Shop Type
Renamed the beauty field from Shop Type to Beauty Specialty
Added the brand field to the shop preset under moreFields
2019-01-15 09:53:26 -05:00
Bryan Housel 5a2049b421 Drop extra whitespace, make sure service exists before using it 2018-12-18 15:38:53 -05:00
Max Grossman 8f33a85a12 make collection.index function to handle failing tests 2018-12-17 17:16:10 -05:00
Max Grossman d87b1822f7 add/make visible weakly matched presets 2018-12-14 15:42:25 -05:00