phetsims / mean-share-and-balance

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

Self Code Review #258

Closed marlitas closed 3 weeks ago

marlitas commented 1 month ago

We need to prep for a Code Review. Here is the checklist for us to go through ahead of time:

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

Table of Contents

Specific Instructions

Provide specific instructions here. For example: known problems that will fail CRC items, files that can be skipped, code that is not completed, shared or common code that also needs to be reviewed,... If there are no specific instructions, then delete this section.

GitHub Issues

The following standard GitHub issues should exist. If these issues are missing, or have not been completed, pause code review until the issues have been created and addressed by the responsible dev.

Build and Run Checks

If any of these items fail, pause code review.

Memory Leaks

Performance

Usability

Internationalization

Repository Structure

Coding Conventions

TypeScript Conventions

Math Libraries

IE11

Organization, Readability, and Maintainability

class MyClass {
  public constructor( tickMarksVisibleProperty: Property<boolean>,
                      model: Pick<IntroModel, 'changeWaterLevel'>, // <-- Note the call site can pass the whole model, but we declare we will only use this part of it
                      waterCup: WaterCup, modelViewTransform: ModelViewTransform2,
                      providedOptions?: WaterCup3DNodeOptions ) {}
}
cd {{repo}}/js ; wc -l `find . -name "*.ts" -print` | sort

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.

samreid commented 1 month ago

The preceding commit is not passing my type checker, and is causing precommit hooks to fail for an unrelated repo. I'll commit a change or ts-expect-error for now.

samreid commented 1 month ago

OK I pushed a fix for that part, please review.

marlitas commented 1 month ago

Ahhh a file failed to push yesterday. Sorry about that. Thanks for addressing @samreid

marlitas commented 4 weeks ago

A few TODOs pointing to this issue for @jbphet

jbphet commented 3 weeks ago

I've addressed the TODO items. Are we done here @marlitas?

jbphet commented 3 weeks ago

I also added some phetioDocumentation for the meanWithRemainderProperty, because I thought it might be needed. Feel free to remove or revise at your discretion.

marlitas commented 3 weeks ago

I think we are done here! Closing.