-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tandem name conventions are applied haphazardly. #267
Comments
In the above commits, I factored out static There are a few others that I identified (by searching for
|
I also think so. The less I need to manually review in Studio, the better. |
I addressed the requests in the commits. There are still a few imperfections due to other constraints:
Ready for review. UPDATE: I recalled this request:
Should this issue be a chip away for other occurrences too? Should we do that eagerly, or just as we are working in those areas? |
Yes, this should be discussed/addressed. Anything that has a design convention should have a corresponding check in the code to ensure that the convention is followed. |
All remaining work moved to side issues. @zepumph do you want to review this issue? |
I think a quick co-review would be the fastest here. |
|
This blocks PhET-iO because tandem names will change for Text suffixing. |
In the next PhET-iO design meeting, we did a PSA about the new feature of PhET-iO elements called |
renamed to tandemNameSuffix above (see https://github.com/phetsims/phet-io/issues/1855).
|
@samreid, anything else here? |
Everything looks great, nice work and thanks. Closing. |
As discovered in phetsims/axon#398 ...
In some cases, PhET wants to ensure that tandem names follows a specific naming convention. For example, all radio buttons should have a tandem name that ends with "RadioButton".
How those conventions are applied is implemented inconsistently, and in some cases not at all. Specifically:
tandem.name
suffix is hardcoded in multiple places, instead of factored out (e.g. 'Property' in ReadOnlyProperty)tandem.supplied
is not checked in some places, resulting in failure with Tandem.OPT_OUTSo...
Is it desirable to add runtime checking of more tandem-name conventions? I think so. The alternative is to visually catch them in Studio, which is like looking for a needle in a haystack.
Should the implementation of those checks be similar? I think so. This will make adding additional checks easier, and make maintenance easier.
The text was updated successfully, but these errors were encountered: