Skip to content

Breadcrumb Navigation #1902

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 181 commits into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
959f684
'dummy' state property added
odeimaiz Oct 7, 2020
0ccca3d
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 7, 2020
f5aa9fc
refactoring
odeimaiz Oct 7, 2020
a4256cf
make populateTree reusable
odeimaiz Oct 7, 2020
d6a3126
open NodesSlidesTree
odeimaiz Oct 7, 2020
a0a9b49
minor
odeimaiz Oct 8, 2020
0c8766c
refactoring
odeimaiz Oct 8, 2020
dbb7810
minor
odeimaiz Oct 8, 2020
70da840
back to private
odeimaiz Oct 8, 2020
3e02019
reverting
odeimaiz Oct 8, 2020
2669ab7
minor
odeimaiz Oct 8, 2020
ff61978
Move up & down working
odeimaiz Oct 8, 2020
88296ee
showing all buttons
odeimaiz Oct 8, 2020
3f9a06a
cleanup
odeimaiz Oct 8, 2020
fa96d8a
minor
odeimaiz Oct 8, 2020
6cbbfcd
refactoring
odeimaiz Oct 8, 2020
13bb052
Save button added
odeimaiz Oct 8, 2020
7801fca
looking better
odeimaiz Oct 8, 2020
5238cdd
postion calculated
odeimaiz Oct 9, 2020
f213ab5
migration script added
odeimaiz Oct 9, 2020
197d8cc
project model and schemas updated
odeimaiz Oct 9, 2020
f597dc1
project and schemas updated
odeimaiz Oct 9, 2020
b39e278
project and schemas updated
odeimaiz Oct 9, 2020
4e61330
serialize/desirialize node position
odeimaiz Oct 9, 2020
3aa54a3
Update projects.py
odeimaiz Oct 9, 2020
12bff72
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 12, 2020
42775fe
position is not required anymore
odeimaiz Oct 12, 2020
7e562d5
position is not required anymore II
odeimaiz Oct 12, 2020
ecae08c
deserialize position
odeimaiz Oct 12, 2020
3b95da6
position required for ui.workbench and ui.slideShow
odeimaiz Oct 12, 2020
f518489
Serialize slideshow
odeimaiz Oct 12, 2020
9ca6fe9
Slide's position is int
odeimaiz Oct 12, 2020
d52b402
refactoring
odeimaiz Oct 12, 2020
a613546
renamings
odeimaiz Oct 12, 2020
78df3a1
deserialize slideShow
odeimaiz Oct 12, 2020
ae0e374
slideType out
odeimaiz Oct 12, 2020
c8bfaa7
minor
odeimaiz Oct 12, 2020
914a902
slides menu moved to Navigation bar
odeimaiz Oct 12, 2020
9686191
minor
odeimaiz Oct 12, 2020
f19f2db
cleanup
odeimaiz Oct 12, 2020
e0df516
minor
odeimaiz Oct 12, 2020
29fa6ef
refactoring
odeimaiz Oct 12, 2020
19961e9
minor
odeimaiz Oct 12, 2020
40f76c2
towards breadcrumb navigation
odeimaiz Oct 12, 2020
0265a98
more refactoring
odeimaiz Oct 12, 2020
a8817d2
close after save
odeimaiz Oct 12, 2020
8e8f242
typo
odeimaiz Oct 12, 2020
fe0dc94
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 13, 2020
782c116
refactoring
odeimaiz Oct 13, 2020
1b6ddd9
hide inputs/outputs in slideshow
odeimaiz Oct 13, 2020
6191283
allow additionalProperties
odeimaiz Oct 13, 2020
800d053
StudyUI data model created
odeimaiz Oct 13, 2020
5345e6c
NavBar listens to changeCurrentNodeId
odeimaiz Oct 13, 2020
edbced3
more refactoring
odeimaiz Oct 13, 2020
9342a41
minor
odeimaiz Oct 14, 2020
298845b
NavBar buttons, ok
odeimaiz Oct 14, 2020
f3df875
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 14, 2020
bc6c54e
gray out SlidesBtns
odeimaiz Oct 14, 2020
50dc6ef
Slides buttons are radioToolbar
odeimaiz Oct 14, 2020
89a3eed
typo
odeimaiz Oct 14, 2020
a448d9d
minor fixes
odeimaiz Oct 14, 2020
c15d65d
NavigationBar's PageContext is set from MainPage
odeimaiz Oct 14, 2020
806d474
refactoring
odeimaiz Oct 14, 2020
bd5ad4d
minor
odeimaiz Oct 14, 2020
4912341
pageContext added to StudyEditor
odeimaiz Oct 14, 2020
69158c1
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 14, 2020
419dc76
minor
odeimaiz Oct 14, 2020
d278074
minor fix
odeimaiz Oct 14, 2020
91cb465
FilePicker is shown in the nodeView
odeimaiz Oct 14, 2020
2031999
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 14, 2020
1fd974c
minor fix
odeimaiz Oct 14, 2020
5219521
minor
odeimaiz Oct 15, 2020
978d6ec
StudyEditor splitted into WorkbenchView + SlideShowView
odeimaiz Oct 15, 2020
010a5bf
editSlides moved to NodesTree
odeimaiz Oct 15, 2020
8ad929f
first working version
odeimaiz Oct 15, 2020
47774f7
this is looking good
odeimaiz Oct 15, 2020
edfd850
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 15, 2020
9e50218
minor
odeimaiz Oct 15, 2020
8cb65ac
Merge branch 'feature/guided-mode' of github.com:odeimaiz/osparc-simc…
odeimaiz Oct 15, 2020
b5f092b
missed in merge
odeimaiz Oct 16, 2020
cf6c906
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 16, 2020
9cb5b10
Mark Position in Workbench model as depracted
odeimaiz Oct 16, 2020
57d9de4
Merge branch 'feature/guided-mode' of github.com:odeimaiz/osparc-simc…
odeimaiz Oct 16, 2020
80b80bd
Update project-v0.0.1.json
odeimaiz Oct 16, 2020
1fc004d
Mark Position in Workbench model as depracted II
odeimaiz Oct 16, 2020
051a8da
For now, enable slides in only "master" and "dev"
odeimaiz Oct 16, 2020
020229d
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 16, 2020
66af71d
minor
odeimaiz Oct 16, 2020
e93c31e
linting
odeimaiz Oct 16, 2020
548f5d6
Update 27c6a30d7c24_add_ui_in_projects_table.py
odeimaiz Oct 16, 2020
0a77b77
Merge branch 'feature/guided-mode' of github.com:odeimaiz/osparc-simc…
odeimaiz Oct 16, 2020
67473a0
Update NavigationBar.js
odeimaiz Oct 16, 2020
c44ca53
Allow disabling slideshow
odeimaiz Oct 16, 2020
efbdb0b
Start/Stop slides react to model changes
odeimaiz Oct 16, 2020
3864cb5
minor
odeimaiz Oct 16, 2020
f8af107
Working on Optionals
odeimaiz Oct 16, 2020
380c5c3
Working on Optionals II
odeimaiz Oct 16, 2020
c7431d8
Update project-v0.0.1.json
odeimaiz Oct 16, 2020
1758af2
Update project-v0.0.1.json
odeimaiz Oct 16, 2020
7a6e6b0
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 16, 2020
7e81dd5
renaming
odeimaiz Oct 16, 2020
8342351
refactoring
odeimaiz Oct 16, 2020
c4cc3ba
Merge branch 'feature/guided-mode' of github.com:odeimaiz/osparc-simc…
odeimaiz Oct 16, 2020
731ed44
Only study owner can edit slides
odeimaiz Oct 16, 2020
bf7277b
renamings
odeimaiz Oct 16, 2020
f8b40d3
more refactoring
odeimaiz Oct 16, 2020
b1ea51b
state missing from projects
sanderegg Oct 16, 2020
bb31a68
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 19, 2020
7c3f5ca
Merge pull request #74 from sanderegg/fix_project_jsonschema
odeimaiz Oct 19, 2020
4d927c5
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 19, 2020
7b28478
add more info to "startStudy" Event
odeimaiz Oct 19, 2020
3554724
minor
odeimaiz Oct 19, 2020
457d450
Allow starting in slideshow mode
odeimaiz Oct 19, 2020
d38d84b
Merge branch 'feature/guided-mode' of github.com:odeimaiz/osparc-simc…
odeimaiz Oct 19, 2020
371a6a6
"slides" -> "slideshow"
odeimaiz Oct 19, 2020
bfefaef
minor
odeimaiz Oct 19, 2020
b0bc06e
ui field added to fixture projects
odeimaiz Oct 19, 2020
ccbfd6c
Update sleepers_project_template_sql.csv
odeimaiz Oct 19, 2020
5d6661f
Merge branch 'master' into feature/guided-mode
odeimaiz Oct 20, 2020
4764871
Visuals
odeimaiz Oct 20, 2020
7eded82
start in workbench mode by default
odeimaiz Oct 20, 2020
4ac7151
more uniform buttons
odeimaiz Oct 20, 2020
3840575
maxWidth + tooltip for Navigation buttons
odeimaiz Oct 20, 2020
ed6eab7
cropping node labels
odeimaiz Oct 20, 2020
f7fa881
Added visuals
ignapas Oct 20, 2020
1d56af2
Merge pull request #75 from ignapas/odeimaiz-feature/guided-mode
odeimaiz Oct 20, 2020
7adbede
clean up
odeimaiz Oct 20, 2020
aa3f568
eslint
odeimaiz Oct 20, 2020
865e09d
crop label also in NodeTree
odeimaiz Oct 20, 2020
9bc8632
Update NavigationBar.js
odeimaiz Oct 20, 2020
6bbf8ce
clean up SvgWidget
odeimaiz Oct 20, 2020
64260e5
minor
odeimaiz Oct 20, 2020
472897d
minor renaming
odeimaiz Oct 20, 2020
a7338ea
renaming
odeimaiz Oct 20, 2020
6a323d7
drawPolygon, drawLine
odeimaiz Oct 20, 2020
072247e
NavigationBar uses BreadcrumbSplitter slash
odeimaiz Oct 20, 2020
6d2554c
Update BreadcrumbSplitter.js
odeimaiz Oct 20, 2020
a733b9b
arrow svg widget
odeimaiz Oct 20, 2020
16f1f44
Looking better
odeimaiz Oct 20, 2020
e048a3e
minor
odeimaiz Oct 20, 2020
42f5214
Typo: Previuos -> Previous
odeimaiz Oct 26, 2020
aace8af
Merge branch 'master' into feature/breadcrumbs
odeimaiz Oct 26, 2020
e711e3d
Update WorkbenchView.js
odeimaiz Oct 26, 2020
1ed1bee
Update Edge.js
odeimaiz Oct 26, 2020
432a69b
Update NavigationBar.js
odeimaiz Oct 26, 2020
91af634
Update NavigationBar.js
odeimaiz Oct 26, 2020
c5bbb47
minor
odeimaiz Oct 26, 2020
d559646
buttonsToBreadcrumb
odeimaiz Oct 26, 2020
b85594b
refactoring
odeimaiz Oct 26, 2020
e28569a
Update NavigationBar.js
odeimaiz Oct 26, 2020
4de0e43
Merge branch 'master' into feature/breadcrumbs
odeimaiz Oct 26, 2020
007f69b
filling Breadcrumbs
odeimaiz Oct 26, 2020
88ed023
Merge branch 'feature/breadcrumbs' of github.com:odeimaiz/osparc-simc…
odeimaiz Oct 26, 2020
f091cb9
renaming
odeimaiz Oct 26, 2020
a4227ba
minor
odeimaiz Oct 26, 2020
f589ea0
minor
odeimaiz Oct 26, 2020
7146d4b
Merge branch 'master' into feature/breadcrumbs
odeimaiz Oct 26, 2020
0d12b52
Merge branch 'master' into feature/breadcrumbs
odeimaiz Oct 27, 2020
43dd4fa
Update StudyUI.js
odeimaiz Oct 27, 2020
a1cb96a
typo
odeimaiz Oct 27, 2020
ee1098b
scroll added to "navigation-nodes-path-container"
odeimaiz Oct 27, 2020
9fc4b59
minor
odeimaiz Oct 27, 2020
9fe90a4
BreadcrumbNavigation widget created
odeimaiz Oct 27, 2020
c93a26b
Update NavigationBar.js
odeimaiz Oct 27, 2020
33beaa5
Listen to decorator changes
odeimaiz Oct 27, 2020
657507a
Remove hardcoded widths and heights
odeimaiz Oct 27, 2020
aa9e58c
slash and arrow filled with text color
odeimaiz Oct 27, 2020
191daa2
minor fix
odeimaiz Oct 27, 2020
59e7aa5
minor
odeimaiz Oct 27, 2020
700d816
Merge branch 'master' into feature/breadcrumbs
odeimaiz Oct 27, 2020
4fe7083
Merge branch 'feature/breadcrumbs' of github.com:odeimaiz/osparc-simc…
odeimaiz Oct 27, 2020
6827633
FilePicker in SlideShow fixed
odeimaiz Oct 27, 2020
72884cb
Merge branch 'master' into feature/breadcrumbs
odeimaiz Oct 27, 2020
d4e65fc
New TI Treatment planning logo
odeimaiz Oct 27, 2020
dcf488b
Merge branch 'feature/breadcrumbs' of github.com:odeimaiz/osparc-simc…
odeimaiz Oct 27, 2020
a5944a7
Merge branch 'master' into feature/breadcrumbs
odeimaiz Oct 28, 2020
cc1dc3e
minor
odeimaiz Oct 28, 2020
b1430de
SlideShowView also supports groups + refactoring
odeimaiz Oct 28, 2020
6c6b025
Merge branch 'feature/breadcrumbs' of github.com:odeimaiz/osparc-simc…
odeimaiz Oct 28, 2020
11dd267
GroupNode asks innernodes if there is a connection
odeimaiz Oct 28, 2020
8283ac0
Bring back Ungroup button
odeimaiz Oct 28, 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
2 changes: 1 addition & 1 deletion services/web/client/source/class/osparc/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ qx.Class.define("osparc.Application", {
window.localStorage.getItem("themeName") !== qx.theme.manager.Meta.getInstance().getTheme().name) {
const preferredTheme = qx.Theme.getByName(window.localStorage.getItem("themeName"));
const themes = qx.Theme.getAll();
if (Object.keys(themes).includes(preferredTheme)) {
if (preferredTheme && Object.keys(themes).includes(preferredTheme.name)) {
qx.theme.manager.Meta.getInstance().setTheme(preferredTheme);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@
qx.Class.define("osparc.component.node.FilePickerNodeView", {
extend: osparc.component.node.BaseNodeView,

/**
* @param node {osparc.data.model.Node} Node owning the widget
*/
construct: function(node) {
this.base(arguments);

this.set({
node
});
},

members: {
__filePicker: null,

Expand All @@ -58,11 +47,18 @@ qx.Class.define("osparc.component.node.FilePickerNodeView", {

// overridden
_applyNode: function(node) {
return;
if (!node.isFilePicker()) {
console.error("Only file picker nodes are supported");
}
},

__buildMyLayout: function() {
const filePicker = this.__filePicker = new osparc.file.FilePicker(this.getNode());
const node = this.getNode();
if (!node) {
return;
}

const filePicker = this.__filePicker = new osparc.file.FilePicker(node);
filePicker.buildLayout();
filePicker.init();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
/* ************************************************************************

osparc - the simcore frontend

https://osparc.io

Copyright:
2020 IT'IS Foundation, https://itis.swiss

License:
MIT: https://opensource.org/licenses/MIT

Authors:
* Odei Maiz (odeimaiz)

************************************************************************ */

/**
*
*/

qx.Class.define("osparc.component.widget.BreadcrumbNavigation", {
extend: qx.ui.core.Widget,

construct: function() {
this.base(arguments);

this._setLayout(new qx.ui.layout.HBox(0).set({
alignY: "middle"
}));
},

events: {
"nodeSelected": "qx.event.type.Data"
},

statics: {
BUTTON_OPTIONS: {
font: "text-14",
allowGrowY: false,
minWidth: 32,
minHeight: 32
}
},

members: {
populateButtons: function(nodesIds = [], shape = "slash") {
const btns = [];
if (shape === "slash") {
for (let i=0; i<nodesIds.length; i++) {
const nodeId = nodesIds[i];
const btn = this.__createNodePathBtn(nodeId);
if (i === nodesIds.length-1) {
btn.setValue(true);
}
btns.push(btn);
}
} else if (shape === "arrow") {
const study = osparc.store.Store.getInstance().getCurrentStudy();
const currentNodeId = study.getUi().getCurrentNodeId();
for (let i=0; i<nodesIds.length; i++) {
const nodeId = nodesIds[i];
const btn = this.__createNodeSlideBtn(nodeId);
if (nodeId === currentNodeId) {
btn.setValue(true);
}
btns.push(btn);
}
}
this.__buttonsToBreadcrumb(btns, shape);
},

__createNodeBtn: function(nodeId) {
const btn = new qx.ui.form.ToggleButton().set({
...this.self().BUTTON_OPTIONS,
maxWidth: 200
});
btn.addListener("execute", () => {
this.fireDataEvent("nodeSelected", nodeId);
}, this);
return btn;
},

__createNodePathBtn: function(nodeId) {
const btn = this.__createNodeBtn(nodeId);
const study = osparc.store.Store.getInstance().getCurrentStudy();
if (nodeId === study.getUuid()) {
study.bind("name", btn, "label");
study.bind("name", btn, "toolTipText");
} else {
const node = study.getWorkbench().getNode(nodeId);
if (node) {
node.bind("label", btn, "label");
node.bind("label", btn, "toolTipText");
}
}
return btn;
},

__createNodeSlideBtn: function(nodeId) {
const btn = this.__createNodeBtn(nodeId);
const study = osparc.store.Store.getInstance().getCurrentStudy();
const slideShow = study.getUi().getSlideshow();
const node = study.getWorkbench().getNode(nodeId);
if (node && nodeId in slideShow) {
const pos = slideShow[nodeId].position;
node.bind("label", btn, "label", {
converter: val => (pos+1).toString() + "- " + val
});
node.bind("label", btn, "toolTipText");
}
return btn;
},

__buttonsToBreadcrumb: function(btns, shape = "slash") {
this._removeAll();
for (let i=0; i<btns.length; i++) {
const thisBtn = btns[i];
let nextBtn = null;
if (i+1<btns.length) {
nextBtn = btns[i+1];
}

this._add(thisBtn);

const breadcrumbSplitter = new osparc.component.widget.BreadcrumbSplitter(16, 32).set({
shape,
marginLeft: -1,
marginRight: -1
});
if (breadcrumbSplitter.getReady()) {
breadcrumbSplitter.setLeftWidget(thisBtn);
if (nextBtn) {
breadcrumbSplitter.setRightWidget(nextBtn);
}
} else {
breadcrumbSplitter.addListenerOnce("SvgWidgetReady", () => {
breadcrumbSplitter.setLeftWidget(thisBtn);
if (nextBtn) {
breadcrumbSplitter.setRightWidget(nextBtn);
}
}, this);
}
this._add(breadcrumbSplitter);
}
}
}
});
Loading