-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Public Request for beta-testing of the new docking library. #97
Comments
1.) I'd love if you could remove the additional dependencies. We don't use lodash, and it only used for depbounce, throttle and deep, I'd love if it could be removed. For me it really looks nice, and I'd love to use it, but I can only when the dome nodes will stay in DOM |
Dear @jogibear9988 ,
|
1.) With brotly it will get much smaller |
I think, the next week I could have prepared the beta version that might be a candidate for production-ready version of the library. There is however plenty of things to fix. |
Will you also support undock to new window? It would be nice if this could work, also with support of docking back... Maybe you've seen the support in visual studio code? |
@jogibear9988 |
There are different ways to do it. If you look how I've done it in dock-spawn-ts or how vscode does it. I move the component to the new window. This is very fast. If you look how it works in golden-layout, very slow. e could release it as a new version of dock-spawn-ts, I like it, it feels already much more professional. I only did small changes to dockspawn, never did a big rewrite (only the change to keep the nodes in dom). |
I've a few more questions:
And you asked about the icons, they are not mine, I used the from the initial dock-spawn project. |
I also had a webcomponent wraper for dockspawn, may something like this should also be added, maybe as an extra npm, but in dockspawn it added not much of size, see: and most of the code are only api duplications, wich for sure could be done nicer the main idea was, you could define your docking ui, without any javascript. |
I used it the webcomponent for example here: https://node-projects.github.io/web-component-designer-demo/index.html |
|
I mean, I'd like a webcomponent version, so the user of the Component does not need to write any line of javascript to use the component. At last it is only a small wrapper for the normal API, but declartively usable. It has nothing to do with the other frameworks, like vue, react,... webcomponents are browser standard, so they work always, if you use a framework or not. |
@jogibear9988 |
No, i used no framework. |
Dear @jogibear9988 |
Dear @jogibear9988 |
Dear @jogibear9988 , |
I've no good idea how to dock it back, cause as you said, the docking layout could have changed. |
And for webcomponent (means content not the docking library as a webcomponent) support (for those ones wich use adoptedStyleSheets), you also need the parts backupCss and clone of the adopted of my code: dock-spawn-ts/src/BrowserDialogHelper.ts Line 50 in 606e2eb
Or the controls will have no styles (cause stylesheets are not usable between different browser windows). And also if you want to support to dock back, the stylesheets need to be cloned again, or switched back to the old ones |
if I play arround, I also sometime get this error: https://app.screencastify.com/v3/watch/E3NVxuBi8e3sz2EWwJL2 |
Thank you very much for reporting. It is fixed now. |
I have written a task to complete adopting CSS stylesheets with the dock / undock operations. |
I have an idea, how to make it pseudo-intuitive, I will come with solution and we will see and discuss it. |
I have released a promo / propagation preview version of the docking library at https://docker.robotkarel.cz/ |
I really like it. I'll look implement it into my designer, so I could see if my scenarios still work. |
I also think, the name "docker" is not really good (Cause of the same named container system) suggestions from chatgpt: |
I think we should keep the current dock-spawn-ts, and give yours a new name. I'll then switch mine to "maintenance mode", and link to yours as a successor. |
For example, what I also thought to do (but never did) was to implement some sort of Window Stack for popups, means if you open a popup from a popup, I never can be behind this one. But I never did... It's here: http://129.159.205.3:8082/webui/index.html |
https://dockview.dev/demo/?theme=dockview-theme-abyss has nice themes, and i like the feature to drag windows into the tabbar directly |
Dear @jogibear9988, |
From Floating I think it should be possible, the others I don't think so |
I need advice concerning the generated events by the docking library. It is not quite clear to me the meaning of some original DockSpawn events. I also introduce new events as well, because we have many new dockpanel states. The second difference is that my new docking library is generating global and local events. Global events are accessible using the DockManager API and local events for each panel if the change occurred within it. Every panel has its own local interface. Events
May I ask you to review the generated events proposal and give me comments what you think? |
For me this looks good. I think onSuspendLayout and onResumeLayout are used when serializing the layout to json and restoring it from there. As you may see in the IDE sample of dock-spawn-ts the layout is restored to the state how you configured it last time |
@evonox @jogibear9988 Hey, thank you for your work, but could you please share why are you working on new solutions while golden-layout / dockview exist? I guess I need to clarify why I'm asking this question. I'm looking for a docking layout lib for new desktop app we want to build and so far I've came to a conclusion that there are
Looking at all of this, it's crazy hard to make a sane decision about investing into one of them. It seems big companies like Microsoft have developed their own solutions within the product itself (e.g. vscode, even in codesandbox, is pretty good). I'd like to do the same but budgets are not giant for most companies. So what are the motives behind evonox/docker? Do you have some requirements that are not possible to meet by contributing to other libs? |
I use DockSpawn since years. When the initial author dropped support, I converted to typescript. For me these 2 main features are relevant: Dialogs, keep content in dom golden-layout did not support dialogs and does not to keep the content in DOM when moving a element. And another feature: open in new browser window, is supported by golden-layout, but not via adoptNode, so the whol javascript needs to be loaded again. If the new one of @evonox will support this I will switch, because it's smaller, cleaner, animates, .... dock spawn als for example has touch support, don't know if the other two have. |
And if you look here: https://node-projects.github.io/web-component-designer-demo/index.html you could use dock-spawn-ts complete declaratively (if you use the webcomponent) |
@jogibear9988 Maybe I do not understand what "Dialogs" means exactly, but doesn't dockview demo cover resizable floating groups and opening them in new window? https://dockview.dev/demo It's just not triggered by dnd like on https://node-projects.github.io/web-component-designer-demo/index.html, but there's a button / ad_group icon that triggers similar behaviour? |
|
Exactly, floating groups triggered by Shift mod seem to work & cover this use case on dockview demo page.
afaiu the scrollbar is customizable. Do you mean that in your case it'd be more favorable to have "squished" tabs like on https://node-projects.github.io/web-component-designer-demo/index.html? @evonox do you intend to use the new lib in some production / commercial / paid apps or is it a personal side project atm? |
@timadevelop is "not removeing elments from dom" possible in dockview? |
The dev branch of GoldenLayout does not (by default) remove elements from the DOM when they are moved. In earlier versions the content element hierarchy matches the layout hierarchy; that is no longer the case. Note the However, it is possible to use separate top-level "raw" windows for each sub-windows. In that case you don't need to copy any window content even when dragged into a different top-level window. Instead we just re-position each sub-window. This is not done directly by GoldenLayout, but it has the mechanisms to do so. DomTerm manages windows this way when using the Qt wrapper. (There is experiemental support for doing the same when using the Electon wrapper, and it looks like it should be possible when using the Tauri/Wry wrapper, though I have not looked into it.) |
Since dockview got a mention here I will add some details around the questions above raised. For those who are interested: https://github.com/mathuo/dockview Also, kudos to anybody developing a package related to layout management, it's a suprisingly complex thing to design. Rendering (retaining DOM state)Dockview supports both removing the panels content from the DOM when it is no longer visible and also keeping that content in the DOM. The default behaviour is to remove the contents from the DOM since that's the most optimal solution but keeping the DOM alive for hidden panels is popluar since you will retain state specifc to the DOM such as scroll postions natively (and additonally if you are rendering iframes you need to keep that content in the DOM otherwise you run into all kinds of problems). The mode you are using to render the panel can be dynamically switched out per panel and is persisted as layout state too. There is some documentation on it here. Floating Groups, Popout Windows and Maximized GroupsFloating groups as mentioned are supported and triggered by holding See Floating Groups Header ScrollbarThe scrollbar "issue" (I would prefer to call it "meh UX") when the group is too narrow is a little annoying and there is an open issue on this to have something a little better although I would also imagine you could use something like OverlayScrollbars here to get a nice non-native scrollbar. Dependencies and Frameworks
DocumentationThe documentation on dockview is fairly well covered and actually consumes quite a lot of the dev time as the package as grown in complexity ensuring that everything is well documented with examples. You can view the documentation website here. |
This is not the thing im talkin about here. It's about if a elment when moved form one dock to another (or opened as dialog) is moved from one dom node or only repositioned. If you have huge DOM Trees (we have trees with 1000s of elments (visualization applications)) it only works, if the dom node stays in the same DOM elment and it is only repositioned |
Do you also support to undock to a new Window via adoptNode, or do you load the script and content in the new window? |
@timadevelop: Nope, I do not plan to use my library in my own commercial product. It will be free under MIT license and I will do maximum for commercial companies to trust this library and to use it in production-ready enviroments. But to reach the objective it will take some time. |
@timadevelop As for the React/Vue/Angular Framework support I have a different perspective of the future for the Docker Library. It should be framework-agnostic library that should easily plug-in into micro-frontend frameworks like SingleSPA. Then each content of panel could be a different micro-frontend application with its own framework, VanillaJS or using WebComponents. |
I think this should be possible with each of the other dock libs already. If you open the content in an iframe |
@jogibear9988 pardon for my ignorance, but do you achieve this by absolute positioning "container" DOM elements that hold the content, which just happens to be a web component in the webcomponent designer example you shared above? Doesn't this cause problems with a11y and responsive layouts that run both on desktop and mobile platforms? @jogibear9988 do you believe this whatwg/dom#1255 would discard the need for such shenanigans in your (and most) use cases? @mathuo do you think this is possible and actually needed in dockview considering whatwg/dom#1255 ? |
Don't know what sort of a11y issues you mean? DockSpawnTs Samples work on mobile and desktop. The children and also the container do not have to be webcomponents. Look at the DockSpawnTS IDE sample, there are no webcomponents.
maybe this would solve it, but it for sure will take months (maybe years) untill such an API arrives
|
afaik screen readers and the whole ARIA spec relies on DOM order. Some commercial apps have to be certified for a11y which includes a set of rules like providing high contrast settings, screen reader, etc.
Makes sense 👍
Yeah, probably years |
don't know if a docking UI could be usefully used in a screenreader
|
In dockview when using the In regards to opening panels in new windows you can view the code here which copies across the stylesheets before pushing the DOM node into the new document. It''s a fairly basic implemenation that doesn't do anything fancy as of right now, it does not make use of the |
For me it looks, if you drag it out to a popup, it does change dom position or not? That is not the case in dock-spawn-ts For the OpenInNewWindow, you need to do more, if you use webcomponents wich use adoptedStylesheets, see my code here: https://github.com/node-projects/dock-spawn-ts/blob/master/src/BrowserDialogHelper.ts Also using your sample on a IPhone seems not to work for me. I could not drag around the views |
I am just before finishing the pre-alpha version of the new DockerTS library. Could I ask for the public testing? Pre-alpha demo version of the library you can find at: https://docker.robotkarel.cz/ . If you find any repeatable error scenario, please submit me issue at: https://github.com/evonox/docker . Thank you very much for any support, suggestions or opinions of how to make the new library better. It will be released using MIT license for the benefit of the whole community.
The text was updated successfully, but these errors were encountered: