Commit Graph

83 Commits

Author SHA1 Message Date
Bryan Housel
55a92ca79d Add closed:note changeset tag for closed OSM notes 2019-01-11 10:14:55 -05:00
Bryan Housel
46ebce2d6f Fix error reporting urls and make sure sidebar not showing stale data 2019-01-03 11:37:14 -05:00
Thomas Hervey
31f35b0389 added basics to sidebar 2018-12-19 13:35:26 -05:00
Bryan Housel
a0a54395a7 Fix issue completing uploads that reuse an existing open changeset
(closes #5228)
2018-08-16 10:16:33 -04:00
Bryan Housel
930e865b42 Attempt to prevent users from uploading duplicate changes
(closes #5200)

This removes a users changes stored in localStorage if they try to close
iD while an upload is in progress.  It prevents the possiblity that the
changeset is eventually accepted and closed, but the user can be prompted
to restore those changes the next time they start iD.
2018-08-11 19:15:18 -04:00
Bryan Housel
5d9fc33e24 Simplify osm.js postNoteUpload/update 2018-07-24 16:22:37 -04:00
Bryan Housel
0552a90a9f Remove category field - it's not an osm tag 2018-07-24 14:58:04 -04:00
Bryan Housel
89ad643977 Let new note generate its own id, instead of using -1
Also stringify the note id (because existing notes from OSM are this way)
Also make sure comments is initialized as an Array not an Object
Also clarify some of the tests
2018-07-24 14:11:08 -04:00
Thomas Hervey
e1cb25d824 merge from 'master' 2018-07-23 18:24:02 -04:00
Bryan Housel
2fa593421f Rename scaleExtent to zoomExtent, slightly simplify getTiles() 2018-07-22 01:15:44 -04:00
Bryan Housel
8811933009 Split up loadTiles and loadNotes code
Code is similar but different enough that I'd rather have 2 separate
functions rather than a single function with a bunch of ifs
2018-07-21 22:31:04 -04:00
Bryan Housel
c0b77d8226 remove unneeded dimensions argument (projection clipExtent has it) 2018-07-21 21:44:14 -04:00
Thomas Hervey
baad5f0cc5 added tests for osm/note 2018-07-21 21:44:07 -04:00
Bryan Housel
cd3d576276 rename geoTile -> tiler 2018-07-21 21:27:44 -04:00
Thomas Hervey
c3fe1fedd9 updated categories, added category to note service 2018-07-21 21:09:17 -04:00
Thomas Hervey
b91fa2841b merged from 'master' 2018-07-21 12:12:36 -04:00
Bryan Housel
02713e48fb Move cache management out of tiler, it's responsibilty of service
Also remove some unused code and eslint warnings
2018-07-21 11:11:39 -04:00
Bryan Housel
d1fe81b905 rename utilTile -> utilTiler 2018-07-21 10:07:56 -04:00
Bryan Housel
e4d829ec06 Have the tiler return filtered results - re: skipNullIsland 2018-07-21 10:03:40 -04:00
Thomas Hervey
06a410107b cleaned up merge relics and comments 2018-07-20 23:31:49 -04:00
Thomas Hervey
1d61355d08 added service for new note 2018-07-20 22:19:57 -04:00
Thomas Hervey
bf9b19359a WIP drag note 2018-07-20 21:41:44 -04:00
Thomas Hervey
2cde7843f2 merged branch 'master' into drag-note 2018-07-20 14:30:21 -04:00
Thomas Hervey
386d375b7a fix excessive note tiling and network request 2018-07-19 10:51:39 -04:00
Thomas Hervey
c563abaf7a pass dimensions to tile 2018-07-18 15:49:04 -04:00
Thomas Hervey
60f66b73e9 fixed missing declarations. TODO: fix tests 2018-07-18 15:16:52 -04:00
Thomas Hervey
b017616993 added new note icon and completed sidebar 2018-07-18 09:38:59 -04:00
Thomas Hervey
5bf3f7ed3e Merge branch 'master' into refactor-loadTiles 2018-07-18 07:26:56 -04:00
Thomas Hervey
7ad765d408 added simple tests for loading and retrieving notes 2018-07-16 10:54:40 -04:00
Thomas Hervey
d4b1622667 moved getTiles and filtering to utils 2018-07-14 19:15:25 -04:00
Bryan Housel
1a106f5253 Make uiViewOnOSM work for notes too, add it to note_editor footer 2018-07-13 15:55:58 -04:00
Bryan Housel
33ef9a4357 Wrap callbacks with common checks for connection id and auth failure
This eliminates a lot of the copy-paste code in every callback.
2018-07-13 15:14:20 -04:00
Bryan Housel
f825845b79 Can't skip seen on the userDetails call
This call really does need for a result to be passed to the callback
2018-07-13 00:31:04 -04:00
Bryan Housel
775b47272d Remove from inflight cache before doing anything in done 2018-07-12 23:56:03 -04:00
Bryan Housel
645cc790a3 Add docs about OSM API, finish implementing postNoteUpdate
`postNoteUpdate` can hangle status changes and comment additions
(I named it that to be like `putChangeset`)

Also renamed `user` to `loadUser` to be consistent with other calls
2018-07-12 23:46:07 -04:00
Bryan Housel
19560ebc90 Properly save and restore caches when entering/leaving the walkthrough 2018-07-12 15:39:04 -04:00
Bryan Housel
f52f24b517 Add noteOptions, default to 10k note limit and 7 days closed
Also bump note tile zoom to z12. There just aren't that many notes,
so this reduces API calls.
2018-07-10 23:28:37 -04:00
Bryan Housel
7423d192d4 Implement multi-fetch get for users from OSM API
Eagerly load user details after loading notes
(re: openstreetmap/openstreetmap-website#1921)
2018-07-10 23:02:37 -04:00
Thomas Hervey
14356cefe2 WIP: toggle note status 2018-07-08 12:50:02 -05:00
Bryan Housel
6f1dc12f99 Add user method to osm service, _userCache, user parser 2018-07-04 03:20:16 -04:00
Bryan Housel
bf499d9438 Restore modeSelect, and make a new modeSelectNote just for the notes 2018-07-03 18:11:59 -04:00
Bryan Housel
b14d1b5061 resolve conflicts, fix a few minor bugs prob caused by merging:
- don't insert multiple times into the rtree in `services/osm.js`
- use `d.id` instead of `d.key` as the key in `svg/notes.js`
2018-07-03 16:40:07 -04:00
Bryan Housel
e0cc6260f5 Switch innerHtml to textContent, which properly unescapes xml
This commit also fixes a linter error, and switches some
lodash _forEach to normal for loops.
2018-07-02 23:22:00 -04:00
Bryan Housel
2d2845e5d4 If notes are coincident, move them apart slightly 2018-07-02 16:56:05 -04:00
Bryan Housel
7999aca9e2 Add getNode and replaceNote methods, refactor caches 2018-07-02 16:02:53 -04:00
Bryan Housel
00c8ff4f69 Don't add notes to the _seenEntity cache
re: 229484a940 (commitcomment-29560519)
2018-07-01 22:50:28 -04:00
Bryan Housel
487ec9d837 Better spinner event management
re: https://github.com/openstreetmap/iD/pull/5107#issuecomment-401617938
2018-07-01 12:48:51 -04:00
Bryan Housel
229484a940 Cleanup osm service notes and caches, remove state variable
This seems like a lot but the main things here are:
- remove the _loadingTiles "global" variable.  It was causing problems because
it was being checked from the callbacks, which are async.
- cleanup the caches
- use DOM API getElementsByTagName('id') to get note id
- set a lower tilezoom z13 for notes (meaning: fetch larger bounding boxes)
2018-06-30 03:46:42 -04:00
Thomas Hervey
b3f7b06f66 merged: services/notes into /osm; todo: fix some caching & rendering 2018-06-29 20:01:30 -04:00
Bryan Housel
ac86869b4a Add conflict checking progress, guard code for user authentication 2018-01-05 18:11:49 -05:00