dockview icon indicating copy to clipboard operation
dockview copied to clipboard

Creating a popout group from the last group in a gridview causes a "ghost group" to linger in its place

Open zaxer2 opened this issue 1 year ago • 0 comments

Describe the bug When there is a single group in your gridview, if you pop out that group, an empty group will remain in the grid, with a nonfunctional "close" button.

If you have registered a watermark component, that component will appear instead of the close button, but DnD will still behave as though there is a group occupying the main grid.

To Reproduce This bug is reproducible from the 'Dockview Demo' codesandbox

Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/p/sandbox/frosty-shtern-ldx2jk
  2. Close groups 2, 3, 4, and 5
  3. Pop out group 1
  4. See the 'close' button now occupying the grid.
  5. Attempt to drag-and-drop panel 1 into the main grid. Note that there is no central "snap to" region, border/edge regions.

Expected behavior The empty group left behind should likely be cleaned up after the popup successfully opens, but before the addPopoutGroup promise is resolved.

Video

https://github.com/user-attachments/assets/002fcfa5-e9cf-4ac2-9e9c-0ade0b278b34

Desktop (please complete the following information):

  • Chrome
  • Version 131.0.6778.86
  • Dockview version 2.0.0

Additional context This bug does not directly affect user interaction significantly. I call close() after the addPopoutGroup promise resolves, and that largely mitigates any issues. However, I believe this bug is related to some more significant issues involving Popout Groups, so I'm just cataloguing it here.

zaxer2 avatar Dec 02 '24 19:12 zaxer2