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

Uninstrument Text and RichText #934

Closed
2 tasks done
zepumph opened this issue Aug 3, 2023 · 28 comments
Closed
2 tasks done

Uninstrument Text and RichText #934

zepumph opened this issue Aug 3, 2023 · 28 comments
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Aug 3, 2023

In https://github.com/phetsims/phet-io/issues/1952#issuecomment-1664495275 we decided that we generally don't want to instrument Text nodes, and instead just want to focus on the stringProperties, especially if they are derived or pattern.

  • Let's double check that sim code isn't instrumenting Texts unless there is a reason (like hiding the Text).
  • Let's also look for common code UI that needs to be generally updated to support this new PhET-iO instrumented decision. (For example Natural Selection dealt with NumberDisplay and OopsDialog)

Most likely the important things are for general sim/screen names, and for HomeScreen.

@arouinfar
Copy link

arouinfar commented Aug 3, 2023

I reviewed general and homeScreen for usages for Text and would recommend that we uninstrument these Text nodes:

  • general.view.navigationBar.titleText
  • general.view.navigationBar.*ScreenButton.text
  • homeScreen.view.buttonGroup.*ScreenButton.text
  • homeScreen.view.titleText

I also reviewed instances of StringProperty outside of general.model.strings and found these in the About dialog. These all link back to read-only strings, so I recommend uninstrumenting these too.

  • aboutDialogCapsule.archetype.termsPrivacyAndLicensingLinkTextStringProperty
  • aboutDialogCapsule.archetype.thirdPartyCreditsLinkTextStringProperty
  • aboutDialogCapsule.archetype.translationCreditsLinkTextStringProperty

Also, autoselect is working well on the navbar. The sim title routes users to general.model.displayedSimNameProperty which is desirable (and should remain instrumented). Autoselecting the screen buttons in the navbar takes me directly to the appropriate StringProperty and bypasses the view instrumentation.

I'm not sure who should be on the hook for these changes. Maybe @zepumph? Maybe @pixelzoom since Acid-Base Solutions is likely next up in the queue?

@pixelzoom
Copy link
Contributor

pixelzoom commented Aug 4, 2023

If this ends up on my worklist, I won't be able to get to it until >= August 28. It's a little too cross-cutting for me to tackle while I'm on reduced hours.

@samreid
Copy link
Member

samreid commented Aug 17, 2023

Today @kathy-phet asked if I could take the lead, and I agreed. @zepumph can review. This will be part of the CaV and greenhouse SHAs.

@samreid
Copy link
Member

samreid commented Aug 17, 2023

Today we agreed that the navigation bar title text should be hide-able.

@samreid
Copy link
Member

samreid commented Aug 17, 2023

Fixed in the commits, @arouinfar can you please review/test? @zepumph would you like to code review? If we need migration rules (deletes), we can write them lazily.

@samreid samreid assigned zepumph and arouinfar and unassigned samreid Aug 17, 2023
@zepumph zepumph removed their assignment Aug 17, 2023
@arouinfar
Copy link

Thanks @samreid! We reviewed with @kathy-phet @samreid @zepumph in Studio and the changes look good, closing.

@samreid
Copy link
Member

samreid commented Aug 17, 2023

In slack, @kathy-phet said:

One thing we forgot re joist issue is that we are supposed to make the migration rules at this time as well for each sim that is published. @samreid can you do that please.

@samreid samreid self-assigned this Aug 17, 2023
@samreid samreid removed their assignment Sep 3, 2023
@zepumph
Copy link
Member Author

zepumph commented Sep 5, 2023

@zepumph
Copy link
Member Author

zepumph commented Sep 8, 2023

Alright. We can confirm that migration rules are now complete and working for this issue. Closing

@zepumph zepumph closed this as completed Sep 8, 2023
@pixelzoom
Copy link
Contributor

pixelzoom commented Sep 11, 2023

Reopening. These TODOs appear in beers-law-lab-migration-rules.ts and concentration-migration-rules.ts. This was discovered while working on phetsims/beers-law-lab#332, and complicated that issue.

    // Delete items that no longer exist.
    // TODO: https://github.com/phetsims/joist/issues/934 Some of these should be renames or other rules
    // Uninstrument Text and RichText.  These were copied from beers-law-lab-migration-rules.ts
    // Delete items that no longer exist.
    // TODO: https://github.com/phetsims/joist/issues/934 Some of these should be renames or other rules. Note there are also unused rules since
    // this was copied from beers-law-lab

@pixelzoom
Copy link
Contributor

Also wondering why this was not reopened automatically. Is the automated task still running that looks for TODOs?

@zepumph
Copy link
Member Author

zepumph commented Sep 11, 2023

Great question. It was working in phetsims/greenhouse-effect#361 (comment). I will take a look.

@samreid
Copy link
Member

samreid commented Sep 12, 2023

I was going to work on this next, but the comment in https://github.com/phetsims/phet-io/issues/1963#issuecomment-1714788272 indicates that maybe @pixelzoom is working on it. So I'll self unassign and check in at standup tomorrow.

@samreid samreid assigned pixelzoom and unassigned samreid Sep 12, 2023
@pixelzoom pixelzoom assigned samreid and unassigned pixelzoom Sep 12, 2023
@pixelzoom
Copy link
Contributor

I do not plan to do any further work on this. Or anything else related to migration until this is addressed.

@zepumph
Copy link
Member Author

zepumph commented Sep 12, 2023

Also wondering why this was not reopened automatically. Is the automated task still running that looks for TODOs?

Ahh, because the feature relies on the lint rule called todo-should-have-issue, and whereever that rule is turned off, we don't have this feature.

https://github.com/phetsims/phet-io-sim-specific/blob/b5d1d086b5a06ad1199acce78056ceb6eb60689b/package.json#L19

@pixelzoom
Copy link
Contributor

Why is "todo-should-have-issue" turned off in phet-io-sim-specific? Shall we turn it on?

@zepumph
Copy link
Member Author

zepumph commented Sep 12, 2023

phetsims/tasks#1128

@zepumph zepumph removed their assignment Sep 12, 2023
@zepumph
Copy link
Member Author

zepumph commented Sep 12, 2023

@samreid will take the lead on the TODO that is left.

@samreid
Copy link
Member

samreid commented Sep 14, 2023

@samreid samreid closed this as completed Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants