Skip to content

Commit b1bb7ad

Browse files
Merge pull request #49924 from phillip-kruger/devui_ctesting
Dev UI: Make Continuous Testing Grid resizable
2 parents c581be8 + 52a35e2 commit b1bb7ad

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

extensions/devui/resources/src/main/resources/dev-ui/qwc/qwc-continuous-testing.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { QwcHotReloadElement, html, css} from 'qwc-hot-reload-element';
2+
import { StorageController } from 'storage-controller';
23
import { JsonRpc } from 'jsonrpc';
34
import '@vaadin/vertical-layout';
45
import '@vaadin/icon';
@@ -22,6 +23,7 @@ ring.register();
2223
*/
2324
export class QwcContinuousTesting extends QwcHotReloadElement {
2425
jsonRpc = new JsonRpc(this, false);
26+
storageControl = new StorageController(this, true);
2527

2628
static styles = css`
2729
:host {
@@ -91,7 +93,7 @@ export class QwcContinuousTesting extends QwcHotReloadElement {
9193
this._detailsOpenedItem = [];
9294
this._chartTitles = ["passed", "failed", "skipped"];
9395
this._chartColors = ['--lumo-success-text-color', '--lumo-error-text-color', '--lumo-contrast-70pct'];
94-
this._displayTags = true;
96+
this._displayTags = this.storageControl.get("displayTags");
9597
}
9698

9799
set _tests(value) {
@@ -269,12 +271,12 @@ export class QwcContinuousTesting extends QwcHotReloadElement {
269271
>
270272
${
271273
this._displayTags && this._hasTestResultWithTags
272-
? html`<vaadin-grid-sort-column path="tags" header="Tags" ${columnBodyRenderer((prop) => this._tagsRenderer(prop), [])}></vaadin-grid-sort-column>`
274+
? html`<vaadin-grid-sort-column path="tags" header="Tags" ${columnBodyRenderer((prop) => this._tagsRenderer(prop), [])} resizable width="40px"></vaadin-grid-sort-column>`
273275
: ''
274276
}
275-
<vaadin-grid-sort-column path="testClass" header="Test Class" ${columnBodyRenderer((prop) => this._testRenderer(prop), [])}></vaadin-grid-sort-column>
276-
<vaadin-grid-sort-column path="displayName" header="Name" ${columnBodyRenderer((prop) => this._nameRenderer(prop), [])}></vaadin-grid-sort-column>
277-
<vaadin-grid-sort-column path="time" header="Time" ${columnBodyRenderer((prop) => this._timeRenderer(prop), [])}>></vaadin-grid-sort-column>
277+
<vaadin-grid-sort-column path="testClass" header="Test Class" ${columnBodyRenderer((prop) => this._testRenderer(prop), [])} resizable auto-width></vaadin-grid-sort-column>
278+
<vaadin-grid-sort-column path="displayName" header="Name" ${columnBodyRenderer((prop) => this._nameRenderer(prop), [])} resizable auto-width></vaadin-grid-sort-column>
279+
<vaadin-grid-sort-column path="time" header="Time" ${columnBodyRenderer((prop) => this._timeRenderer(prop), [])} width="10px" flexGrow = 0></vaadin-grid-sort-column>
278280
</vaadin-grid>`;
279281

280282
}else{
@@ -477,6 +479,7 @@ export class QwcContinuousTesting extends QwcHotReloadElement {
477479

478480
_toggleDisplayTags(){
479481
this._displayTags = !this._displayTags;
482+
this.storageControl.set('displayTags', this._displayTags);
480483
}
481484
}
482485
customElements.define('qwc-continuous-testing', QwcContinuousTesting);

0 commit comments

Comments
 (0)