Add hasParent attribute to change view/change actions/rebase dialog

Get a hasParent attribute from the related changes endpoint, determining
if a change has a parent change that is not the tip of the branch.
This will be used by the rebase dialog to display tailored options
that make rebasing more intuitive. UI changes to follow.

This change also updates rebaseOnCurrent from being a property of
gr-change-view to getting added in the rest api interface as a property
of the rebase action.  This is why the property is removed from all
views until the reply dialog, where it is passed as a parameter.

Bug: Issue 5447
Change-Id: If31e4c42d8e82f00fba9fa98c28371046299eec4
This commit is contained in:
Becky Siegel
2017-02-14 11:42:08 -08:00
parent f1e305f296
commit bb3acdb083
11 changed files with 91 additions and 18 deletions

View File

@@ -314,8 +314,8 @@ limitations under the License.
on-tap="_handleReplyTap">[[_replyButtonLabel]]</gr-button>
<gr-change-actions id="actions"
change="[[_change]]"
has-parent="[[hasParent]]"
actions="[[_change.actions]]"
rebase-on-current="[[_rebaseOnCurrent]]"
revision-actions="[[_currentRevisionActions]]"
change-num="[[_changeNum]]"
change-status="[[_change.status]]"
@@ -369,6 +369,7 @@ limitations under the License.
<div class="relatedChanges">
<gr-related-changes-list id="relatedChanges"
change="[[_change]]"
has-parent="{{hasParent}}"
patch-num="[[_computeLatestPatchNum(_allPatchSets)]]">
</gr-related-changes-list>
</div>