Skip to content

Commit

Permalink
Fix unified diff bug caused by no-unnecessary-split-diff-view (#6063)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Oct 11, 2022
1 parent 828cdc9 commit 472c7ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/1_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ body:
required: true
- type: textarea
attributes:
label: How to replicate the issue
description: Include the steps to reproduce and A REAL URL where the bug appears. If it happens on a private repo, find an equivalent public URL, even if it doesn't happen there.
label: How to replicate the issue + URL
description: ‼️‼️‼️ Every bug report MUST include A REAL URL where the bug appears. If it happens on a private repo, find an equivalent public URL, even if it doesn't happen there.
validations:
required: true
- type: input
Expand Down
8 changes: 4 additions & 4 deletions source/features/no-unnecessary-split-diff-view.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* The selector looks for diff tables WITHOUT changes on the left XOR on the right */
/* Instead of duplicating this selector for each rule, we set a variable and pick it up where needed */
.rgh-no-unnecessary-split-diff-view .js-diff-table:not(
.rgh-no-unnecessary-split-diff-view .js-diff-table:has([data-split-side]):not(
:has([data-split-side='left']:is(.blob-code-addition, .blob-code-deletion))
) {
--rgh-only-additions: none;
table-layout: auto !important;
}

.rgh-no-unnecessary-split-diff-view .js-diff-table:not(
.rgh-no-unnecessary-split-diff-view .js-diff-table:has([data-split-side]):not(
:has([data-split-side='right']:is(.blob-code-addition, .blob-code-deletion))
) {
--rgh-only-deletions: none;
Expand All @@ -24,7 +24,7 @@
display: var(--rgh-only-deletions, table-cell) !important;
}

/* Any applicable situation: Re-align annotations, which are always on the left */
.rgh-no-unnecessary-split-diff-view :is(.inline-comments, .js-inline-annotations) td:nth-child(2) {
/* Any applicable situation: Re-align annotations */
.rgh-no-unnecessary-split-diff-view :is(.inline-comments, .js-inline-annotations) .empty-cell:not(.blob-num) {
display: var(--rgh-only-additions, var(--rgh-only-deletions, table-cell)) !important;
}

0 comments on commit 472c7ae

Please sign in to comment.