phetsims / center-and-variability

"Center and Variability" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 2 forks source link

Self Code Review #449

Closed samreid closed 1 year ago

samreid commented 1 year ago

We need to prepare this sim for code review by performing a self-code-review where we follow the code review checklist and make sure the code is ready for review. See comments in https://github.com/phetsims/center-and-variability/issues/447

marlitas commented 1 year ago

PhET Code-Review Checklist (a.k.a "CRC")

Build and Run Checks

If any of these items fail, pause code review.

Memory Leaks

Performance

Usability

Internationalization

  "material.water": {
    "value": "Water"
  },
  "material.wood": {
    "value": "Wood"
  },
  "shape.block": {
    "value": "Block"
  },
  "shape.cone": {
    "value": "Cone"
  },

Nested substructure is not yet fully supported.

Repository Structure

Coding Conventions

TypeScript Conventions

Math Libraries

IE11

Organization, Readability, and Maintainability

Accessibility

This section may be omitted if the sim has not been instrumented with accessibility features. Accessibility includes various features, not all are always include. Ignore sections that do not apply.

General

Alternative Input

PhET-iO

This section may be omitted if the sim has not been instrumented for PhET-iO, but is likely good to glance at no matter.

marlitas commented 1 year ago

Are the source files reasonable in size? Scrutinize large files with too many responsibilities - can responsibilities be broken into smaller delegates?

I noticed that CardNodeContainer was significantly larger than all other files and it is getting a bit unwieldy to navigate. Especially since more logic is now going to be added for https://github.com/phetsims/center-and-variability/issues/433.

I went ahead and factored out the interactive portions of the Card Container (both view and model). I think more can be done. My next step will probably be to factor out the celebration animation code.

samreid commented 1 year ago

@marlitas and @matthew-blackman and I reviewed this issue and I think it is ready to close. It can still be used by @pixelzoom or others for reference as the code review proceeds.