Skip to content

Commit acb07bc

Browse files
committed
make it compact
1 parent f537542 commit acb07bc

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

services/static-webserver/client/source/class/osparc/conversation/AddMessage.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ qx.Class.define("osparc.conversation.AddMessage", {
9090
e.preventDefault();
9191
}
9292
}, this);
93-
control.getChildControl("buttons").exclude();
93+
control.setCompact(true);
9494
control.getChildControl("text-area").getContentElement().setStyles({
9595
"border-top-right-radius": "0px", // no roundness there to match the arrow button
9696
});
97+
// make it more compact
9798
this.getChildControl("add-comment-layout").add(control, {
9899
flex: 1
99100
});
@@ -102,7 +103,8 @@ qx.Class.define("osparc.conversation.AddMessage", {
102103
control = new qx.ui.form.Button(null, "@FontAwesome5Solid/arrow-up/16").set({
103104
backgroundColor: "input_background",
104105
allowGrowX: false,
105-
alignX: "right"
106+
alignX: "right",
107+
alignY: "middle",
106108
});
107109
control.getContentElement().setStyles({
108110
"border-bottom": "1px solid " + qx.theme.manager.Color.getInstance().resolve("default-button-active"),
@@ -161,9 +163,6 @@ qx.Class.define("osparc.conversation.AddMessage", {
161163
// edit mode
162164
const commentField = this.getChildControl("comment-field");
163165
commentField.setText(message["content"]);
164-
165-
const addMessageButton = this.getChildControl("add-comment-button");
166-
addMessageButton.setLabel(this.tr("Edit message"));
167166
}
168167
},
169168

services/static-webserver/client/source/class/osparc/editor/MarkdownEditor.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ qx.Class.define("osparc.editor.MarkdownEditor", {
4242
});
4343
},
4444

45+
properties: {
46+
compact: {
47+
check: "Boolean",
48+
init: null,
49+
apply: "__applyCompact"
50+
}
51+
},
52+
4553
members: {
4654
_createChildControlImpl: function(id) {
4755
let control;
@@ -69,6 +77,12 @@ qx.Class.define("osparc.editor.MarkdownEditor", {
6977
}
7078
}
7179
return control || this.base(arguments, id);
72-
}
80+
},
81+
82+
__applyCompact: function(value) {
83+
this.getChildControl("buttons").setVisibility(value ? "excluded" : "visible");
84+
this.getChildControl("tabs").getChildControl("bar").setVisibility(value ? "excluded" : "visible");
85+
this.getChildControl("subtitle").setVisibility(value ? "excluded" : "visible");
86+
},
7387
}
7488
});

services/static-webserver/client/source/class/osparc/support/Conversation.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ qx.Class.define("osparc.support.Conversation", {
105105
this.bind("conversation", control, "conversationId", {
106106
converter: conversation => conversation ? conversation.getConversationId() : null
107107
});
108-
// make it more compact
109-
control.getChildControl("comment-field").getChildControl("tabs").getChildControl("bar").exclude();
110-
control.getChildControl("comment-field").getChildControl("subtitle").exclude();
111108
this._addAt(control, 4);
112109
break;
113110
case "share-project-layout":

0 commit comments

Comments
 (0)