Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-899 Merge Diff improvements #902

Merged
merged 8 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@
</div>
</div>
<div *ngIf="mergeItem.type === MergeType.Modification">
<div class="modified-item">
<mdm-path-name [path]="mergeItem.path"></mdm-path-name>
</div>
<div *ngIf="!isCommitting">
<div fxLayout="row">
<h4>{{ source.branchName }}</h4>
Expand Down Expand Up @@ -161,16 +164,18 @@ <h4 class="branchHeader">{{ sourceUsed }}</h4>
</div>
</div>
<div *ngIf="mergeItem.type === MergeType.Deletion">
<div class="deleteContent">
<h4 style="margin-top: 75px; color: red">
<mdm-path-name [path]="mergeItem.path"></mdm-path-name> will be deleted
</h4>
<div class="content">
<div class="delete-item">
<mdm-path-name [path]="mergeItem.path"></mdm-path-name>
</div>
<div class="delete-item">Item will be deleted</div>
</div>
</div>
<div *ngIf="mergeItem.type === MergeType.Creation">
<div class="deleteContent">
<h4 style="margin-top: 75px; color: green">
<mdm-path-name [path]="mergeItem.path"></mdm-path-name> will be created
</h4>
<div class="content">
<div class="create-item">
<mdm-path-name [path]="mergeItem.path"></mdm-path-name>
</div>
<div class="create-item">Item will be created</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ SPDX-License-Identifier: Apache-2.0
*/
$changeColor: #e6ffe6;

.item-path {
margin: 1em;
}

.sourceCol {
height: 25vh;
overflow-y: auto;
Expand All @@ -32,16 +36,14 @@ $changeColor: #e6ffe6;
}
}



.spacer {
flex: 1 1 auto;
}

.panel {
.button {
padding-right: 10px !important;
font-size: small !important;
font-size: small !important;
width: fit-content !important;
}

Expand All @@ -50,9 +52,9 @@ $changeColor: #e6ffe6;
font-size: small;
}

.deleteContent {
.content {
height: 25vh;
text-align: center;
// text-align: center;
}

.textArea {
Expand All @@ -63,7 +65,17 @@ $changeColor: #e6ffe6;
width: 150px;
}

}

.create-item {
margin: 1em;
color: green;
}

.delete-item {
margin: 1em;
color: red;
}

.modified-item {
margin: 1em;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
type="button"
matToolTip="Commit Changes"
aria-label="Commit Changes"
[disabled]="!committingList || committingList.length === 0"
[disabled]="
!committingList || committingList.length === 0 || committingDiffs
"
(click)="onCommitChanges()"
>
<i
Expand Down Expand Up @@ -101,6 +103,20 @@ <h4 class="inline-block marginless">
</div>
<div>
<div
*ngIf="comparingBranches"
class="panel panel-default mdm--shadow-block"
>
<p>Comparing branches...</p>
<p>Depending on the size of the branches, this may take some time.</p>
<mat-progress-bar mode="indeterminate" color="accent"></mat-progress-bar>
</div>
<div *ngIf="committingDiffs" class="panel panel-default mdm--shadow-block">
<p>Committing your selected changes...</p>
<p>Depending on the of differences selected, this may take some time.</p>
<mat-progress-bar mode="indeterminate" color="accent"></mat-progress-bar>
</div>
<div
*ngIf="!comparingBranches && !committingDiffs"
class="tabContainer panel panel-default mdm--shadow-block"
fxLayout="row"
>
Expand All @@ -109,15 +125,14 @@ <h4 class="inline-block marginless">
[selectedIndex]="activeTab"
(selectedIndexChange)="tabSelected($event)"
>

<!-- Displays if no branch is selected -->
<!-- Displays if no branch is selected -->
<mat-tab *ngIf="!changesList">
<ng-template mat-tab-label> No Branch </ng-template>
<div class="noContent">
<h4 style="margin-top: 75px">No Target Branch Selected</h4>
</div>
</mat-tab>
<!-- Displays if a branch is selected -->
<!-- Displays if a branch is selected -->
<mat-tab *ngIf="changesList">
<ng-template mat-tab-label>
Changes ({{ changesList.length }})
Expand Down Expand Up @@ -156,10 +171,8 @@ <h4 style="margin-top: 75px">No Target Branch Selected</h4>
[mergeItems]="changesList"
style="display: flex"
></mdm-merge-item-selector>
<div class="noContent">
<h4 style="margin-top: 75px" *ngIf="changesList.length === 0">
No Pending Changes
</h4>
<div class="noContent" *ngIf="changesList.length === 0">
<h4 style="margin-top: 75px">No Pending Changes</h4>
</div>
</div>
</mat-tab>
Expand Down Expand Up @@ -189,13 +202,8 @@ <h4 style="margin-top: 75px" *ngIf="changesList.length === 0">
[mergeItems]="committingList"
style="display: flex"
></mdm-merge-item-selector>
<div class="noContent">
<h4
style="margin-top: 75px"
*ngIf="committingList.length === 0"
>
No Pending Commits
</h4>
<div class="noContent" *ngIf="committingList.length === 0">
<h4 style="margin-top: 75px">No Pending Commits</h4>
</div>
</div>
</mat-tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,68 +16,63 @@ limitations under the License.
SPDX-License-Identifier: Apache-2.0
*/

.headerContainer{
justify-content:space-between;
flex-direction: row;
margin-top: 5px;
display:flex;
}


.tabContainer{
height: 20%;
min-height:300px
.headerContainer {
justify-content: space-between;
flex-direction: row;
margin-top: 5px;
display: flex;
}

.tabContainer {
height: 10%;
min-height: 200px;
// max-height: 500px;
}

.div {
position: relative;
margin: 2.5px;
}
.div {
position: relative;
margin: 2.5px;
}

.div1 {
@extend .div;
width:20%;
overflow-x: auto;
overflow-y: hidden;
}
.div1 {
@extend .div;
width: 20%;
overflow-x: auto;
overflow-y: hidden;
}

.div2 {
@extend .div;
width:80%;
}
.div2 {
@extend .div;
width: 80%;
}

.title
{
text-align: center;
}
.title {
text-align: center;
}

.noContent
{
height: 250px;
text-align: center;
}
.noContent {
height: 250px;
text-align: center;
}

.selectBtn
{
position: relative;
float: right;
margin-right: 75px;
margin-top: 15px;
}
.selectBtn {
position: relative;
float: right;
margin-right: 75px;
margin-top: 15px;
}

.spacer {
flex: 1 1 auto;
}
.spacer {
flex: 1 1 auto;
}

.button {
padding-right: 10px !important;
font-size: small !important;
width: fit-content !important;
}
.button {
padding-right: 10px !important;
font-size: small !important;
width: fit-content !important;
}

.cancelButton
{
padding-right: 90px;
font-size: small;
}
.cancelButton {
padding-right: 90px;
font-size: small;
}
Loading
Loading