glsp icon indicating copy to clipboard operation
glsp copied to clipboard

[Layouting] hGrab/vGrab calculation does not properly check for layoutable features

Open tortmayr opened this issue 10 months ago • 0 comments

Currently there is a issue in the hGrab/vGrab computation of the Hbox and VBox layouters. When grabbing the children we simply filter for all children that have the layout options property. https://github.com/eclipse-glsp/glsp-client/blob/794ab72beb83a43cda94e301351963b070b77015/packages/client/src/features/bounds/hbox-layout.ts#L77

However, this does not cover the case where the element has layoutoptions but has been configured to be excluded from layouting i.e. by removing the layoutContainer or layoutableChild feature.

This does not affect most normal usecases but can be an issue in cases where certain layoutable elements should be hidden/excluded from layouting on client side (e.g. hiding specific elements based on the current zoom level)

Therefore we should fix this and include the check for layoutableChild or layoutContainer features.

tortmayr avatar May 29 '25 10:05 tortmayr