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

Fix ?allowLinks behavior #830

Closed
kathy-phet opened this issue Aug 11, 2022 · 33 comments
Closed

Fix ?allowLinks behavior #830

kathy-phet opened this issue Aug 11, 2022 · 33 comments

Comments

@kathy-phet
Copy link

There are a few places where links / opportunities for students to navigate away from the simulation are still available when
?allowLinks=false

Specifically, these links are still active:

PhETmenu--> PhET Website ...
PhETmenu--> Report a Problem ...

We need a solution for this when allowLinks=false.

Options off the top of my head:

hide these options in the PhETmenu
disable these options in the PhETmenu
others???

@jonathanolson
Copy link
Contributor

Also, any usage of openPopup should be checked (perhaps openPopup could check to see if the query parameter is provided?)

@kathy-phet
Copy link
Author

Original issue: #592

@kathy-phet
Copy link
Author

@zepumph - Can you review JO's fix to allowLinks? You actually recognized this need previously in the original issue - in this comment #592 (comment), but I think you were on vacation and then the thought got lost in the final review and sign off on that issue.

Behavior currently doesn't hide the option (e.g. PhET Website ...) will be visible, but no action is taken when you click on it. Nothing happens. @arouinfar and I felt this was fine behavior for this purpose. If you are a PhET-iO client, you can do something more sophisticated and hide the option or something, but for the PhET brand sims, we just want to prevent students from clicking their way away from the simulation.

@jonathanolson - I think you were also going to review and make sure this captured all of the cases that you needed to capture for redirects.

@kathy-phet
Copy link
Author

@jonathanolson - also, this is a candidate for a maintenance release to PhET brand, once we are sure we have fixed all cases and are happy with the PhET brand behavior.

@samreid samreid removed their assignment Aug 12, 2022
@zepumph
Copy link
Member

zepumph commented Aug 15, 2022

Adding behavior for openPopup makes sense, but it doesn't capture the spirit of converting query parameters to behavior that is covered/duplicated by the PhET-iO API so that it can be mutated in PhET-iO and thus supported in the standard wrapper. To do that, this would need to run off of a Property, which is kinda a no-no in phet-core.

UPDATE: Noting that this issue is in part coming out of https://github.com/phetsims/phet-io/issues/1871 where we also want to have the PhET-iO support to control this query parameter.

zepumph added a commit to phetsims/phet-core that referenced this issue Aug 15, 2022
zepumph added a commit to phetsims/phet-core that referenced this issue Aug 15, 2022
@zepumph
Copy link
Member

zepumph commented Aug 16, 2022

@jonathanolson and I discussed this, and in order to have allowLinks running from a Property, we are going to move openPopup to sun, so that it can depend on axon Property.

@zepumph
Copy link
Member

zepumph commented Aug 16, 2022

Steps for this issue:

  • Have ?allowLinks set the initialValue of a PhET-iO instrumented Property, that is customizable in studio. This shouldn't be in joist/ because we still want to be able to use the Property in openPopup
  • Convert usages of the allowLinks query parameter to instead dynamically adjust behavior based on the state of the Property
  • Move openPopup to a place where it can use the Property. @jonathanolson and I were ok with sun/, but were open to other ideas.

Assigning to whoever gets to it first.

@zepumph
Copy link
Member

zepumph commented Aug 18, 2022

@samreid, @arouinfar, @kathy-phet and I discussed this a bit more, and we have a new recommendation.

  • We want to move openPopup to scenery, and create the allowLinksProperty singleton in scenery.

new BooleanProperty( phet.chipper.queryParameters.allowLinks, {
  tandem: Tandem.ROOT.GENERAL_MODEL.createTandem( 'allowLinksProperty' )
} );

@kathy-phet asked us to also assign @jonathanolson to this issue.

@jonathanolson, please make sure to move the git history of openPopup. Please don't use the shell script because openPopup has been renamed to ts. Instead use copy-history-to-different-repo.js.

@jonathanolson jonathanolson self-assigned this Aug 18, 2022
@samreid samreid removed their assignment Aug 19, 2022
jonathanolson added a commit to phetsims/build-a-molecule that referenced this issue Aug 24, 2022
jonathanolson added a commit to phetsims/scenery-phet that referenced this issue Aug 24, 2022
jonathanolson added a commit to phetsims/projectile-motion that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/proportion-playground that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/ratio-and-proportion that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/reactants-products-and-leftovers that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/resistance-in-a-wire that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/resistance-in-a-wire that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/rutherford-scattering that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/states-of-matter that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/states-of-matter-basics that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/trig-tour that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/under-pressure that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/unit-rates that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/vector-addition that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/vector-addition-equations that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/wave-interference that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/wave-on-a-string that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/waves-intro that referenced this issue Nov 26, 2022
jonathanolson added a commit to phetsims/scenery that referenced this issue Nov 30, 2022
jonathanolson added a commit to phetsims/build-a-nucleus that referenced this issue Nov 30, 2022
jonathanolson added a commit to phetsims/build-a-nucleus that referenced this issue Dec 2, 2022
jonathanolson added a commit to phetsims/center-and-variability that referenced this issue Dec 2, 2022
jonathanolson added a commit to phetsims/geometric-optics-basics that referenced this issue Dec 2, 2022
jonathanolson added a commit to phetsims/greenhouse-effect that referenced this issue Dec 2, 2022
jonathanolson added a commit to phetsims/mean-share-and-balance that referenced this issue Dec 2, 2022
jonathanolson added a commit to phetsims/normal-modes that referenced this issue Dec 2, 2022
jonathanolson added a commit to phetsims/number-play that referenced this issue Dec 2, 2022
@jonathanolson
Copy link
Contributor

Maintenance complete, closing.

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

7 participants