From 4e2dd55cfd3c0a1639c3b833916cc2fd1f15a9f2 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 10 Nov 2016 10:53:30 +0000 Subject: [PATCH 1/3] Fix merge issues --- services/web/app/views/project/editor/editor.jade | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/services/web/app/views/project/editor/editor.jade b/services/web/app/views/project/editor/editor.jade index 8d826ca163..6c1ac29deb 100644 --- a/services/web/app/views/project/editor/editor.jade +++ b/services/web/app/views/project/editor/editor.jade @@ -72,13 +72,9 @@ div.full-size( .rp-entry-avatar(style="background-color: hsl({{ users[entry.metadata.user_id].hue }}, 70%, 50%);") {{ users[entry.metadata.user_id].avatar_text }} .rp-entry-body {{ entry.content }} -<<<<<<< HEAD - .review-entry-actions + .rp-entry-actions a(href, ng-click="acceptChange(entry_id)") Accept a(href, ng-click="rejectChange(entry_id)") Reject -======= - .rp-entry-actions ->>>>>>> cb425e7dba4f0caa9629cc7f5c45b4a4992de609 div(ng-if="entry.type == 'comment'") div(ng-repeat="comment in entry.thread", class="comment-thread__comment") From 938a8c48947b937d3c895f21ce53deb08013e660 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 10 Nov 2016 10:58:55 +0000 Subject: [PATCH 2/3] Fix logic around not tracking rejections to changes --- .../track-changes/TrackChangesManager.coffee | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee index d869158e8a..f5059c6820 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee @@ -67,8 +67,13 @@ define [ @nextUpdateMetaData = null else user_id = window.user.id - + + was_tracking = @changesTracker.track_changes + if @dont_track_next_update + @changesTracker.track_changes = false + @dont_track_next_update = false @applyChange(e, { user_id }) + @changesTracker.track_changes = was_tracking # TODO: Just for debugging, remove before going live. setTimeout () => @@ -122,8 +127,7 @@ define [ change = @changesTracker.getChange(change_id) return if !change? @changesTracker.removeChangeId(change_id) - is_tracking = @changesTracker.track_changes - @changesTracker.track_changes = false + @dont_track_next_update = true session = @editor.getSession() if change.op.d? content = change.op.d @@ -138,9 +142,7 @@ define [ session.remove({start, end}) else throw new Error("unknown change: #{JSON.stringify(change)}") - setTimeout () => - @changesTracker.track_changes = is_tracking - , 0 + checkMapping: () -> session = @editor.getSession() From e69b6da6844defc96f16efb6e2136fbff3afb9b6 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 10 Nov 2016 12:01:42 +0000 Subject: [PATCH 3/3] Stop deletes overlapping comments (but leads to occasional flickering) --- .../ide/review-panel/directives/reviewPanelSorted.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/review-panel/directives/reviewPanelSorted.coffee b/services/web/public/coffee/ide/review-panel/directives/reviewPanelSorted.coffee index 669a6e9c7a..983379f04c 100644 --- a/services/web/public/coffee/ide/review-panel/directives/reviewPanelSorted.coffee +++ b/services/web/public/coffee/ide/review-panel/directives/reviewPanelSorted.coffee @@ -23,7 +23,8 @@ define [ scope.$watch "reviewPanel.entries", (value) -> return if !value? - layout() + $timeout () -> + layout() scope.$on "review-panel:layout", () -> $timeout () ->