Closed pixelzoom closed 1 year ago
Thanks for checking in. BAN is using default layout bounds and has been developed with the default bounds from the beginning. Closing
Right. But in case I wasn't clear... The issue was that BAN and shred are using different layoutBounds. It sounds like that's not causing any problems in BAN. But I can imagine that it will cause problems in some sim, and it would be better if shred were parametrized so that it could use the same layoutBounds as the sim that is using shred.
I see, yes that makes sense. I am not sure about how BAN is using the shred view components and if there is some hackary in that department to get things to mesh well. We should investigate.
The danger with such hackery (if it exists) is that BAN is likely to break if/when https://github.com/phetsims/shred/issues/37 is addressed.
After doing some investigation. ShredConstants.LAYOUT_BOUNDS
isn't used by BAN at all. This is used as the layout bounds in other sims that use shred, but wasn't done here. Changing ShredConstants.LAYOUT_BOUNDS
to the default value didn't change or effect the snapshot comparison of BAN at all. Basically, when it comes time to change the shred constant, it will effect how the screen views that use this (BAA and IAAM) convert to use default bounds.
It is possible that as part of that work, those sim devs will want to change details of shred components (change layout of shred nodes) to make their lives easier, but since BAN is now in the mix, the solution is going to be much easier to just handle things on their sim side instead. I'm now ready to close. Thanks for the ping.
This sim uses default layoutBounds for ScreenView. But are you aware that one of its dependencies (shred) required non-default layoutBounds? In ShredConstants.js:
I don't know whether/how this might be affecting this sim. But other sims (e.g. build-an-atom) that use shred have been forced to use these
ShredConstants.LAYOUT_BOUNDS
for their ScreenViews.See also https://github.com/phetsims/shred/issues/37 and https://github.com/phetsims/phet-io/issues/1939.