Open pixelzoom opened 6 years ago
This TODO is at least a year old and the feature hasn't been added to Dialog in that time, maybe it is no longer required.
I am not very familiar so removing my assignment, let me know if I can help.
I'm not planning to work on this until we revisit Molecules and Light, unless it is blocking work for Dialog. @pixelzoom please reassign me if this is blocking work on Dialog.
Same problem in gene-expression-essentials/js/multiple-cells/view/FluorescentCellsPictureDialog.js
Noticed while working on #184 in
SpectrumWindowDialog
.There's some really awful stuff in
SpectrumWindowDialog
, "done primarily for PhET-iO support". I can't tell who is responsible based on GitHub commits.Here's the relevant part of the implementation:
So many things wrong with this, but the 2 big things are:
(1) There's something being done here for PhET-iO support that is not at all specific to this dialog, and belongs in Dialog. Is it really necessary? If it's not necessary, delete it. If it's necessary, move it to Dialog so that other dialogs benefit.
(2) Overriding
show
andhide
to do something different, then calling the supertype'sshow
andhide
in a Property listener has an anti-pattern code smell. If this is moved to Dialog, let's implement a real solution.(CM edited.)