From 7bf3d3a9f5ddb115dbdc23e7936af7a74768d75a Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Fri, 11 Apr 2025 11:37:50 +0200 Subject: [PATCH 1/5] minor --- .../client/source/class/osparc/info/CommentUI.js | 5 +++-- .../source/class/osparc/share/NewCollaboratorsManager.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/info/CommentUI.js b/services/static-webserver/client/source/class/osparc/info/CommentUI.js index 94450f804b7e..648e21369a5a 100644 --- a/services/static-webserver/client/source/class/osparc/info/CommentUI.js +++ b/services/static-webserver/client/source/class/osparc/info/CommentUI.js @@ -62,6 +62,7 @@ qx.Class.define("osparc.info.CommentUI", { maxWidth: 32, maxHeight: 32, decorator: "rounded", + marginTop: 4, }); this.getChildControl("meta-data-grid").add(control, { row: 0, @@ -71,7 +72,7 @@ qx.Class.define("osparc.info.CommentUI", { break; case "user-name": control = new qx.ui.basic.Label().set({ - font: "text-14" + font: "text-12" }); this.getChildControl("meta-data-grid").add(control, { row: 0, @@ -94,7 +95,7 @@ qx.Class.define("osparc.info.CommentUI", { }); this._add(control, { row: 0, - column: this.__isMyComment() ? 0 : 1 + column: this.__isMyComment() ? 0 : 1, }); break; } diff --git a/services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js b/services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js index bde7ac2a6c1b..dfb66aaab493 100644 --- a/services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js +++ b/services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js @@ -374,7 +374,7 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", { } } if (Object.keys(this.__selectedCollaborators).length) { - const selectedGIds = Object.keys(this.__selectedCollaborators).filter(key => qx.lang.Type.isNumber(key)); + const selectedGIds = Object.keys(this.__selectedCollaborators).filter(key => /^\d+$/.test(key)); // all digits const selectedEmails = Object.keys(this.__selectedCollaborators).filter(key => osparc.auth.core.Utils.checkEmail(key)); const addCollaborators = () => { From 66394bb272ce6290ff0d32e68c90c91f612f1703 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 14 Apr 2025 12:24:35 +0200 Subject: [PATCH 2/5] Fix Note's Recipient --- .../source/class/osparc/editor/AnnotationNoteCreator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js b/services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js index 55281f2c19eb..0e1eda8fe462 100644 --- a/services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js +++ b/services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js @@ -84,7 +84,9 @@ qx.Class.define("osparc.editor.AnnotationNoteCreator", { allowGrowX: false }); control.addListener("execute", () => { - const collaboratorsManager = new osparc.share.NewCollaboratorsManager(null, false); + const currentStudy = osparc.store.Store.getInstance().getCurrentStudy().serialize(); + currentStudy["resourceType"] = "study"; + const collaboratorsManager = new osparc.share.NewCollaboratorsManager(currentStudy, false); collaboratorsManager.setCaption("Recipient"); collaboratorsManager.getActionButton().setLabel(this.tr("Add")); collaboratorsManager.addListener("addCollaborators", e => { From 030dfdeaa842283f0ba341d2870dc224c6229130 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 14 Apr 2025 12:24:49 +0200 Subject: [PATCH 3/5] not needed --- .../client/source/class/osparc/desktop/StudyEditor.js | 1 - 1 file changed, 1 deletion(-) diff --git a/services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js b/services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js index deeb4f38372d..1f87846ccc90 100644 --- a/services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js +++ b/services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js @@ -309,7 +309,6 @@ qx.Class.define("osparc.desktop.StudyEditor", { } }, this); } - socket.emit("logger"); }, __listenToProgress: function() { From 4438f29e80690b36e9935ef6cfacce8e868f222d Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 14 Apr 2025 14:13:26 +0200 Subject: [PATCH 4/5] comment layout --- .../source/class/osparc/info/CommentUI.js | 66 +++++++++++-------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/info/CommentUI.js b/services/static-webserver/client/source/class/osparc/info/CommentUI.js index 648e21369a5a..e79c5e3ac658 100644 --- a/services/static-webserver/client/source/class/osparc/info/CommentUI.js +++ b/services/static-webserver/client/source/class/osparc/info/CommentUI.js @@ -28,8 +28,9 @@ qx.Class.define("osparc.info.CommentUI", { this.__comment = comment; const isMyComment = this.__isMyComment(); - const layout = new qx.ui.layout.Grid(12, 5); - layout.setColumnFlex(isMyComment ? 0 : 1, 1); // message content + const layout = new qx.ui.layout.Grid(12, 4); + layout.setColumnFlex(1, 1); // comment + layout.setColumnFlex(isMyComment ? 0 : 2, 2); // spacer this._setLayout(layout); this.setPadding(5); @@ -46,56 +47,63 @@ qx.Class.define("osparc.info.CommentUI", { _createChildControlImpl: function(id) { let control; switch (id) { - case "meta-data-grid": { - const layout = new qx.ui.layout.Grid(12, 5) - layout.setColumnWidth(this.__isMyComment() ? 1 : 0, 32); // thumbnail - control = new qx.ui.container.Composite(layout); - this._add(control, { - row: 0, - column: this.__isMyComment() ? 1 : 0 - }); - break; - } case "thumbnail": control = new qx.ui.basic.Image().set({ scale: true, maxWidth: 32, maxHeight: 32, decorator: "rounded", - marginTop: 4, + marginTop: 2, }); - this.getChildControl("meta-data-grid").add(control, { + this._add(control, { row: 0, - column: this.__isMyComment() ? 1 : 0, - rowSpan: 2 + column: this.__isMyComment() ? 2 : 0, + rowSpan: 2, + }); + break; + case "header-layout": + control = new qx.ui.container.Composite(new qx.ui.layout.HBox(5).set({ + alignX: this.__isMyComment() ? "right" : "left" + })); + this._add(control, { + row: 0, + column: 1 }); break; case "user-name": control = new qx.ui.basic.Label().set({ font: "text-12" }); - this.getChildControl("meta-data-grid").add(control, { - row: 0, - column: this.__isMyComment() ? 0 : 1 - }); + this.getChildControl("header-layout").addAt(control, 0); break; case "last-updated": control = new qx.ui.basic.Label().set({ font: "text-12" }); - this.getChildControl("meta-data-grid").add(control, { - row: 1, - column: this.__isMyComment() ? 0 : 1 - }); + this.getChildControl("header-layout").addAt(control, 1); break; case "comment-content": - control = new osparc.ui.markdown.Markdown(); + control = new osparc.ui.markdown.Markdown().set({ + backgroundColor: "background-main-2", + decorator: "rounded", + noMargin: true, + paddingLeft: 8, + paddingRight: 8, + allowGrowX: true, + }); control.getContentElement().setStyles({ - "text-align": this.__isMyComment() ? "right" : "left" + "text-align": this.__isMyComment() ? "right" : "left", }); this._add(control, { - row: 0, - column: this.__isMyComment() ? 0 : 1, + row: 1, + column: 1, + }); + break; + case "spacer": + control = new qx.ui.core.Spacer(); + this._add(control, { + row: 1, + column: this.__isMyComment() ? 0 : 2, }); break; } @@ -123,6 +131,8 @@ qx.Class.define("osparc.info.CommentUI", { thumbnail.setSource(user.getThumbnail()); userName.setValue(user.getLabel()); } + + this.getChildControl("spacer"); } } }); From 6188fc39791602dcd05448dfc3968b778f00f9c1 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 14 Apr 2025 14:25:41 +0200 Subject: [PATCH 5/5] minor --- .../client/source/class/osparc/info/CommentUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/static-webserver/client/source/class/osparc/info/CommentUI.js b/services/static-webserver/client/source/class/osparc/info/CommentUI.js index e79c5e3ac658..cd1906854ab1 100644 --- a/services/static-webserver/client/source/class/osparc/info/CommentUI.js +++ b/services/static-webserver/client/source/class/osparc/info/CommentUI.js @@ -30,7 +30,7 @@ qx.Class.define("osparc.info.CommentUI", { const isMyComment = this.__isMyComment(); const layout = new qx.ui.layout.Grid(12, 4); layout.setColumnFlex(1, 1); // comment - layout.setColumnFlex(isMyComment ? 0 : 2, 2); // spacer + layout.setColumnFlex(isMyComment ? 0 : 2, 3); // spacer this._setLayout(layout); this.setPadding(5);