Open marlitas opened 8 months ago
Dev Meeting 12/7/23
JO: Any objections to refactoring to remove these usages?
I'll be happy to address refactoring any in the sims that I'm responsible for. I see 2 so far in the list above, which I'll take care of now.
Some other common-code UI components that have "content" (not a complete list) ...
Thanks @pixelzoom! I'll keep going through components to make a comprehensive list. I will plan on refactoring the common code components that need this work done.
In case it's useful, I added this at the end of relevant constructors to identify culprits:
this.childrenChangedEmitter.addListener( () => console.log( new Error( 'children changed' ).stack ) );
So far none of these components have raised any errors:
I'll continue checking components that use the "content" pattern, especially those that extend sizable.
Tested components:
This would be good to put on the radar again. I would love some help as I don't think I have the bandwidth to complete myself. I'll add it to the dev board to discuss in the next meeting and see if I can wrangle a co-conspirator.
Components that handle the layout of their children such as: ButtonNode, AccordionBox, Panel, Carousel, etc should not use the decorator pattern. Adding children to these components outside of the "content" or "contentNode" seems like an anti-pattern. We would like to discourage these Node subclasses from adding children through options or mutation.
Affected ButtonNode Subclasses:
Affected AccordionBox Subclasses:
Affected Panel Subclasses/Usages: