Closed samreid closed 1 year ago
I got very far on this but it is very complicated and I wanted to call for help. Current status:
Perhaps after @pixelzoom or @zepumph reviews https://github.com/phetsims/sun/issues/746#issuecomment-1234801112 we can discuss this one?
Based on https://github.com/phetsims/sun/issues/794... RectangularRadioButtonItem should not only allow createNode/tandemName, it should be converted to that form, and allow only that form.
And it looks like RectangularRadioButtonItem has the same problem as reported in https://github.com/phetsims/sun/issues/793 - RectangularRadioButtonItem.tandem is never used. So promoting this issue to a blocking bug.
And it looks like RectangularRadioButtonItem has the same problem as reported in https://github.com/phetsims/sun/issues/793 - RectangularRadioButtonItem.tandem is never used. So promoting this issue to a blocking bug.
@samreid said:
I got very far on this but it is very complicated and I wanted to call for help. Current status: ...
@samreid does this get any less complicated by the simpification of GroupItemOptions that was made in #794?
Raising priority of this, since RectangularRadioButtonGroup is the last "group" to be addressed. And there has been good momentum on finishing up #794 and #746.
There are 39 occurrences of new RectangularRadioButtonGroup(
, 24 occurrences of extends RectangularRadioButtonGroup {
.
Once we eliminate the tandem
option, we can eliminate this line https://github.com/phetsims/sun/commit/68e494d841953e4a7edf242ca5ae9ed3f39d0f0e
I'll message slack and the google group:
In https://github.com/phetsims/sun/issues/787 we committed an API breaking change. RectangularRadioButtonItem no longer uses node + tandem, it now uses createNode + tandemName.
Implemented and ready for review. @pixelzoom do you have time to take a look?
Looks good. Memory leak fixed in https://github.com/phetsims/sun/commit/b887e81ed43769c046ef9b1da5e2492db9008e63. Closing.
What was your metric for ensuring we found all usages here? I just saw
This should be failing an assertion, but perhaps we took out an assertion, thinking that TypeScript was the solution? I think verbose and redundant assertions are still very valuable in our scenery-phet and sun libraries, as we likely will never convert all our simulations to TypeScript, but will want to continue improving our libraries and common-code APIs.
Wait, shouldn't this be getting caught with https://github.com/phetsims/sun/blob/cb5784eaf0e86d0039aa83e722dd92a24fbe818a/js/GroupItemOptions.ts#L31? Now I'm just confused. Sorry if I have made a mistake here. Can you give me some clarity?
The Black Box Study screen is commented out, and not exercised. I spent some time trying to get it running again to see if that error was triggered, and I was blocked by too many upstream errors. So I think we can trust the assertion in https://github.com/phetsims/sun/issues/787#issuecomment-1502014693
What was your metric for ensuring we found all usages here?
Maybe the answer to that is CT? And Black Box was an outlier since it is not being exercised?
What was your metric for ensuring we found all usages here?
And that assertion that I didn't see before in GroupItemOptions.ts. Thanks for the BBS update, I'm ready to close again. I appreciate your quick response.
From https://github.com/phetsims/sun/issues/746#issuecomment-1234801112, @pixelzoom said: