Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4f251cd
isPotentialFunction
odeimaiz Sep 24, 2025
1469801
checkExposedInputsOutputs
odeimaiz Sep 24, 2025
ddeb2e9
or -> and
odeimaiz Sep 24, 2025
92794e2
CREATE_FUNCTION_TEXT
odeimaiz Sep 24, 2025
e862d3f
tooltipOnDisabledButton
odeimaiz Sep 24, 2025
6bc32ba
Merge branch 'master' into enh/function-checks
odeimaiz Sep 24, 2025
1117144
Merge branch 'enh/function-checks' of github.com:odeimaiz/osparc-simc…
odeimaiz Sep 24, 2025
264e5d6
minor
odeimaiz Sep 24, 2025
4b3ca11
unused
odeimaiz Sep 24, 2025
d10787a
Merge branch 'master' into fix/consistent-modified
odeimaiz Sep 24, 2025
d9bbd96
Merge branch 'fix/consistent-modified' of github.com:odeimaiz/osparc-…
odeimaiz Sep 24, 2025
24eb01e
minor
odeimaiz Sep 24, 2025
c84d1f2
use backend's modified
odeimaiz Sep 24, 2025
913582e
remove dependency
odeimaiz Sep 24, 2025
a9eb158
minor
odeimaiz Sep 24, 2025
a3372a8
canItBeOpened
odeimaiz Sep 24, 2025
12945e2
one more check
odeimaiz Sep 24, 2025
7fa93ea
check
odeimaiz Sep 24, 2025
d1d6417
modified-star
odeimaiz Sep 24, 2025
021c4be
openServiceCatalogWithContext
odeimaiz Sep 24, 2025
80ad296
rename
odeimaiz Sep 24, 2025
00304a1
minor
odeimaiz Sep 24, 2025
4fa5a23
output
odeimaiz Sep 24, 2025
9d67db2
minor
odeimaiz Sep 24, 2025
d8c5146
show error
odeimaiz Sep 24, 2025
dcc184d
maxChars prop
odeimaiz Sep 24, 2025
6a787f7
refactor
odeimaiz Sep 24, 2025
a87a209
minor
odeimaiz Sep 24, 2025
a0fe515
setMaxLength
odeimaiz Sep 24, 2025
9424644
maxLength
odeimaiz Sep 24, 2025
f500675
Merge branch 'master' into fix/limit-chat-title
matusdrobuliak66 Sep 24, 2025
f0fe174
MAX_CONTENT_LENGTH
odeimaiz Sep 24, 2025
1bdde17
Merge branch 'fix/limit-chat-title' of github.com:odeimaiz/osparc-sim…
odeimaiz Sep 24, 2025
5e679ab
minor
odeimaiz Sep 24, 2025
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 @@ -85,6 +85,10 @@ qx.Class.define("osparc.conversation.AddMessage", {
control = new osparc.editor.MarkdownEditor();
control.addListener("textChanged", () => this.__addCommentPressed(), this);
control.setCompact(true);
control.getChildControl("text-area").set({
maxLength: osparc.data.model.Conversation.MAX_CONTENT_LENGTH,
});
// make it visually connected to the button
control.getChildControl("text-area").getContentElement().setStyles({
"border-top-right-radius": "0px", // no roundness there to match the arrow button
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ qx.Class.define("osparc.data.model.Conversation", {
CONVERSATION_MESSAGE_UPDATED: "conversation:message:updated",
CONVERSATION_MESSAGE_DELETED: "conversation:message:deleted",
},

MAX_TITLE_LENGTH: 50,
MAX_CONTENT_LENGTH: 4096,
},

properties: {
Expand Down Expand Up @@ -256,9 +259,8 @@ qx.Class.define("osparc.data.model.Conversation", {

renameConversation: function(newName) {
osparc.store.ConversationsSupport.getInstance().renameConversation(this.getConversationId(), newName)
.then(() => {
this.setName(newName);
});
.then(() => this.setName(newName))
.catch(err => osparc.FlashMessenger.logError(err));
},

patchExtraContext: function(extraContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ qx.Class.define("osparc.study.ConversationPage", {
visibility: osparc.data.model.Study.canIWrite(this.__studyData["accessRights"]) ? "visible" : "excluded",
});
renameButton.addListener("execute", () => {
const titleEditor = new osparc.widget.Renamer(tabButton.getLabel());
const titleEditor = new osparc.widget.Renamer(tabButton.getLabel()).set({
maxChars: osparc.data.model.Conversation.MAX_TITLE_LENGTH,
});
titleEditor.addListener("labelChanged", e => {
titleEditor.close();
const newLabel = e.getData()["newLabel"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ qx.Class.define("osparc.support.ConversationPage", {
if (oldName === "null") {
oldName = "";
}
const renamer = new osparc.widget.Renamer(oldName);
const renamer = new osparc.widget.Renamer(oldName).set({
maxChars: osparc.data.model.Conversation.MAX_TITLE_LENGTH,
});
renamer.addListener("labelChanged", e => {
renamer.close();
const newLabel = e.getData()["newLabel"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ qx.Class.define("osparc.widget.Renamer", {
construct: function(oldLabel = "", subtitle = "", winTitle) {
this.base(arguments, winTitle || this.tr("Rename"));

const maxWidth = 350;
const minWidth = 200;
const maxWidth = 400;
const minWidth = 250;
const labelWidth = oldLabel ? Math.min(Math.max(parseInt(oldLabel.length*4), minWidth), maxWidth) : minWidth;
this.set({
layout: new qx.ui.layout.VBox(5),
Expand All @@ -63,66 +63,93 @@ qx.Class.define("osparc.widget.Renamer", {
"labelChanged": "qx.event.type.Data"
},

properties: {
maxChars: {
check: "Number",
init: 50,
apply: "__applyMaxChars",
}
},

members: {
__save: null,
_createChildControlImpl: function(id) {
let control;
switch (id) {
case "main-layout":
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(10));
this.add(control);
break;
case "text-field":
control = new qx.ui.form.TextField().set({
placeholder: this.tr("Type text"),
allowGrowX: true
});
this.getChildControl("main-layout").add(control, {
flex: 1
});
break;
case "save-button":
control = new qx.ui.form.Button(this.tr("Save")).set({
appearance: "form-button",
padding: [1, 5]
});
this.getChildControl("main-layout").add(control);
break;
case "subtitle":
control = new qx.ui.basic.Label().set({
font: "text-12"
});
this.add(control);
break;
}
return control || this.base(arguments, id);
},

__populateNodeLabelEditor: function(oldLabel, labelWidth) {
const nodeLabelEditor = new qx.ui.container.Composite(new qx.ui.layout.HBox(10));

// Create a text field in which to edit the data
const labelEditor = new qx.ui.form.TextField(oldLabel).set({
placeholder: this.tr("Type text"),
allowGrowX: true,
minWidth: labelWidth
const textField = this.getChildControl("text-field").set({
value: oldLabel,
minWidth: labelWidth,
});
nodeLabelEditor.add(labelEditor, {
flex: 1
});

this.addListener("appear", e => {
labelEditor.focus();
if (labelEditor.getValue()) {
labelEditor.setTextSelection(0, labelEditor.getValue().length);
}
}, this);

// Create the "Save" button to close the cell editor
const save = this.__save = new qx.ui.form.Button(this.tr("Save"));
save.set({
appearance: "form-button",
padding: [1, 5]
});
save.addListener("execute", e => {
const newLabel = labelEditor.getValue();
const saveButton = this.getChildControl("save-button");
saveButton.addListener("execute", () => {
const newLabel = textField.getValue();
const data = {
newLabel
};
this.fireDataEvent("labelChanged", data);
}, this);
nodeLabelEditor.add(save);

this.add(nodeLabelEditor);
this.addListener("appear", () => {
textField.focus();
if (textField.getValue()) {
textField.setTextSelection(0, textField.getValue().length);
}
}, this);
},

__applyMaxChars: function(value) {
this.getChildControl("text-field").setMaxLength(value);

this.__addSubtitle(this.tr("%1 characters max", value));
},

__addSubtitle: function(subtitleLabel) {
if (subtitleLabel) {
const subtitle = new qx.ui.basic.Label(subtitleLabel).set({
font: "text-12"
});
this.add(subtitle);
__addSubtitle: function(subtitleText) {
if (subtitleText) {
this.getChildControl("subtitle").setValue(subtitleText);
}
},

__attachEventHandlers: function() {
let command = new qx.ui.command.Command("Enter");
command.addListener("execute", e => {
this.__save.execute();
command.addListener("execute", () => {
this.getChildControl("save-button").execute();
command.dispose();
command = null;
});

let commandEsc = new qx.ui.command.Command("Esc");
commandEsc.addListener("execute", e => {
commandEsc.addListener("execute", () => {
this.close();
commandEsc.dispose();
commandEsc = null;
Expand Down
Loading