Skip to content
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

Checkbox is one word #910

Closed
samreid opened this issue Jan 11, 2018 · 11 comments
Closed

Checkbox is one word #910

samreid opened this issue Jan 11, 2018 · 11 comments
Assignees

Comments

@samreid
Copy link
Member

samreid commented Jan 11, 2018

Similar to #909 it seems we should make checkbox be one word and avoid "checkBox" or "check box".

Having a uniform custom will make it easier to avoid casing mismatch bugs, and will help us keep a consistent API for sim development and for PhET-iO clients.

@samreid samreid self-assigned this Jan 11, 2018
@samreid
Copy link
Member Author

samreid commented Jan 11, 2018

Google votes 9,020,000 votes for "check box" and 25,300,000 votes for "checkbox".

@samreid
Copy link
Member Author

samreid commented Jan 11, 2018

Our codebase has 1176 occurrences of heckBox and 603 occurrences of heckbox and 137 occurrences of heck box. So it seems we have been inclined to separate that into two words. I'll search further for ground truth.

@samreid
Copy link
Member Author

samreid commented Jan 11, 2018

Even wikipedia uses both forms in the 2nd paragraph:

image

though checkbox appears 27 times on that page and "check box" appears 4 times.

@samreid
Copy link
Member Author

samreid commented Jan 11, 2018

On MDN https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement "checkbox" appears 7 times and "check box" appears 0 times.

Likewise the spec refers to checkbox (17 times) and never "check box". Note these are for the HTML element not the scenery component, but it seems we should follow the same logic.

I'm inclined to go with "checkbox". I'll add lint rules and look at updating these.

@samreid
Copy link
Member Author

samreid commented Jan 11, 2018

I noticed that @pixelzoom used "Check box" and CheckBox in sun--it would be good to get him to sign off before we start making changes. @pixelzoom can you please review this issue and comment?

@samreid samreid assigned pixelzoom and unassigned samreid Jan 11, 2018
@pixelzoom
Copy link
Contributor

I'm fine with whichever you choose. Is this and #909 primarily motivated by consistency of phetioIDs?

@pixelzoom pixelzoom assigned samreid and unassigned pixelzoom Jan 12, 2018
@pixelzoom
Copy link
Contributor

Btw... I've used "check box" mainly for consistency with the UI toolkits I've used in the past. E.g. JCheckBox (Java Swing), QCheckBox (Qt), CheckBox (X/Motif), ...

@samreid
Copy link
Member Author

samreid commented Jan 12, 2018

This issue was discovered while working on making phetioIDs consistent, but I would consider it nearly as important to have a consistent API for our sim development (to avoid case-related undefined bugs).

It seems odd because Java has java.awt.Checkbox but javax.swing.JCheckBox. Why did they make this change?

Iterating through top hits in google search for "checkbox API":

I'm still leaning toward the one-word solution. I'll add a lint rule and start converting usages.

@samreid
Copy link
Member Author

samreid commented Jan 12, 2018

After adding this lint rule, lint-everything reports:

✖ 1353 problems (1353 errors, 0 warnings)

This may take some time unless we can take error-free shortcuts.

samreid added a commit to phetsims/circuit-construction-kit-common that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/models-of-the-hydrogen-atom that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/gene-expression-essentials that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/inverse-square-law-common that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/energy-forms-and-changes that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/energy-skate-park-basics that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/forces-and-motion-basics that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/sugar-and-salt-solutions that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/least-squares-regression that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/fluid-pressure-and-flow that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/function-builder-basics that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/proportion-playground that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/rutherford-scattering that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/capacitor-lab-basics that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/expression-exchange that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/fraction-comparison that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/least-squares-regression that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/function-builder-basics that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/fluid-pressure-and-flow that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/proportion-playground that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/capacitor-lab-basics that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/fraction-comparison that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/acid-base-solutions that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/expression-exchange that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/blackbody-spectrum that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/masses-and-springs that referenced this issue Jan 12, 2018
samreid added a commit to phetsims/molecule-shapes that referenced this issue Jan 12, 2018
@jessegreenberg
Copy link

I was able to pull changes on my Windows machine, thanks @samreid. Closing this isssue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants