From fe186da19c9e3cce270aef8dc59e2d93f74be769 Mon Sep 17 00:00:00 2001 From: Dhruv Srivastava Date: Tue, 12 Nov 2019 08:41:10 -0800 Subject: [PATCH] Show helpful instructions if change has Merge conflicts * If the change has Merge Conflicts, then we show the user some helpful error message in the tooltip of the change. Bug: Issue 11501 Change-Id: I14a6b911ecd5a6798adcfe593a9e11a3959e803b (cherry picked from commit 319ce419fa8f8e0f7574d1febeeb61487fc1ab9a) --- .../shared/gr-change-status/gr-change-status.js | 7 +++++++ .../gr-change-status/gr-change-status_test.html | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.js b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.js index 3afbe5409a..e6f52c61a5 100644 --- a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.js +++ b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.js @@ -29,6 +29,10 @@ 'It will not appear on dashboards unless you are CC\'ed or assigned, ' + 'and email notifications will be silenced until the review is started.'; + const MERGE_CONFLICT_TOOLTIP = 'This change has merge conflicts. ' + + 'Download the patch and run "git rebase master". ' + + 'Upload a new patchset after resolving all merge conflicts.'; + const PRIVATE_TOOLTIP = 'This change is only visible to its owner and ' + 'current reviewers (or anyone with "View Private Changes" permission).'; @@ -75,6 +79,9 @@ case ChangeStates.PRIVATE: this.tooltipText = PRIVATE_TOOLTIP; break; + case ChangeStates.MERGE_CONFLICT: + this.tooltipText = MERGE_CONFLICT_TOOLTIP; + break; default: this.tooltipText = ''; break; diff --git a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_test.html b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_test.html index 3ac4016974..421c6ab589 100644 --- a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_test.html +++ b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_test.html @@ -35,6 +35,17 @@ limitations under the License.