Commit Graph

184 Commits

Author SHA1 Message Date
SilentSpike
51efd5b714 Update and standardise QA implementations
- ES6ify (now using class syntax to define QAItem objects)
- Fix bug with KeepRight marker rendering not updating properly
- Use `qa-` prefix for the UI element classes to differentiate from iD
validation error related UI element classes
- Move away from "error" where possible in source
- Move away from snake_case naming where possible

Note that some function/method names have been untouched to make life
easier for v3 development. Have added note comments where appropriate.
2020-02-06 23:07:50 +00:00
Bryan Housel
13ead25654 Merge branch 'external_presets' into 2.x
(re: #4994)
2020-02-05 21:32:51 -05:00
Quincy Morgan
0e14241fcf Move some upload code from modeSave to new coreUploader object (re: #7247) 2020-02-05 15:28:23 -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
Bryan Housel
e19bcb77d5 Require init() call before coreContext starts doing things
(closes #7304)
2020-01-29 19:27:12 -05:00
Bryan Housel
9154a6a554 context.asset should pass-through absolute URLs 2020-01-29 15:22:06 -05:00
Bryan Housel
89724cfb1b Remove support for debug rendering of the community index
We have http://openstreetmap.community now for this, and it eliminates
another place in the code where that data would have been needed.
This commit also ES6ifies svgDebug.
2020-01-29 13:35:25 -05:00
Quincy Morgan
89ce98f510 Don't require services/osm in order to get max OSM character lengths 2020-01-28 09:28:23 -05:00
Bryan Housel
31e007fc83 Create a data loader and move the intro graph into dist/data
(re: #3403)
2020-01-27 17:15:00 -05:00
Bryan Housel
883f35a99b indent 2020-01-27 12:28:55 -05:00
Bryan Housel
6b7bb75315 Prefix the stateful/internal variables with _ 2020-01-27 12:09:53 -05:00
Bryan Housel
08c850a98f ES6ify context 2020-01-24 17:16:32 -05:00
Quincy Morgan
ba40154a06 v2.17.1 2020-01-16 18:38:21 -05:00
Quincy Morgan
7b7a42cf76 v2.17.0 2019-12-23 14:04:11 -05:00
Quincy Morgan
6f7f2ab77f Revert "vA.B.C"
This reverts commit 1e9021265c.
2019-12-23 14:03:43 -05:00
Quincy Morgan
1e9021265c vA.B.C 2019-12-23 14:02:55 -05:00
Bryan Housel
ada4fb5814 Add privacy policy version check to context and splash screen
(closes #7040)

A few other minor things in this commit
- migrated several ui modal files to ES6 syntax
- switched the splash link from ideditor.org -> ideditor.blog
2019-12-19 00:11:40 -05:00
Quincy Morgan
9d936b4aea Rename rendererMap.editable function to more precise rendererMap.editableDataEnabled
Make coreContext.editable function also account for whether user is in modeSave
2019-12-12 16:06:28 -05:00
Bryan Housel
dbe016a399 v2.16.0 2019-10-23 23:34:00 -04:00
Bryan Housel
590d557325 v2.15.5 2019-08-26 13:59:15 -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
b730e903a4 v2.15.4 2019-07-26 12:28:41 -04:00
Bryan Housel
919f37a67c v2.15.3 2019-06-30 10:08:43 -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
Bryan Housel
16d77a840c v2.15.2 2019-06-17 15:01:19 -04:00
Bryan Housel
7074d48f2f v2.15.1 2019-05-24 22:10:21 -04:00
Bryan Housel
b7089675a1 v2.15.0 2019-05-21 13:07:58 -04:00
Bryan Housel
bdb454e1b3 Remove utilCallWhenIdle, use requestIdleCallback/cancelIdleCallback
Places where a reset or connection switch would be problematic,
we can now cancel the callbacks.
2019-05-16 22:28:56 -04:00
Bryan Housel
ec0145de3a Prevent accidental loading of many tiles at low zoom
This could happen because `editable` was checked before the call was scheduled
not before the `loadTiles`.  The user can zoom out more while the call is deferred.
2019-05-16 16:44:19 -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
fceb1a86f7 Merge pull request #6245 from openstreetmap/d3-v5
d3 v5
2019-04-29 15:46:08 -04:00
Quincy Morgan
228af9a000 Move areaKeys and setAreaKeys to modules/osm/tags 2019-04-26 12:53:05 -07:00
Bryan Housel
b99be67169 When calling an errback from a Promise.catch, pass err.message 2019-04-25 21:58:36 -04:00
Quincy Morgan
d01bb78707 Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237) 2019-04-24 13:45:59 -07:00
Bryan Housel
e6bc9d9e8f Swap out d3-request, swap in d3-fetch 2019-04-24 16:25:25 -04:00
Bryan Housel
81127d71f3 Cache disabled() results in straighten action for consistent response
What could happen was:
- user could right click on a line
- this would trigger `disabled()` checks for each operation buttons
- the line was not fully downloaded, so would return `disabled()` 'not_downloaded'
  (and also start download of the missing tiles)
- then the tooltip would pop into existence, calling `tooltip()`
- which calls `disabled()` again
- but this time it's fine and the `disabled()` is false
- so you'd see a greyed out button but the tooltip said everyting is ok and
  you can click the button anyway

I fixed this by just caching the disabled test.  This is probably ok anyway
because these tests can be expensive, and then the user will see a consistent
message like "The line is not yet fully downloaded".

If the user clicks off the line and back onto it, iD will reenter select mode,
rebuild the menu, redo the disabled test, and they will see the button enabled.
2019-04-10 10:19:23 -04:00
Bryan Housel
e30090996b Add loadTileAtLoc to fetch data tile for a specific location
(closes #4890)

This lets iD request needed tiles outside of the viewport, for example to
properly straighten lines or validate features that may have unloaded
connections.
2019-04-09 23:49:31 -04:00
Bryan Housel
95a1bbaf97 Add downloaded debug flag and visualization for tiles downloaded 2019-04-08 22:06:47 -04:00
Bryan Housel
df1a2ea361 Prevent some actions on features that extend beyond the loaded map
(closes #2248)
2019-04-08 21:26:58 -04:00
Bryan Housel
e377270372 WIP: introduce validatedGraph, try on mode change not history change 2019-04-06 13:39:19 -04:00
Bryan Housel
1bcc0f613c WIP: fix caches, replace id() function with plain id property 2019-04-05 17:41:04 -04:00
Bryan Housel
78acd999c8 WIP: switch from validating everything to validating differences 2019-04-05 13:29:57 -04:00
Bryan Housel
f17ebee402 Use Set, simplify util functions to collect entities with children 2019-04-05 11:05:04 -04:00
Bryan Housel
8b1c0551cc WIP: understand state held by the validator, avoid translations
- Make sure all state variables prefixed with `_`
- Add explicit `init`/`reset` methods
  (graph/entity refs should never persist through a save to OSM)
- Thinking of how best cache validation results
2019-04-05 09:28:36 -04:00
Bryan Housel
561ffc402a Remove annotatedChange events (we'll replace with something else) 2019-04-03 11:56:56 -04:00
Bryan Housel
d5abe468b9 Remove rest of the lodash iterators: map, reduce, forEach
(re: #6087)
2019-03-29 15:14:21 -04:00
Bryan Housel
0d79e3e616 Remove lodash cloneDeep and forOwn from context.js
(re: #6087)

Tests in Phantom run twice as fast now!
2019-03-29 12:57:37 -04:00
Bryan Housel
0edd10001e Removing more lodash: isEmpty, isNumber, some map/reduce/forEach
(re: #6087)
2019-03-27 13:32:35 -04:00
Bryan Housel
ff4f8f005f Remove lodash find and findIndex
(re: #6087)
2019-03-22 17:31:41 -04:00
Quincy Morgan
7d0080a642 Persist the photo overlay layers via the URL query string (re: #5813) 2019-03-14 16:48:08 -04:00