Show conflict warning when there are conflicts and showing the full diff
What does this MR do?
For #287919 (closed)
Copying the last commit description here:
isFullChangeset
is the implied behavior we want:Only show the merge conflict warning if the user is viewing the diff at the latest version (HEAD) and seeing a diff from the BASE version (e.g.: not a subset of the diff).
If they're viewing the full changeset and there are conflicts then we show the warning.
In essence, we've been trying to simulate a check for what we actually care about: Is the user seeing the full changeset starting from the base of the branch and ending at the latest commit (HEAD) of the branch?
This MR simply codifies that explicitly: isFullChangeset
is true when there's no special start commit and the current commit is the latest. Critically, both of these values are delivered by the diffs_metadata
API response, not from the URL.
Screenshots (strongly suggested)
I'm not including any screenshots because the visuals aren't changing.
Please see the issue linked above for the banner in question here.
The only change is when that banner appears, and it should consistently appear now where A) there are conflicts and B) those conflicts are on the current state of the MR that would be merged into it's target.
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.