Skip to content

Commit

Permalink
Feat: buttons in testtab are separated by the scope of their action (#…
Browse files Browse the repository at this point in the history
…834)

* feat: buttons in testtab are separated by the scope of their action

* fix: extra section for button separation
  • Loading branch information
MatthijsSmets authored Dec 17, 2024
1 parent 7440250 commit 9160f5a
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 24 deletions.
7 changes: 0 additions & 7 deletions src/app/report/edit-display/edit-display.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
font-size: 11pt;
}

.button-divider {
font-size: 1rem;
margin: 0 0.5rem;
color: darkgrey;
user-select: none;
}

.rerun-result {
margin: 0 0 1rem 0.25rem;
font-size: 10pt;
Expand Down
16 changes: 16 additions & 0 deletions src/app/test/test.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ tr {
flex-wrap: wrap;
gap: 0.25rem;
width: fit-content;
align-items: center;
padding: 0.75rem 0;
}

.button-width {
Expand All @@ -32,3 +34,17 @@ tr {
button {
height: fit-content;
}

.button-section {
position: relative;
}

.button-section-title {
position: absolute;
top: 0;
color: grey;
width: 100%;
max-lines: 1;
font-size: 0.6rem;
text-align: center;
}
55 changes: 38 additions & 17 deletions src/app/test/test.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,44 @@
</div>
<div class="col">
<div class="buttons pt-1">
<button data-cy-test="runAll" class="btn btn-info" title="Run All" (click)="runSelected()"><i
class="fa fa-play"></i></button>
<button data-cy-test="refresh" class="btn btn-info" title="ReloadTestReports"
(click)="loadData()"><i class="fa fa-refresh"></i></button>
<button class="btn btn-info" title="Reset" (click)="resetRunner()">Reset</button>
<button class="btn btn-info" title="Options" (click)="testSettingsModal.open()"><i class="fa fa-cog"></i></button>
<button data-cy-test="deleteSelected" class="btn btn-info" title="Delete Selected" (click)="openDeleteModal(false)"><i class="fa fa-trash"></i></button>
<button data-cy-test="deleteAll" class="btn btn-info" title="Delete All" (click)="openDeleteModal(true)">Delete all</button>
<button class="btn btn-info" title="Clone report" (click)="openCloneModal()">Clone</button>
<button data-cy-test="copySelected" class="btn btn-info" title="Copy Selected" (click)="copySelected()"><i class="fa fa-copy"></i></button>
<button data-cy-test="downloadBinary" class="btn btn-info" title="Download Binary" (click)="downloadSelected()"><i class="fa fa-download"></i></button>
<button data-cy-test="upload" type="button" class="btn btn-info" title="Upload"
(click)="uploadFileTest.click()">
<i class="fa fa-upload"></i>
<input #uploadFileTest data-cy-test="uploadFile" type="file" [hidden]="true"
(change)="uploadReport($event)">
</button>
<div class="buttons button-section">
<p class="button-section-title">General</p>
<button data-cy-test="refresh" class="btn btn-info" title="Reload test reports"
(click)="loadData()"><i class="fa fa-refresh"></i></button>
<button class="btn btn-info" title="Options" (click)="testSettingsModal.open()"><i class="fa fa-cog"></i>
</button>
<button data-cy-test="upload" type="button" class="btn btn-info" title="Upload"
(click)="uploadFileTest.click()">
<i class="fa fa-upload"></i>
<input #uploadFileTest data-cy-test="uploadFile" type="file" [hidden]="true"
(change)="uploadReport($event)">
</button>
</div>
<span class="button-divider">&#124;</span>
<div class="buttons button-section">
<p class="button-section-title">All</p>
<button class="btn btn-info" title="Reset" (click)="resetRunner()">Reset</button>
<button data-cy-test="deleteAll" class="btn btn-info" title="Delete all" (click)="openDeleteModal(true)">Delete
all
</button>
</div>
<span class="button-divider">&#124;</span>
<div class="buttons button-section">
<p class="button-section-title">Selected</p>
<button data-cy-test="runAll" class="btn btn-info" title="Run selected reports" (click)="runSelected()"><i
class="fa fa-play"></i></button>
<button data-cy-test="deleteSelected" class="btn btn-info" title="Delete selected reports"
(click)="openDeleteModal(false)"><i class="fa fa-trash"></i></button>
<button data-cy-test="copySelected" class="btn btn-info" title="Copy selected reports" (click)="copySelected()">
<i class="fa fa-copy"></i></button>
<button data-cy-test="downloadBinary" class="btn btn-info" title="Download binary" (click)="downloadSelected()">
<i class="fa fa-download"></i></button>
</div>
<span class="button-divider">&#124;</span>
<div class="buttons button-section">
<p class="button-section-title">One</p>
<button class="btn btn-info" title="Clone report" (click)="openCloneModal()">Clone</button>
</div>
</div>

<div class="form-group mt-2">
Expand Down
7 changes: 7 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,10 @@ html, body {
.cdk-overlay-container {
z-index: 1100 !important; /* Ensure it is higher than the modal's z-index */
}

.button-divider {
font-size: 1rem;
margin: 0 0.5rem;
color: darkgrey;
user-select: none;
}

0 comments on commit 9160f5a

Please sign in to comment.