Skip to content

virtually rendered panels #841

@PerBothner

Description

@PerBothner

Is there a recommended and documented way to render a Panel using an element outside the dockview element hierarchy? Specifically using elements that do not get re-parented when components are moved, perhaps using an element (the "content element") that is a direct child of the <body> element. When a component is moved, dockview would call an application-provided callback "hook" or event handler which would update the position, size, and visibility of the content element.

This ability would fix the problem of iframes being reloaded, though it may be overkill for that problem.

Part of this can be done using a ResizeObserver but I think it would be better to have a documented API or at least an example.

I do suggest that if a Panel has renderer set to always then perhaps it should be default be virtual and its parent element be one that never moves. Perhaps a sibling or an immediate child of the dockview element.

A more complicated use-case is when you use an embedded browser (like Electron, Qt WebEngine, or Tauri). In that case if can be useful to embed a toolkit widget or a separate WebView (like an iframe - but top-level) as a panel. Using "virtual" panels and callback functions these nested widgets can be coordinated.

Context: I have been using GoldenLayout for DomTerm, and I contributed the dev branch to GoldenLayout. Currently, nobody (including me) has time to work on GoldenLayout. An actively maintained alternative would be welcome - assuming it has the needed functionality. GoldenLayout has long supported "virtual" layouts.

(I have not tried to use dockview, except for the demo, and it will be a while before I have the time. However, before I dig deeper, I thought I'd ask for clarification on this use-case.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions