Comment by samradelie
7 days ago
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)
Fantastic work!
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)
I'm guessing because things like bolt.new, v0 etc work a lot better when they have high quality building blocks to work with? Still seems a bit of a stretch.
no ai :) just a vanilla layout manager. I assume the above comment is by somebody building an ai project that could use a layout manager
It’s much intuitive to provide drag and drop support rather than the user asking AI to change the layout, which is hars bolt.new or v0 works at the moment.
That's I am wondering too.. may be commenter itself is an AI?
In terms of rendering modes both approaches are supported
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