Wow. Stellar work. The TS looks really proper on first glance. I think you're right on zeitgeist -- we're going to need a lot more fundamental tools like this to build AI apps.
Technically speaking, I've long wondered about mount/unmount of components as panels are dragged about and their visibility changed. Sometimes it's more costly to mount/unmount than to display:none.
Second, you have basically a declarative structure for these panels, are there plans to expose a Vite plugin for example that could export saved TS layouts, where functions (ie: TS imports) map to the panel contents? (trying to think outside of JSX and more vanilla TS)
I might have missed something -- how do AI apps come into this? Was this application written with AI, or for AI applications in particular? (I don't imagine it uses AI for the actual layout management or anything like that)
There are options to maintain the panels content within the DOM at all times (using an approach like you mentioned with display: none) and options to remove content from the DOM.
In terms of vanilla TS the library is almost entire written in vanilla TS with small wrapper libraries for Vue and React.
In theory wrappers could be written for other frameworks such as Angular (which is something I would like to get done this year)
Can you explain what "Transparent builds" means in this context?
From my understanding after a quick search, it is the standard. If any package requires me to figure out a manual build process after installing it, to get it to work, I simply do not use it.
Dockview is phenomenal, and congrats to @mathuo on a great project - I've recently thoroughly tested 6-7 available libraries in this category, and dockview is certainly in the top. GH is also very active and well maintained.
The only reason I in the end went with FlexLayout (https://github.com/caplin/FlexLayout) for a recent project was lack of support for predefined/restricted dimensions, - which was since added in a very good way - and that I really liked how FL handles side panels, with vertical tabs, and their predefined behavior.
Looking very much forward to using Dockview in one of the next projects.
Both look great. The aesthetics of FlexLayout's drag box are _really_ nice, and the vertical tab handling is such a good touch. Dockview looks like a strong contender though, and the HN effect on stars may well give it momentum to integrate the relatively small edges that FlexLayout enjoys.
I literally have been working on something like this for a spare-time project, and am so glad to find this. Now I can throw out my code and move to the next stage of the project.
How does this compare to golden layout? Inspired by it?
I really enjoyed that project back in the day, but unfortunately support completely stopped (it had some folks take over, but I didn't see a real feasible upgrade path despite their passionate work on updating it).
This looks great! I'd be interested in giving it a try.
golden layout is the OG JavaScript layout manager, used it for many years beforehand.
Orginally yes it was inspired by some of the other layout managers, include golden layout. The main goal here was to have zero depenedencies and to be written in Vanilla TypeScript with wrapper libraries for frameworks such as Vue and React.
Any feedback is appreicated, the website demo shows most of the current capabilities and there are many more planned in the Issues list.
I just tried using golden layout the other day. The demo on their website with react support is v1 and when I installed it, I got v2 which apparently drops react support and has no documentation or examples on the website. With v1, it only supported class based components. While in theory you could maintain your own adapter logic for golden layout, it seems somewhat defunct, there are other newer libs that may even have better feeling drag and drop like this one. I also recall about six years ago when I went to use Golden layout on another project I ended up implementing my own with vanilla type script because of some (perceived) issues with it. My experiences have always been that although it is ubiquitous it’s not that great.
Nice project. I would appreciate putting some common content in the demo, such as videos, dropdowns, large amount of text and large size text to show how they can be handled.
Also is there a version without window chrome, just panes?
I maintain a tiling wm written in Rust, and I just cannot imagine having the patience to do this kind of work in JS/TS. My respect to mathuo! One of the coolest things I've seen on HN recently.
Really nice. SolidJS support would be nice too. I lately have no preference between React and Solid but I have some projects that could use this that happens to be in SolidJS.
Kept getting this error when navigating:
This page crashed
Try again
Right side of assignment cannot be destructured
The video looks awesome, but I couldn’t get the demo to work using an iPad, so I assume mobile isn’t supported fully? I’d use it for my personal dashboard and for organizing llama.cpp chats if I could.
Most likely, touch devices are not officially supported however support is planed. Also the demo has some issues running on Safari which will be fixed.
Looks like a very high quality library, great work! I wonder if it will eventually support auto truncating tab titles when the tabs fill up the horizontal space, just like how chrome display large number of tabs.
Does this use the new moveBefore API to move DOM elements while preserving their state? Or is it going to recreate the elements eitherway due to React/Vue?
I'd be surprised if it uses moveBefore for something that seems to have put so much thought into being portable. moveBefore doesn't even have an entry in MDN yet, the only references I can find to it suggest it's still only available behind a flag in Chrome canary.
1. Where you never want the elements DOM position to move (`always` rendering mode) and the HTMLElement is simply hidden (display: none) when not visible.
2. Where you only want the DOM element to exist when the panel is visible (`onlyWhenVisible` mode)
In the case of React the React Tree is always maintained in either mode.
samradelie|1 year ago
Technically speaking, I've long wondered about mount/unmount of components as panels are dragged about and their visibility changed. Sometimes it's more costly to mount/unmount than to display:none.
Second, you have basically a declarative structure for these panels, are there plans to expose a Vite plugin for example that could export saved TS layouts, where functions (ie: TS imports) map to the panel contents? (trying to think outside of JSX and more vanilla TS)
Fantastic work!
achierius|1 year ago
mathuo|1 year ago
https://dockview.dev/docs/core/panels/rendering
There are options to maintain the panels content within the DOM at all times (using an approach like you mentioned with display: none) and options to remove content from the DOM.
In terms of vanilla TS the library is almost entire written in vanilla TS with small wrapper libraries for Vue and React.
In theory wrappers could be written for other frameworks such as Angular (which is something I would like to get done this year)
Loading and saving state is supported though
https://dockview.dev/docs/core/state/save
Let me know if that answers the question
bossyTeacher|1 year ago
- Zero dependencies: wow, this is really good for a js package.
- Documentation: nice, clear and with examples
- Transparent builds: this should be a standard
I wish more js packages were like yours
herpdyderp|1 year ago
Can you explain what "Transparent builds" means in this context?
From my understanding after a quick search, it is the standard. If any package requires me to figure out a manual build process after installing it, to get it to work, I simply do not use it.
alluro2|1 year ago
The only reason I in the end went with FlexLayout (https://github.com/caplin/FlexLayout) for a recent project was lack of support for predefined/restricted dimensions, - which was since added in a very good way - and that I really liked how FL handles side panels, with vertical tabs, and their predefined behavior.
Looking very much forward to using Dockview in one of the next projects.
popcorncowboy|1 year ago
somytomy|1 year ago
diob|1 year ago
I really enjoyed that project back in the day, but unfortunately support completely stopped (it had some folks take over, but I didn't see a real feasible upgrade path despite their passionate work on updating it).
This looks great! I'd be interested in giving it a try.
mathuo|1 year ago
Orginally yes it was inspired by some of the other layout managers, include golden layout. The main goal here was to have zero depenedencies and to be written in Vanilla TypeScript with wrapper libraries for frameworks such as Vue and React.
Any feedback is appreicated, the website demo shows most of the current capabilities and there are many more planned in the Issues list.
joshribakoff|1 year ago
karol|1 year ago
Also is there a version without window chrome, just panes?
mlajtos|1 year ago
bsnnkv|1 year ago
mathuo|1 year ago
therein|1 year ago
AlexErrant|1 year ago
mlajtos|1 year ago
ofrzeta|1 year ago
mattlondon|1 year ago
Is anyone aware of any sort of similar sort of zero-dep vanilla libraries for common desktop controls beyond what HTML offers? E.g. menus etc?
chris_st|1 year ago
0: https://daisyui.com
f0ur|1 year ago
dahdum|1 year ago
The video looks awesome, but I couldn’t get the demo to work using an iPad, so I assume mobile isn’t supported fully? I’d use it for my personal dashboard and for organizing llama.cpp chats if I could.
mathuo|1 year ago
rk06|1 year ago
low_tech_punk|1 year ago
scrivna|1 year ago
pdyc|1 year ago
Is there a way to add gaps between the elements so it looks like a dashboard rather than panel?
garbagepatch|1 year ago
lolinder|1 year ago
mathuo|1 year ago
https://dockview.dev/docs/core/panels/rendering
Options exist for multiple cases:
1. Where you never want the elements DOM position to move (`always` rendering mode) and the HTMLElement is simply hidden (display: none) when not visible. 2. Where you only want the DOM element to exist when the panel is visible (`onlyWhenVisible` mode)
In the case of React the React Tree is always maintained in either mode.
unknown|1 year ago
[deleted]
mlajtos|1 year ago
mathuo|1 year ago
https://dockview.dev/demo/
mathuo|1 year ago
qwertox|1 year ago
Even nested panels...
peppertree|1 year ago
mathuo|1 year ago
https://dockview.dev/demo/
andix|1 year ago
Jonovono|1 year ago
Onavo|1 year ago
mathuo|1 year ago
- https://github.com/mathuo/dockview/issues/696
MortyWaves|1 year ago
cyanydeez|1 year ago
mathuo|1 year ago
- https://github.com/mathuo/dockview/issues/696
mathuo|1 year ago
https://dockview.dev/demo/
toastercat|1 year ago
gavmor|1 year ago
T3RMINATED|1 year ago
[deleted]
urronglol|1 year ago
[deleted]
todotask|1 year ago