Skip to content

Commit bf2f18d

Browse files
authored
Fix 3D e2e (ITISFoundation#2601)
* [skip ci] minor cosmetics * fix 3d tutorials * users can do slides
1 parent e5d40e3 commit bf2f18d

File tree

8 files changed

+34
-46
lines changed

8 files changed

+34
-46
lines changed

services/web/client/source/class/osparc/component/form/Auto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ qx.Class.define("osparc.component.form.Auto", {
303303
if (qx.lang.Type.isNumber(data)) {
304304
return String(data);
305305
}
306-
return data;
306+
return null;
307307
}
308308
},
309309
{ // target2model

services/web/client/source/class/osparc/component/form/renderer/PropFormBase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ qx.Class.define("osparc.component.form.renderer.PropFormBase", {
4444
fl.setColumnFlex(this.self().gridPos.info, 0);
4545
fl.setColumnAlign(this.self().gridPos.info, "left", "middle");
4646
fl.setColumnFlex(this.self().gridPos.ctrlField, 1);
47-
fl.setColumnMinWidth(this.self().gridPos.ctrlField, 100);
47+
fl.setColumnMinWidth(this.self().gridPos.ctrlField, 50);
4848
},
4949

5050
properties: {

services/web/client/source/class/osparc/component/widget/NodeTreeItem.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ qx.Class.define("osparc.component.widget.NodeTreeItem", {
4343
construct: function() {
4444
this.base(arguments);
4545

46+
this.set({
47+
indent: 8
48+
});
49+
4650
this.getContentElement().setStyles({
4751
"border-radius": "6px"
4852
});
@@ -175,12 +179,11 @@ qx.Class.define("osparc.component.widget.NodeTreeItem", {
175179
// The label
176180
this.addLabel();
177181
const label = this.getChildControl("label");
178-
if (label) {
179-
label.setMaxWidth(150);
180-
}
181-
182-
// All else should be right justified
183-
this.addWidget(new qx.ui.core.Spacer(), {
182+
label.set({
183+
allowGrowX: true,
184+
allowShrinkX: true
185+
});
186+
label.setLayoutProperties({
184187
flex: 1
185188
});
186189

services/web/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -575,14 +575,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
575575
menu.add(saveAsTemplateButton);
576576
}
577577

578-
if (osparc.data.model.Study.hasSlideshow(studyData) && osparc.data.Permissions.getInstance().canDo("study.slides")) {
579-
const startAsGuidedModeButton = this.__getStartAsGuidedModeButton(studyData);
580-
menu.add(startAsGuidedModeButton);
581-
582-
const startAsAppButton = this.__getStartAsAppButton(studyData);
583-
menu.add(startAsAppButton);
584-
}
585-
586578
const deleteButton = this.__getDeleteStudyMenuButton(studyData, false);
587579
if (deleteButton) {
588580
menu.addSeparator();
@@ -691,22 +683,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
691683
return saveAsTemplateButton;
692684
},
693685

694-
__getStartAsGuidedModeButton: function(studyData) {
695-
const startAsGuidedModeButton = new qx.ui.menu.Button(this.tr("Start Guided mode"));
696-
startAsGuidedModeButton.addListener("execute", () => {
697-
this._startStudy(studyData, "guided");
698-
}, this);
699-
return startAsGuidedModeButton;
700-
},
701-
702-
__getStartAsAppButton: function(studyData) {
703-
const startAsAppButton = new qx.ui.menu.Button(this.tr("Start App mode"));
704-
startAsAppButton.addListener("execute", () => {
705-
this._startStudy(studyData, "app");
706-
}, this);
707-
return startAsAppButton;
708-
},
709-
710686
__getDeleteStudyMenuButton: function(studyData) {
711687
const deleteButton = new qx.ui.menu.Button(this.tr("Delete"));
712688
osparc.utils.Utils.setIdToWidget(deleteButton, "studyItemMenuDelete");

services/web/client/source/class/osparc/data/Permissions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ qx.Class.define("osparc.data.Permissions", {
113113
"study.edge.create",
114114
"study.edge.delete",
115115
"study.classifier",
116-
"study.tag"
116+
"study.tag",
117+
"study.slides"
117118
],
118119
"tester": [
119120
"studies.template.create.all",
@@ -126,7 +127,6 @@ qx.Class.define("osparc.data.Permissions", {
126127
"study.nodestree.uuid.read",
127128
"study.filestree.uuid.read",
128129
"study.logger.debug.read",
129-
"study.slides",
130130
"statics.read"
131131
],
132132
"admin": []

services/web/client/source/class/osparc/desktop/WorkbenchView.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
251251

252252
const tabViewPrimary = this.getChildControl("side-panel-left-tabs");
253253
this.__removePages(tabViewPrimary);
254-
tabViewPrimary.setBackgroundColor("background-main-lighter+");
254+
tabViewPrimary.setBackgroundColor(primaryColumnBGColor);
255255
const collapsibleViewLeft = this.getChildControl("collapsible-view-left");
256256
collapsibleViewLeft.getChildControl("expand-button").setBackgroundColor(primaryColumnBGColor);
257257
collapsibleViewLeft.getChildControl("collapse-button").setBackgroundColor(primaryColumnBGColor);
@@ -748,7 +748,6 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
748748

749749
__populateSecondPanelNode: function(node) {
750750
this.__settingsPage.getChildControl("button").show();
751-
this.__outputsPage.getChildControl("button").show();
752751
this.getChildControl("side-panel-right-tabs").setSelection([this.__settingsPage]);
753752

754753
if (node.isPropertyInitialized("propsForm") && node.getPropsForm()) {
@@ -759,17 +758,21 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
759758
});
760759
}
761760

762-
const portTree = new osparc.component.widget.inputs.NodeOutputTree(node, node.getMetaData().outputs).set({
763-
allowGrowY: false
764-
});
765-
this.__outputsPage.add(portTree);
761+
if (node.hasOutputs()) {
762+
this.__outputsPage.getChildControl("button").show();
766763

767-
const outputFilesBtn = new qx.ui.form.Button(this.tr("Artifacts"), "@FontAwesome5Solid/folder-open/14").set({
768-
allowGrowX: false
769-
});
770-
osparc.utils.Utils.setIdToWidget(outputFilesBtn, "nodeOutputFilesBtn");
771-
outputFilesBtn.addListener("execute", () => osparc.component.node.BaseNodeView.openNodeDataManager(node));
772-
this.__outputsPage.add(outputFilesBtn);
764+
const portTree = new osparc.component.widget.inputs.NodeOutputTree(node, node.getMetaData().outputs).set({
765+
allowGrowY: false
766+
});
767+
this.__outputsPage.add(portTree);
768+
769+
const outputFilesBtn = new qx.ui.form.Button(this.tr("Artifacts"), "@FontAwesome5Solid/folder-open/14").set({
770+
allowGrowX: false
771+
});
772+
osparc.utils.Utils.setIdToWidget(outputFilesBtn, "nodeOutputFilesBtn");
773+
outputFilesBtn.addListener("execute", () => osparc.component.node.BaseNodeView.openNodeDataManager(node));
774+
this.__outputsPage.add(outputFilesBtn);
775+
}
773776
},
774777

775778
getLogger: function() {

tests/e2e/portal/3D_Anatomical.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ async function runTutorial () {
2929
await tutorial.waitFor(10000, 'Some time for starting the service');
3030
await utils.takeScreenshot(page, screenshotPrefix + 'service_started');
3131

32+
// This study opens in fullscreen mode
33+
await tutorial.restoreIFrame();
34+
3235
const outFiles = [
3336
"data.zip"
3437
];

tests/e2e/portal/3D_EM.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ async function runTutorial () {
2929
await tutorial.waitFor(10000, 'Some time for starting the service');
3030
await utils.takeScreenshot(page, screenshotPrefix + 'service_started');
3131

32+
// This study opens in fullscreen mode
33+
await tutorial.restoreIFrame();
34+
3235
const outFiles = [
3336
"data.zip"
3437
];

0 commit comments

Comments
 (0)