Skip to content

UI/UX: Dashboard Cleanup, Follow-Up I #1497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 47 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d79612f
openStudyLink gets timeout as parameter
odeimaiz Apr 24, 2020
87c1317
minor
odeimaiz Apr 24, 2020
4285fa4
upgrade theme contrib + include OSparcPortal theme
odeimaiz Apr 24, 2020
b6a82b2
Merge branch 'master' into feature/ui-ux
odeimaiz Apr 28, 2020
6ccee76
Merge branch 'feature/ui-ux' of github.com:odeimaiz/osparc-simcore in…
odeimaiz Apr 28, 2020
b1024ed
Merge branch 'master' into feature/ui-ux
odeimaiz Apr 29, 2020
5d1d776
Merge branch 'feature/ui-ux' of github.com:odeimaiz/osparc-simcore in…
odeimaiz Apr 29, 2020
ae8edf5
minor
odeimaiz Apr 29, 2020
6dbd86f
Title in one line and cropped. Tooltip if needed
odeimaiz Apr 29, 2020
fe1d380
Title in one line and cropped. Tooltip if needed (2)
odeimaiz Apr 29, 2020
e161acb
Merge branch 'master' into feature/ui-ux
odeimaiz Apr 30, 2020
eafb9ef
Merge branch 'feature/ui-ux' of github.com:odeimaiz/osparc-simcore in…
odeimaiz Apr 30, 2020
81529a9
Fixed always present iFrame
odeimaiz Apr 30, 2020
8be7a8c
@pcrespov fixes devel
odeimaiz Apr 30, 2020
8acf9dd
minor
odeimaiz Apr 30, 2020
db4639a
Do not upper limit sidePanel's width
odeimaiz Apr 30, 2020
b1d5aaf
Merge branch 'master' into feature/ui-ux
odeimaiz May 7, 2020
12fdd7e
No Portal theme for now
odeimaiz May 7, 2020
033d64c
Fix export setEnabled
odeimaiz May 7, 2020
6efe138
Fixed always present iFrame
odeimaiz May 7, 2020
cab9ad8
Only TESTERs can crud templates
odeimaiz May 7, 2020
68c918e
prjOwner contains email again
odeimaiz May 7, 2020
d434f8b
Merge branch 'master' into feature/ui-ux
odeimaiz May 11, 2020
a334070
minor
odeimaiz May 11, 2020
a4d9d2e
minor fix
odeimaiz May 11, 2020
83634eb
contentPaddingLeft set to 0 in Dashboard
odeimaiz May 11, 2020
676c1ed
Smaller menu button on study sheet (aligning)
odeimaiz May 11, 2020
bb0bafc
Create New Study -> Empty Study
odeimaiz May 11, 2020
c9e48c0
use File related icons in study sheets
odeimaiz May 11, 2020
f739b79
Merge branch 'master' into feature/ui-ux
odeimaiz May 11, 2020
c3828a0
more padding
odeimaiz May 11, 2020
a8b1503
tags go above the icon
odeimaiz May 12, 2020
1573a44
Merge branch 'master' into feature/ui-ux
odeimaiz May 13, 2020
24ca44d
cleanup
odeimaiz May 13, 2020
a67ab57
minor
odeimaiz May 13, 2020
3f2a131
renaming
odeimaiz May 13, 2020
b9b2585
shared-creator merged
odeimaiz May 13, 2020
a76c43b
minor
odeimaiz May 13, 2020
7fe81e3
minor
odeimaiz May 13, 2020
b87b030
Build layout qooxdoo style
odeimaiz May 13, 2020
67f5ad1
Build layout qooxdoo style II
odeimaiz May 13, 2020
1a5a890
Build layout qooxdoo style III
odeimaiz May 13, 2020
57533da
Build layout qooxdoo style IV
odeimaiz May 13, 2020
a9a7206
arrow added to Dashboard button
odeimaiz May 13, 2020
e85d5df
minor
odeimaiz May 13, 2020
25fc963
minor
odeimaiz May 13, 2020
620c3ff
minor
odeimaiz May 13, 2020
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 @@ -99,8 +99,11 @@ qx.Class.define("osparc.component.filter.TagsFilter", {
},

_getMenuButtons: function() {
return this._dropdown.getMenu().getChildren()
.filter(child => child instanceof qx.ui.menu.Button);
const menu = this._dropdown.getMenu();
if (menu) {
return menu.getChildren().filter(child => child instanceof qx.ui.menu.Button);
}
return [];
},

_getActiveMenuButtons: function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ qx.Class.define("osparc.dashboard.Dashboard", {
construct: function() {
this.base(arguments);

this.setBarPosition("top");
this.set({
contentPaddingLeft: 0,
barPosition: "top"
});

osparc.wrapper.JsonDiffPatch.getInstance().init();
osparc.wrapper.JsonTreeViewer.getInstance().init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ qx.Class.define("osparc.dashboard.ServiceBrowser", {
const store = osparc.store.Store.getInstance();
store.getServicesDAGs(true)
.then(services => {
// Do not validate if are not taking actions
// this.__nodeCheck(services);
this._removeAll();
this.__createServicesLayout();
this.__populateList(false);
Expand Down Expand Up @@ -416,25 +414,6 @@ qx.Class.define("osparc.dashboard.ServiceBrowser", {
.finally(() => {
this.__deleteServiceBtn.setFetching(false);
});
},

__nodeCheck: function(services) {
/** a little ajv test */
let nodeCheck = new qx.io.request.Xhr("/resource/osparc/node-meta-v0.0.1.json");
nodeCheck.addListener("success", e => {
let data = e.getTarget().getResponse();
try {
let ajv = new osparc.wrapper.Ajv(data);
for (const srvId in services) {
const service = services[srvId];
let check = ajv.validate(service);
console.log("services validation result " + service.key + ":", check);
}
} catch (err) {
console.error(err);
}
}, this);
nodeCheck.send();
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
creator: study.prjOwner ? study.prjOwner : null,
accessRights: study.accessRights ? study.accessRights : null,
lastChangeDate: study.lastChangeDate ? new Date(study.lastChangeDate) : null,
icon: study.thumbnail || "@FontAwesome5Solid/flask/50",
icon: study.thumbnail || isTemplate ? "@FontAwesome5Solid/copy/50" : "@FontAwesome5Solid/file-alt/50",
tags
});
const menu = this.__getStudyItemMenu(item, study, isTemplate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonBase", {
},

statics: {
ITEM_WIDTH: 200,
ITEM_HEIGHT: 200,
PADDING: 8,
ITEM_WIDTH: 190,
ITEM_HEIGHT: 220,
PADDING: 10,
SPACING: 12
},

Expand Down Expand Up @@ -87,34 +87,45 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonBase", {
control = new qx.ui.basic.Label().set({
margin: [5, 0],
font: "title-14",
maxWidth: this.self().ITEM_WIDTH - 2*this.self().PADDING - 30,
maxWidth: this.self().ITEM_WIDTH - 2*this.self().PADDING - osparc.dashboard.StudyBrowserButtonItem.MENU_BTN_WIDTH,
breakWithinWords: true
});
this._mainLayout.addAt(control, 0);
break;
case "desc1":
case "description":
control = new osparc.ui.markdown.Markdown().set({
font: "text-13",
maxHeight: 32,
anonymous: true
maxHeight: 30
});
this._mainLayout.addAt(control, 1);
break;
case "desc2":
case "shared-creator":
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(6));
this._mainLayout.addAt(control, 2);
break;
case "shared": {
control = new qx.ui.basic.Image();
const sharedCreatorLayout = this.getChildControl("shared-creator");
sharedCreatorLayout.addAt(control, 0);
break;
}
case "creator": {
control = new qx.ui.basic.Label().set({
font: "text-13",
allowGrowY: false,
anonymous: true
allowGrowY: false
});
const sharedCreatorLayout = this.getChildControl("shared-creator");
sharedCreatorLayout.addAt(control, 1, {
flex: 1
});
this._mainLayout.addAt(control, 2);
break;
case "shared":
control = new qx.ui.basic.Image();
}
case "tags":
control = new qx.ui.container.Composite(new qx.ui.layout.Flow(5, 3));
this._mainLayout.addAt(control, 3);
break;
case "icon": {
control = new qx.ui.basic.Image().set({
anonymous: true,
scale: true,
allowStretchX: true,
allowStretchY: true,
Expand All @@ -123,7 +134,9 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonBase", {
allowGrowX: true,
allowGrowY: true
});
const iconContainer = new qx.ui.container.Composite(new qx.ui.layout.VBox());
const iconContainer = new qx.ui.container.Composite(new qx.ui.layout.VBox()).set({
anonymous: true
});
iconContainer.add(new qx.ui.core.Spacer(), {
flex: 2
});
Expand All @@ -139,6 +152,9 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonBase", {
break;
}
}
control.set({
anonymous: true
});
return control || this.base(arguments, id);
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonItem", {

statics: {
MENU_BTN_Z: 20,
MENU_BTN_WIDTH: 25,
SHARED_ME: "@FontAwesome5Solid/user/14",
SHARED_ORGS: "@FontAwesome5Solid/users/14",
SHARED_ALL: "@FontAwesome5Solid/globe/14"
Expand All @@ -127,16 +128,16 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonItem", {
switch (id) {
case "menu-button":
control = new qx.ui.form.MenuButton().set({
width: 30,
height: 30,
icon: "@FontAwesome5Solid/ellipsis-v/16",
width: this.self().MENU_BTN_WIDTH,
height: this.self().MENU_BTN_WIDTH,
icon: "@FontAwesome5Solid/ellipsis-v/14",
zIndex: this.self().MENU_BTN_Z,
focusable: false
});
osparc.utils.Utils.setIdToWidget(control, "studyItemMenuButton");
this._add(control, {
top: 0,
right: 0
top: -2,
right: -2
});
break;
case "tick-unselected":
Expand All @@ -157,10 +158,6 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonItem", {
right: 4
});
break;
case "tags":
control = new qx.ui.container.Composite(new qx.ui.layout.Flow(5, 3));
this._mainLayout.addAt(control, 4);
break;
}

return control || this.base(arguments, id);
Expand Down Expand Up @@ -193,14 +190,14 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonItem", {

_applyStudyDescription: function(value, old) {
if (value !== "" && this.getIsTemplate()) {
const label = this.getChildControl("desc1");
const label = this.getChildControl("description");
label.setValue(value);
}
},

_applyLastChangeDate: function(value, old) {
if (value && !this.getIsTemplate()) {
const label = this.getChildControl("desc1");
const label = this.getChildControl("description");
let dateStr = null;
if (value.getDate() === (new Date()).getDate()) {
dateStr = this.tr("Today");
Expand All @@ -216,7 +213,7 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonItem", {

_applyCreator: function(value, old) {
if (this.getIsTemplate()) {
const label = this.getChildControl("desc2");
const label = this.getChildControl("creator");
label.setValue(value);
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonNew", {
members: {
__buildLayout: function() {
const title = this.getChildControl("title");
title.setValue(this.tr("Create New Study"));
title.setValue(this.tr("Empty Study"));

const desc1 = this.getChildControl("desc1");
const desc1 = this.getChildControl("description");
desc1.setValue(this.tr("Start with a empty study").toString());

this.setIcon("@FontAwesome5Solid/plus-circle/64");
this.setIcon("@FontAwesome5Solid/file/50");
},

_onToggleChange: function(e) {
Expand All @@ -52,7 +52,7 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonNew", {
if (data.text) {
const checks = [
this.getChildControl("title").getValue().toString(),
this.getChildControl("desc1").getValue().toString()
this.getChildControl("description").getValue().toString()
];
if (checks.filter(label => label.toLowerCase().trim().includes(data.text)).length == 0) {
return true;
Expand Down
Loading