Highlight hunks which are due to rebase on PolyGerrit
Change-Id: Ifd31c8b2d31d71ff19060da56d81b64954f4fdb7
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
if (this._isTotal(group)) {
|
||||
sectionEl.classList.add('total');
|
||||
}
|
||||
if (group.dueToRebase) {
|
||||
sectionEl.classList.add('dueToRebase');
|
||||
}
|
||||
const pairs = group.getSideBySidePairs();
|
||||
for (let i = 0; i < pairs.length; i++) {
|
||||
sectionEl.appendChild(this._createRow(sectionEl, pairs[i].left,
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
if (this._isTotal(group)) {
|
||||
sectionEl.classList.add('total');
|
||||
}
|
||||
if (group.dueToRebase) {
|
||||
sectionEl.classList.add('dueToRebase');
|
||||
}
|
||||
|
||||
for (let i = 0; i < group.lines.length; ++i) {
|
||||
sectionEl.appendChild(this._createRow(sectionEl, group.lines[i]));
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
state.lineNums.left,
|
||||
state.lineNums.right,
|
||||
highlights);
|
||||
deltaGroup.dueToRebase = section.due_to_rebase;
|
||||
|
||||
return {
|
||||
lineDelta: {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
this.lines = [];
|
||||
this.adds = [];
|
||||
this.removes = [];
|
||||
this.dueToRebase = undefined;
|
||||
|
||||
this.lineRange = {
|
||||
left: {start: null, end: null},
|
||||
|
||||
@@ -34,6 +34,10 @@ limitations under the License.
|
||||
--dark-remove-highlight-color: rgba(255, 0, 0, 0.15);
|
||||
--light-add-highlight-color: #efe;
|
||||
--dark-add-highlight-color: rgba(0, 255, 0, 0.15);
|
||||
--light-rebased-remove-highlight-color: #fff6ea;
|
||||
--dark-rebased-remove-highlight-color: rgba(255, 139, 6, 0.15);
|
||||
--light-rebased-add-highlight-color: #edfffa;
|
||||
--dark-rebased-add-highlight-color: rgba(11, 255, 155, 0.15);
|
||||
}
|
||||
:host(.no-left) .sideBySide ::content .left,
|
||||
:host(.no-left) .sideBySide ::content .left + td,
|
||||
@@ -145,6 +149,20 @@ limitations under the License.
|
||||
.content.remove {
|
||||
background-color: var(--light-remove-highlight-color);
|
||||
}
|
||||
.dueToRebase .content.add .intraline,
|
||||
.delta.total.dueToRebase .content.add {
|
||||
background-color: var(--dark-rebased-add-highlight-color);
|
||||
}
|
||||
.dueToRebase .content.add {
|
||||
background-color: var(--light-rebased-add-highlight-color);
|
||||
}
|
||||
.dueToRebase .content.remove .intraline,
|
||||
.delta.total.dueToRebase .content.remove {
|
||||
background-color: var(--dark-rebased-remove-highlight-color);
|
||||
}
|
||||
.dueToRebase .content.remove {
|
||||
background-color: var(--light-rebased-remove-highlight-color);
|
||||
}
|
||||
.content .contentText:after {
|
||||
/* Newline, to ensure all lines are one line-height tall. */
|
||||
content: '\A';
|
||||
|
||||
Reference in New Issue
Block a user