Skip to content
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
16495db
I can create conversation only if I have write access
odeimaiz Jun 27, 2025
d85019a
catch errors
odeimaiz Jun 27, 2025
ef1cb97
definitions
odeimaiz Jun 27, 2025
e07b039
rename and delete
odeimaiz Jun 27, 2025
f38f4ee
fix
odeimaiz Jun 27, 2025
3255d3f
startConversation
odeimaiz Jun 27, 2025
ca5905c
Types
odeimaiz Jun 27, 2025
7343fd0
minor
odeimaiz Jun 27, 2025
42fe339
minor
odeimaiz Jun 27, 2025
643eeeb
minor
odeimaiz Jun 27, 2025
6c416c4
Merge branch 'master' into feature/localized-chats
odeimaiz Jun 30, 2025
975a0ec
Merge branch 'feature/localized-chats' of github.com:odeimaiz/osparc-…
odeimaiz Jun 30, 2025
7aea0a3
refactor
odeimaiz Jun 30, 2025
87b2897
new type
odeimaiz Jun 30, 2025
c29dba7
refactor
odeimaiz Jun 30, 2025
9d63145
refactor
odeimaiz Jun 30, 2025
41012f5
Add conversation
odeimaiz Jun 30, 2025
5a946a4
create conversation logic
odeimaiz Jun 30, 2025
9918b37
AnnotationUI
odeimaiz Jun 30, 2025
f89623e
add annotationUI
odeimaiz Jun 30, 2025
b2e6fe1
openapi-specs
odeimaiz Jun 30, 2025
2894e7d
conversationId attributes
odeimaiz Jun 30, 2025
c3f81f0
save conversationId
odeimaiz Jun 30, 2025
42db889
nullable color
odeimaiz Jun 30, 2025
37bc778
minor
odeimaiz Jun 30, 2025
365f3ab
non filterable
odeimaiz Jun 30, 2025
4ade7c8
minor
odeimaiz Jun 30, 2025
a7405b7
unused
odeimaiz Jun 30, 2025
d8eff20
more progress
odeimaiz Jun 30, 2025
acd592a
drawAnnotationConversation
odeimaiz Jun 30, 2025
ed3bda5
Merge branch 'master' into feature/localized-chats
odeimaiz Jul 1, 2025
6045b97
Merge branch 'feature/localized-chats' of github.com:odeimaiz/osparc-…
odeimaiz Jul 1, 2025
cea2448
pass conversationId
odeimaiz Jul 1, 2025
0480b49
prettify conversation
odeimaiz Jul 1, 2025
d54549b
correctly placed
odeimaiz Jul 1, 2025
49a011f
simpler
odeimaiz Jul 1, 2025
d1b1353
less
odeimaiz Jul 1, 2025
6014058
propagate
odeimaiz Jul 1, 2025
239e69d
Merge branch 'master' into feature/localized-chats
odeimaiz Jul 1, 2025
04ae645
Merge branch 'feature/localized-chats' of github.com:odeimaiz/osparc-…
odeimaiz Jul 1, 2025
53894dc
defaults
odeimaiz Jul 1, 2025
7e692fc
minor
odeimaiz Jul 1, 2025
d2fb93b
minor
odeimaiz Jul 1, 2025
c625191
open conversations on click
odeimaiz Jul 1, 2025
75a054a
fix
odeimaiz Jul 1, 2025
4020c3a
truncate text with ellipsis
odeimaiz Jul 1, 2025
19c984d
minor
odeimaiz Jul 1, 2025
6457169
minor
odeimaiz Jul 1, 2025
9b90ccb
Merge branch 'master' into feature/localized-chats
odeimaiz Jul 2, 2025
80367f6
Merge branch 'feature/localized-chats' of github.com:odeimaiz/osparc-…
odeimaiz Jul 2, 2025
6821022
getRepresentationPosition bubble
odeimaiz Jul 2, 2025
8799e63
move conversations
odeimaiz Jul 2, 2025
7bebb3c
click on conversation working
odeimaiz Jul 2, 2025
acdad37
Merge branch 'master' into feature/localized-chats
odeimaiz Jul 2, 2025
f4c562a
Merge branch 'feature/localized-chats' of github.com:odeimaiz/osparc-…
odeimaiz Jul 2, 2025
98a3d79
minor
odeimaiz Jul 2, 2025
e963e6b
Conversations store
odeimaiz Jul 2, 2025
9653399
minor
odeimaiz Jul 2, 2025
45b1e27
getConversations to store
odeimaiz Jul 2, 2025
989c10c
Merge branch 'master' into feature/localized-chats
odeimaiz Jul 3, 2025
42d2e07
Merge branch 'feature/localized-chats' of github.com:odeimaiz/osparc-…
odeimaiz Jul 3, 2025
3d49266
Renaming working
odeimaiz Jul 3, 2025
f8a904c
conversationDeleted
odeimaiz Jul 3, 2025
642232f
no caching
odeimaiz Jul 3, 2025
a8c5ee6
minor
odeimaiz Jul 3, 2025
cce8c8b
removeAnnotation
odeimaiz Jul 3, 2025
af3dc50
conversationDeleted
odeimaiz Jul 3, 2025
14b7954
Rely on Store
odeimaiz Jul 3, 2025
f8c6b86
minor
odeimaiz Jul 3, 2025
23e74b9
minor
odeimaiz Jul 3, 2025
400a13c
refactor
odeimaiz Jul 3, 2025
cc6f505
more refactoring!
odeimaiz Jul 3, 2025
6283e34
not needed
odeimaiz Jul 3, 2025
2c1c051
refactor
odeimaiz Jul 3, 2025
21b9009
Check if conversation still exists, if not, ask to remove annotation
odeimaiz Jul 3, 2025
4b8b407
Merge branch 'master' into feature/localized-chats
odeimaiz Jul 3, 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 @@ -146,7 +146,7 @@ qx.Class.define("osparc.conversation.AddMessage", {
this.__postMessage();
} else {
// create new conversation first
osparc.study.Conversations.addConversation(this.__studyData["uuid"])
osparc.store.Conversations.getInstance().addConversation(this.__studyData["uuid"])
.then(data => {
this.__conversationId = data["conversationId"];
this.__postMessage();
Expand Down Expand Up @@ -213,7 +213,7 @@ qx.Class.define("osparc.conversation.AddMessage", {
this.__postNotify(userGid);
} else {
// create new conversation first
osparc.study.Conversations.addConversation(this.__studyData["uuid"])
osparc.store.Conversations.getInstance().addConversation(this.__studyData["uuid"])
.then(data => {
this.__conversationId = data["conversationId"];
this.__postNotify(userGid);
Expand All @@ -225,7 +225,7 @@ qx.Class.define("osparc.conversation.AddMessage", {
const commentField = this.getChildControl("comment-field");
const content = commentField.getChildControl("text-area").getValue();
if (content) {
osparc.study.Conversations.addMessage(this.__studyData["uuid"], this.__conversationId, content)
osparc.store.Conversations.getInstance().addMessage(this.__studyData["uuid"], this.__conversationId, content)
.then(data => {
this.fireDataEvent("messageAdded", data);
commentField.getChildControl("text-area").setValue("");
Expand All @@ -237,7 +237,7 @@ qx.Class.define("osparc.conversation.AddMessage", {
const commentField = this.getChildControl("comment-field");
const content = commentField.getChildControl("text-area").getValue();
if (content) {
osparc.study.Conversations.editMessage(this.__studyData["uuid"], this.__conversationId, this.__message["messageId"], content)
osparc.store.Conversations.getInstance().editMessage(this.__studyData["uuid"], this.__conversationId, this.__message["messageId"], content)
.then(data => {
this.fireDataEvent("messageUpdated", data);
commentField.getChildControl("text-area").setValue("");
Expand All @@ -247,7 +247,7 @@ qx.Class.define("osparc.conversation.AddMessage", {

__postNotify: function(userGid) {
if (userGid) {
osparc.study.Conversations.notifyUser(this.__studyData["uuid"], this.__conversationId, userGid)
osparc.store.Conversations.getInstance().notifyUser(this.__studyData["uuid"], this.__conversationId, userGid)
.then(data => {
this.fireDataEvent("messageAdded", data);
const potentialCollaborators = osparc.store.Groups.getInstance().getPotentialCollaborators();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,19 @@ qx.Class.define("osparc.conversation.Conversation", {
};
const renameButton = new qx.ui.form.Button(null, "@FontAwesome5Solid/pencil-alt/10").set({
...buttonsAesthetics,
visibility: osparc.data.model.Study.canIWrite(this.__studyData["accessRights"]) ? "visible" : "excluded",
});
renameButton.addListener("execute", () => {
const titleEditor = new osparc.widget.Renamer(tabButton.getLabel());
titleEditor.addListener("labelChanged", e => {
titleEditor.close();
const newLabel = e.getData()["newLabel"];
if (this.getConversationId()) {
osparc.study.Conversations.renameConversation(this.__studyData["uuid"], this.getConversationId(), newLabel)
osparc.store.Conversations.getInstance().renameConversation(this.__studyData["uuid"], this.getConversationId(), newLabel)
.then(() => this.renameConversation(newLabel));
} else {
// create new conversation first
osparc.study.Conversations.addConversation(this.__studyData["uuid"], newLabel)
osparc.store.Conversations.getInstance().addConversation(this.__studyData["uuid"], newLabel)
.then(data => {
this.setConversationId(data["conversationId"]);
this.getChildControl("button").setLabel(newLabel);
Expand All @@ -112,10 +113,11 @@ qx.Class.define("osparc.conversation.Conversation", {
const closeButton = new qx.ui.form.Button(null, "@FontAwesome5Solid/times/12").set({
...buttonsAesthetics,
paddingLeft: 4, // adds spacing between buttons
visibility: osparc.data.model.Study.canIWrite(this.__studyData["accessRights"]) ? "visible" : "excluded",
});
closeButton.addListener("execute", () => {
const deleteConversation = () => {
osparc.study.Conversations.deleteConversation(this.__studyData["uuid"], this.getConversationId())
osparc.store.Conversations.getInstance().deleteConversation(this.__studyData["uuid"], this.getConversationId())
.then(() => this.fireEvent("conversationDeleted"));
}
if (this.__messagesList.getChildren().length === 0) {
Expand Down Expand Up @@ -166,18 +168,18 @@ qx.Class.define("osparc.conversation.Conversation", {
this.__loadMoreMessages.addListener("execute", () => this.__reloadMessages(false));
this._add(this.__loadMoreMessages);

if (osparc.data.model.Study.canIWrite(this.__studyData["accessRights"])) {
const addMessages = new osparc.conversation.AddMessage(this.__studyData, this.getConversationId());
addMessages.setPaddingLeft(10);
addMessages.addListener("messageAdded", e => {
const data = e.getData();
if (data["conversationId"]) {
this.setConversationId(data["conversationId"]);
this.addMessage(data);
}
});
this._add(addMessages);
}
const addMessages = new osparc.conversation.AddMessage(this.__studyData, this.getConversationId()).set({
enabled: osparc.data.model.Study.canIWrite(this.__studyData["accessRights"]),
paddingLeft: 10,
});
addMessages.addListener("messageAdded", e => {
const data = e.getData();
if (data["conversationId"]) {
this.setConversationId(data["conversationId"]);
this.addMessage(data);
}
});
this._add(addMessages);
},

__getNextRequest: function() {
Expand All @@ -197,7 +199,8 @@ qx.Class.define("osparc.conversation.Conversation", {
const options = {
resolveWResponse: true
};
return osparc.data.Resources.fetch("conversations", "getMessagesPage", params, options);
return osparc.data.Resources.fetch("conversations", "getMessagesPage", params, options)
.catch(err => osparc.FlashMessenger.logError(err));
},

__reloadMessages: function(removeMessages = true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ qx.Class.define("osparc.conversation.MessageUI", {
win.open();
win.addListener("close", () => {
if (win.getConfirmed()) {
osparc.study.Conversations.deleteMessage(message)
osparc.store.Conversations.getInstance().deleteMessage(message)
.then(() => this.fireDataEvent("messageDeleted", message))
.catch(err => osparc.FlashMessenger.logError(err));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ qx.Class.define("osparc.data.Resources", {
}
},
"conversations": {
useCache: false,
useCache: false, // It has its own cache handler
endpoints: {
addConversation: {
method: "POST",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -873,33 +873,42 @@ qx.Class.define("osparc.desktop.WorkbenchView", {

__getAnnotationsSection: function() {
const annotationsSection = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
annotationsSection.add(new qx.ui.basic.Label(this.tr("Annotations")).set({
annotationsSection.add(new qx.ui.basic.Label(this.tr("Add to Workbench")).set({
font: "text-14"
}));

const annotationsButtons = new qx.ui.container.Composite(new qx.ui.layout.HBox(5));
const annotationsButtons = new qx.ui.container.Composite(new qx.ui.layout.Flow(5, 5));
annotationsSection.add(annotationsButtons);

const buttonsHeight = 28;

const addConversationBtn = new qx.ui.form.Button().set({
label: this.tr("Conversation"),
icon: "@FontAwesome5Solid/comment/14",
height: buttonsHeight
});
addConversationBtn.addListener("execute", () => this.__workbenchUI.startConversation(), this);
annotationsButtons.add(addConversationBtn);

const addNoteBtn = new qx.ui.form.Button().set({
label: this.tr("Note"),
icon: "@FontAwesome5Solid/plus/14",
icon: "@FontAwesome5Solid/sticky-note/14",
height: buttonsHeight
});
addNoteBtn.addListener("execute", () => this.__workbenchUI.startAnnotationsNote(), this);
annotationsButtons.add(addNoteBtn);

const addRectBtn = new qx.ui.form.Button().set({
label: this.tr("Rectangle"),
icon: "@FontAwesome5Solid/plus/14",
label: this.tr("Box"),
icon: "@FontAwesome5Regular/square/14",
height: buttonsHeight
});
addRectBtn.addListener("execute", () => this.__workbenchUI.startAnnotationsRect(), this);
annotationsButtons.add(addRectBtn);

const addTextBtn = new qx.ui.form.Button().set({
label: this.tr("Text"),
icon: "@FontAwesome5Solid/plus/14",
icon: "@FontAwesome5Solid/font/14",
height: buttonsHeight
});
addTextBtn.addListener("execute", () => this.__workbenchUI.startAnnotationsText(), this);
Expand Down
Loading
Loading