Commit Graph

383 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
55c4fce55f Merge pull request #2516 from bhousel/zorrofix
Avoid zorroing connected ways when moving a way
2015-03-20 22:30:34 -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
3adcd85c89 Fix nudging, cleanup code.. 2015-03-05 16:20:50 -05:00
Bryan Housel
7232e0d769 Restrict delta so that user can not move way across intersection 2015-03-04 16:05:33 -05: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
d141827c3e Merge branch 'master' into conflict-resolution-ui 2015-02-06 19:08:50 -05:00
samanpwbb
78e4271071 finish basic layout/style pass 2015-02-06 19:07:57 -05:00
Bryan Housel
fb90cd90b0 Use graph#overwrite for move mode
also move cache stuff from here down into iD.actions.Move
2015-02-02 22:02:33 -05:00
Bryan Housel
f1f6656269 Perform moves idempotently
* instead of passing small deltas to the move action and accumulating
errors, always pass the absolute delta since entering move mode
* also fix cache to handle circular/self-referencing relations
2015-02-02 16:29:08 -05:00
Bryan Housel
e51e46a885 refactor and improve unzorroing, vertex replacement 2015-01-26 21:52:31 -05:00
Bryan Housel
9233be9cd6 Avoid zorroing connected ways when moving a way
(closes #729)
2015-01-24 01:07:27 -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
1603b638f6 Add Copy/Paste behaviors, context copybuffer 2015-01-07 10:41:05 -05:00
Bryan Housel
d527c46108 Display conflict details on error confirmation box 2014-12-29 22:49:49 -05:00