Closed pixelzoom closed 2 months ago
Impromptu design meeting on 9/23/24 with @DianaTavares @arouinfar @Nancy-Salpepi @pixelzoom
I explained that modelModeProperty corresponds to the ModelMode enumeration type, defined like this:
export const ModelModeValues = [ 'experiment', 'model' ] as const;
export type ModelMode = ( typeof ModelModeValues )[number];
By PhET-iO convention, we name Properties based on their type. Hence the name modelModeProperty. No one had a better idea for renaming ModelMode.
Some alternative names for modelModeProperty
that we considered were modeProperty
and experimentModelProperty
. No one was excited about these, and they have their own problems.
We also noted that there is experimentModelSwitch
whose type is ABSwitch<ModelMode>
.
I replaced modelModeProperty: Property<ModelMode>
with isExperimentProperty: Property<boolean>
, and deleted the ModelMode
enumeration type. PhET-iO metadata is shown below. @DianaTavares @arouinfar please review, let me know if this seems like a reasonable solution. The last person to review can close the issue.
I initially created this issue in the wrong repo, so it was transferred from ph-scale to models-of-the-hydrogen-atom.
I find isExperimentProperty very clear with boolean values! but leave @arouinfar to review because she has more experience with PhET-iO.
Thanks @pixelzoom! The changes look good on main. I agree with @DianaTavares, isExperimentProperty
is very clear.
Closing!
From the PhET-iO design document: