Correct sizing inside modals and dialogs
Dialogs often open with scale or opacity animations and transforms, which distort measurements. WarGrid measures layout size rather than transformed size, and finalizes after the open transition, so grids in modals render crisply and keep correct popup positions.
Planned. This page shows the specification from issue #205. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A button that opens a native <dialog> (or a WarUI modal) containing a grid.
Expected behavior
Column widths are identical regardless of the animation. Filter menus sit above the dialog backdrop and align to their header, and closing the dialog then reopening it keeps the state.
Planned API surface
layout option ('fill')refreshLayout() methodlayoutready eventpopupContainer optionAcceptance criteria
- Column sizes are computed from layout size, unaffected by CSS transforms (pending)
- Popups render above the modal's top layer when the popup container is the dialog (pending)
- Focus moves into the dialog per the dialog pattern, and the grid does not trap Tab (pending)
- Reopening a dialog does not double-attach observers (pending)
- Fit-content dialogs size to the grid's intrinsic width up to the viewport (pending)