-
Notifications
You must be signed in to change notification settings - Fork 27
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
tab switching (preserve tab layout, configure defaults & share links) #662
Comments
Long run we should provide:
E.G. A layout menu icon which provides a "save current layout" button and lists all pre-saved layouts for quick switching. |
IMO we should split the "Serialise lumino state into local storage" part off into a 1.4.0 issue? |
For view state (i.e. options like filtering set by the user in the view), I suggest we collect these options into a single objet in the component Then the serialisation bit can be done at a higher level, extracting them something like View defaults (e.g. you might want new table views to open with some sort order pre-configured) could be provided to the view as a prop e.g. |
(assigning @AaronDCole as #1128 leads in this direction to avoid scope for duplication) |
See also #1090 |
Whilst digging through the Lumino source working on #1090 I found a It has a diff --git a/src/components/cylc/workflow/Lumino.vue b/src/components/cylc/workflow/Lumino.vue
index 90f9bb1a..66441573 100644
--- a/src/components/cylc/workflow/Lumino.vue
+++ b/src/components/cylc/workflow/Lumino.vue
@@ -181,6 +181,14 @@ export default {
// TODO: remove it if the linter is fixed later #510
// eslint-disable-next-line vue/custom-event-name-casing
this.$emit('lumino:deleted', customEvent.detail)
+ },
+
+ saveLayout () {
+ return this.dock.layout.saveLayout()
+ },
+
+ loadLayout (layout) {
+ return this.dock.layout.restoreLayout(layout)
}
}
} I haven't tried this out for real but it look promising. We should be able to dump this layout into browser LocalStorage for now. This would allow the default layout to be configurable. We will require an extra step in the "Workflow Component" as we need to create the Vue components that fit into this layout, not sure how those two components will marry up at present. It might be worth looking at the JupyterLab source for inspiration. |
I've tried that out and it works just like what we want. Will need to figure out how to restore the Tree/Table/etc. views to the restored tabs, which will be empty otherwise. https://lumino.readthedocs.io/en/latest/api/classes/widgets.DockPanel-1.html#layout https://lumino.readthedocs.io/en/latest/api/classes/widgets.DockLayout-1.html |
Moved the remainder of point (1) to #1834 |
Moved point (4) to #1835 |
Added #1837 to capture preserving layouts between browser sessions. |
Note
Definition: "Workspace"
The part of the UI within the Lumino instance. Basically everything that isn't GScan in the "default" view.
A workspace could be for:
The aims the GScan tabbing system are:
Here are four steps to achieve these goals in order of priority.
The text was updated successfully, but these errors were encountered: