Commit Graph

52 Commits

Author SHA1 Message Date
Bryan Housel
78c484a02b Clear localstorage edits after successful save.. 2015-06-10 01:21:38 -04:00
Bryan Housel
9311ee64ab Post save delay before fetching new data to allow for postgres replication
re: #2678 #2667 #1646
I cheated a bit by putting half the delay before showing success pane and half after.
2015-06-09 22:38:55 -04:00
Bryan Housel
bff8266f19 Load children into remotegraph before conflict checks
Because loadMultiple doesn't download /full like loadEntity,
need to also load children that aren't already being checked..
2015-04-30 14:10:20 -04:00
Bryan Housel
ca02cf4b96 Graph#revert accept id instead of entity ref
trivial test cases (revert across create/update/delete) all pass
2015-04-28 11:22:46 -04:00
Bryan Housel
d85e6c260e Only check childnode versions of nodes that exist both locally and remote
The old code was causing false positives, flagging any added or removed
childnode as a conflict.
2015-04-28 09:37:52 -04:00
Bryan Housel
cecdc012ee Don't commit empty changesets.. (closes #1483)
instead, silently flush context and return to browse mode
2015-04-27 11:39:13 -04:00
Bryan Housel
a565b72f7d Before saving, revert entities where user chose "keep theirs" 2015-04-27 10:18:07 -04:00
Bryan Housel
3b18f1d33a Fix corruption of conflicts array introduced in 06c0a7d 2015-04-24 16:33:49 -04:00
Bryan Housel
06c0a7dd8b Conflict Resolution childnode fixes.
* don't try to fetch newly created childnodes from the remote server
* a modified way with new childnodes will safely merge, but will
  return the same graph (no diff), so check conflicts.length instead
2015-03-14 20:48:50 -04:00
Bryan Housel
a7e67ccfd9 refactor Conflicts ui into its own component 2015-03-04 11:46:56 -05:00
Bryan Housel
c503b9f96c fill remoteGraph with loadMultiple, finally do proper undeletion 2015-03-03 23:43:37 -05:00
Bryan Housel
edda24360a Fix undeletion version, don't undelete twice 2015-03-03 20:51:33 -05:00
Bryan Housel
e3139e250e improvements to iD.actions.MergeRemoteChanges
* if remote entity is deleted, log to conflicts() array
* if remote tag was deleted, delete from tags (not set undefined)
* update tests..
2015-03-02 13:07:24 -05:00
Bryan Housel
78ca4b11f4 Better support for delete/restore 2015-02-28 23:03:44 -05:00
Bryan Housel
1cfc6ad69a Check childNode versions too 2015-02-27 16:35:58 -05:00
Bryan Housel
80f5f65f63 More bugfixes and style updates:
* working Previous/Next buttons
* remove behaviors from save mode
  (users should not be moving nodes around or selecting at this point)
* clear hover before hovering next object
* enable save button and finished message after reviewing last conflict
* store users choice in __data__.chosen..
* default choices to `keep remote version`
* better message for delete conflicts
* fix undelete action to check localGraph (which will have the entity)
  instead of context.graph() (which may not)
2015-02-27 15:45:43 -05:00
Bryan Housel
0ed12da6fa WIP: style, replace expand/contract list with prev/next buttons 2015-02-26 22:39:22 -05:00
Bryan Housel
a3617b02cc WIP: fix style, fix choice selection 2015-02-26 00:43:14 -05:00
Bryan Housel
57e5113b1e Use radio buttons for mine/theirs choice 2015-02-24 23:32:02 -05:00
Bryan Housel
0730e0432b keep localGraph - UI can now flip between mine/theirs 2015-02-20 17:01:19 -05:00
Bryan Housel
ebe5484e22 WIP: MergeRemoteChanges merges way childnodes 2015-02-17 00:51:49 -05:00
Bryan Housel
cdd0ca1acf WIP: Use history.perform/replace/pop instead of context.perform
This means
* no more weird saves to localStoage of partially merged graphs
* pop cleanly cancels back to history state before merges happen
  (removed the annotated undo states)
2015-02-17 00:47:12 -05:00
Bryan Housel
6638f6806e WIP: changes to "download changeset"
* use original changeset before conflict resolutions
* don't cancel the conflict resolution ui
2015-02-16 15:12:42 -05:00
Bryan Housel
663ed92508 WIP: code cleanup, use difference.summary()
filling the toCheck list from summary() means that moved vertices are
treated as a change to the parent way, instead of changes to each node

TODO: need to conflict check each node, but at least now they are
fetched with a single API call to fetch the way, and can be reported
as a single conflict in the ui..
2015-02-16 14:53:51 -05:00
Bryan Housel
d755145ae6 WIP: usernames in messages, show # of total 2015-02-14 11:20:19 -05:00
samanpwbb
34642526ff jshint 2015-02-10 14:41:06 -05:00
samanpwbb
a4a5812816 style cleanup 2015-02-10 13:24:10 -05:00
samanpwbb
094c46dcfb fix order issues 2015-02-09 17:49:58 -05:00
samanpwbb
7f9d1437d2 zoom to conflict on active 2015-02-09 17:28:22 -05:00
samanpwbb
cef46853ea rework list interactions 2015-02-09 15:20:29 -05:00
samanpwbb
e49ebe2784 rework save UI 2015-02-09 14:28:55 -05:00
samanpwbb
c1d393302a fix close button 2015-02-06 19:35:53 -05:00
samanpwbb
78e4271071 finish basic layout/style pass 2015-02-06 19:07:57 -05:00
Bryan Housel
3fc99e1df5 Allow undeletions 2015-01-13 16:28:06 -05:00
Bryan Housel
a3459714b8 Styling for conflict resolution buttons 2015-01-12 22:29:59 -05:00
Bryan Housel
fb0d17e713 WIP: Add choices ui for resolving conflicts 2015-01-11 23:13:31 -05:00
Bryan Housel
c420650ac8 "Try Again" and "Download Changeset" buttons 2015-01-10 22:16:07 -05:00
Bryan Housel
95c92e9a59 WIP: conflict save dialog
* multiple buttons
* help text
2015-01-10 20:35:43 -05:00
Bryan Housel
d6b0e0a8bb WIP: Differentiate between errors and conflicts.
This will allow the conflicts dialog to have different
explanation text, buttons, etc..
2015-01-08 22:59:08 -05:00
Bryan Housel
ed4929273d Return entities from iD.Connection via callbacks
(instead of dispatching `load` event to merge them into `history`)

This is cleaner becuase now `context` doesn't need to keep an
`altGraph` state used only for Conflict Resolution.

The conflict resolution code calls the `iD.Connection` methods directly,
and other places in the code call `loadEntity` and `loadTiles` wrappers
that merge the entities into the main history.
2015-01-08 14:44:58 -05:00
Bryan Housel
d527c46108 Display conflict details on error confirmation box 2014-12-29 22:49:49 -05:00
Bryan Housel
dc1221b8ba pass graphs instead of entities to iD.actions.MergeRemoteChanges
(realized that I will need to compare more stuff from the
local and remote graphs in order to merge ways/relations)
2014-12-10 00:12:32 -05:00
Bryan Housel
3e97bd7d89 stub out iD.actions.MergeRemoteChanges 2014-12-06 22:11:54 -05:00
Bryan Housel
4088f2e70a properly load changed entities into altgraph and produce diffs. 2014-12-05 11:15:45 -05:00
Bryan Housel
ba919b8168 Conflict Resolution WIP: check server versions of modified nodes before sending changeset 2014-11-30 00:56:40 -05:00
Jakub Wieczorek
dfa442903d Improve the error message on saving when offline (fixes #2373) 2014-10-20 17:14:28 -07:00
John Firebaugh
1e78ee5c87 Stricter jshint 2013-10-24 16:08:48 -07:00
Aaron Lidman
b74ba194f2 Added ability to zoom to changeset list items 2013-10-16 12:43:25 -04:00
John Firebaugh
c3ec3569b5 Leave save mode when displaying success message 2013-07-25 13:53:15 -07:00
John Firebaugh
5f02f348de Include GPX and overlay layers in imagery_used
Fixes #1463
2013-07-25 11:51:55 -07:00