What this means is that there is no longer a concrete instance of an ItemGrid saved on every Actor, but instead, instances of ItemGrids will be created only when necessary and will be kept only for as long as necessary. This has two advantages over the old model:
Start-up performance should be better. Before, ALL actor instances would have had their ItemGrid instance created immediately upon load-up.
Validation now only happens when actually opening up an actor sheet now. This means that when items are dropped and the pop-up appears, the pop-up will be directly related to that actor. Previously, a user could potentially get bombarded with pop-ups, depending on however many actors they have and on whether the calculation for item grid size changed. Would have been a rare case, but possible and a terrible UX.
This also fixes the issue of the inconsistent state upon changing an item's shape, while it is on the item grid. It's still not a clean solution, however. There are multiple updates and re-renders happening in the background, but I couldn't find a work-around.
What this means is that there is no longer a concrete instance of an ItemGrid saved on every Actor, but instead, instances of ItemGrids will be created only when necessary and will be kept only for as long as necessary. This has two advantages over the old model:
This also fixes the issue of the inconsistent state upon changing an item's shape, while it is on the item grid. It's still not a clean solution, however. There are multiple updates and re-renders happening in the background, but I couldn't find a work-around.