Re:Show HN: TypeScript/React/Vue Window Layout Manager (Tabs...
by garbagepatch on Saturday January 11, 2025 @11:50AM
(#42667077)
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?
[ Parent
| on HN ]
Re:Show HN: TypeScript/React/Vue Window Layout Manager (Tabs...
by lolinder on Saturday January 11, 2025 @12:22PM
(#42667324)
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.
Re:Show HN: TypeScript/React/Vue Window Layout Manager (Tabs...
by samhh on Saturday January 11, 2025 @01:07PM
(#42667704)
It could support it as a progressive enhancement.
Re:Show HN: TypeScript/React/Vue Window Layout Manager (Tabs...
by lolinder on Saturday January 11, 2025 @01:26PM
(#42667868)
I personally wouldn't even bother with that yet.
Once it's available in even one browser not behind a flag, sure, but while it's still entirely undocumented and only available to people who both use Chrome Canary and know to go turn on a specific flag?
Re:Show HN: TypeScript/React/Vue Window Layout Manager (Tabs...
by mathuo on Saturday January 11, 2025 @02:33PM
(#42668339)
There are multiple ways in which you can specify how the panel renders.
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.