Move chunks - UX improvements
- Surround move labels with chip.
- Add move-item icon.
- Remove deprecated dueToMove.
Change-Id: If8d67b9609bee550ebe554bbe32e4fa6e7a425c8
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.ts b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.ts
index 77b5499..c3d758c 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.ts
@@ -366,8 +366,7 @@
const group = new GrDiffGroup(type, lines);
group.keyLocation = !!chunk.keyLocation;
group.dueToRebase = !!chunk.due_to_rebase;
- group.moveDetails =
- chunk.move_details || (chunk.due_to_move ? {changed: false} : undefined);
+ group.moveDetails = chunk.move_details;
group.skip = chunk.skip;
group.ignoredWhitespaceOnly = !!chunk.common;
if (chunk.skip) {
@@ -698,9 +697,6 @@
if (chunk.due_to_rebase) {
subChunk.due_to_rebase = true;
}
- if (chunk.due_to_move) {
- subChunk.due_to_move = true;
- }
if (chunk.move_details) {
subChunk.move_details = chunk.move_details;
}
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor_test.js b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor_test.js
index ce7a3c4..5496b62 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor_test.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor_test.js
@@ -1019,16 +1019,6 @@
}
});
- test('_breakdownChunk keeps due_to_move for broken down additions',
- () => {
- sinon.spy(element, '_breakdown');
- const chunk = {b: ['blah', 'blah', 'blah'], due_to_move: true};
- const result = element._breakdownChunk(chunk);
- for (const subResult of result) {
- assert.isTrue(subResult.due_to_move);
- }
- });
-
test('_breakdown common case', () => {
const array = 'Lorem ipsum dolor sit amet, suspendisse inceptos'
.split(' ');