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

Spot checks for delayed chipper startup #354

Closed
jonathanolson opened this issue Jun 28, 2019 · 10 comments
Closed

Spot checks for delayed chipper startup #354

jonathanolson opened this issue Jun 28, 2019 · 10 comments
Assignees

Comments

@jonathanolson
Copy link
Contributor

See phetsims/chipper#764 and phetsims/tasks#1002 for background information.

I've dev-deployed https://phet-dev.colorado.edu/html/charges-and-fields/1.1.0-dev.7 with the patch for those issues, which will delay the sim require.js startup until suitable conditions (i.e. iframe that isn't hidden) exist.

Some example HTML (can be saved as a file and viewed in a browser) that can help trigger the issue is:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Hidden Sim test</title>
  </head>
  <body>

  <div hidden id="container">
    <iframe width="800" height="600" src="https://phet-dev.colorado.edu/html/charges-and-fields/1.1.0-dev.7/phet/charges-and-fields_en_phet.html" id="iframe" allowfullscreen scrolling="no" title="Some Title"></iframe>
  </div>

  <button id="testButton">Toggle Hidden</button>

  </body>

  <script type="text/javascript">
    const container = document.getElementById( 'container' );
    const button = document.getElementById( 'testButton' );
    button.addEventListener( 'click', ( event ) => {
      if ( container.hidden ) {
        container.removeAttribute( 'hidden' );
      }
      else {
        container.hidden = true;
      }
    } );
  </script>
</html>

I'd recommend trying out the phet and phet-io brand files in multiple configurations (LoL, anywhere iframes are concerned, and particularly any place the sim may be hidden) to see if this breaks anything.

I'd also appreciate some cross-browser testing to ensure that this won't break on any of our supported platforms.

@ariel-phet, anything else you think should be tested for this change?

@ariel-phet
Copy link
Contributor

@KatieWoe I think this would be good to basically test on all supported platforms and in the ways @jonathanolson mentions above. High priority for the moment since not much in the testing queue, but will get bumped down if other things come up.

@jonathanolson
Copy link
Contributor Author

Additionally, the above HTML is now at the link https://phet-dev.colorado.edu/olsonjb/hidden-test.html, so I'd like that tested on all platforms if possible.

@ghost
Copy link

ghost commented Jul 3, 2019

Testing Platforms

  • iOS 11 + Safari
  • iOS 12 + Safari

  • macOS 10.10 + Safari
  • macOS 10.11 + Safari
  • macOS 10.11 + Chrome
  • macOS 10.12 + Safari
  • macOS 10.12 + Chrome
  • macOS 10.13 + Safari
  • macOS 10.13 + Chrome
  • macOS 10.14 + Safari
  • macOS 10.14 + Chrome

  • Win7 + IE
  • Win7 + Chrome
  • Win7 + FF

  • Win10 + Edge
  • Win10 + Chrome
  • Win10 + FF

  • ChromeOS

@KatieWoe, please review.

@KatieWoe
Copy link
Contributor

KatieWoe commented Jul 3, 2019

@jonathanolson the hidden/unhidden html doesn't seem to load (nothing on the progress bar) on Win 10 firefox.
consoleerror
Edit: On Windows 10 Edge it does not show up at all. Pressing the button does nothing. Didn't see anything in the console.

@KatieWoe
Copy link
Contributor

KatieWoe commented Jul 3, 2019

Sim looks fine on the hidden/unhidden page of iOS 12 safari. But the page can be scrolled up and down.
https://drive.google.com/file/d/1gCA2uQmrh6Kgs_-WjOnG5dC7XXqQRgYK/view?usp=sharing
Edit: Seems to be safari in general.

@ghost
Copy link

ghost commented Jul 3, 2019

https://phet-dev.colorado.edu/olsonjb/hidden-test.html not working on Win7 + IE.

@KatieWoe
Copy link
Contributor

KatieWoe commented Jul 3, 2019

Safari 10.1.2 on Mac 10.10.5 won't show the sim when the hidden button is clicked much like in Edge.
Error:

SntaxError: Can't create duplicate variable that shadows a global property: 'container'
N (anonymous function)

@KatieWoe
Copy link
Contributor

KatieWoe commented Jul 3, 2019

QA is done. Let me know if the comments above should be issues and where they should go.

@jonathanolson
Copy link
Contributor Author

Thanks!

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

3 participants