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

Layout exemplar documentation #1474

Closed
jonathanolson opened this issue Oct 11, 2022 · 7 comments
Closed

Layout exemplar documentation #1474

jonathanolson opened this issue Oct 11, 2022 · 7 comments
Assignees

Comments

@jonathanolson
Copy link
Contributor

Noted in #1418:

I would love a section that shows an exemplar sim with real-world layout issues, and arrows/schematics/overlays that show which layouts are appropriate where.

It would be great to take some cases from a dynamic-layout sim, screenshot them + markup showing code snippets or what layout was used where.

@jonathanolson
Copy link
Contributor Author

We should create a page for this, and DIRECTLY embed iframes with sandboxes that illustrate different concepts.

We should also take the demos from the sun demo and put them instead in this exemplar documentation.

I'll set up a documentation (html) page that we can use for this. Presumably in scenery-phet.

@jonathanolson
Copy link
Contributor Author

This exemplar documentation could also document other things, like how to use common components.

jonathanolson added a commit to phetsims/scenery-phet that referenced this issue Oct 24, 2022
jonathanolson added a commit to phetsims/scenery-phet that referenced this issue Oct 24, 2022
jonathanolson added a commit that referenced this issue Oct 24, 2022
jonathanolson added a commit to phetsims/scenery-phet that referenced this issue Oct 24, 2022
@jonathanolson
Copy link
Contributor Author

I'm running up against Chrome failing for trying to concurrently request too many resources (once I've upped the number of iframes):

image

Online, Firefox is suggested, or batching / lazy loading the iframes.

Alternatively, I think I'm going to take a stab at figuring out if we can build a package of scenery/scenery-phet/sun that has the required general components (scenery-phet is somewhat helpful for PhetFont).

Then we'd be able to use the approach used for the scenery documentation, and it would load faster.

@jonathanolson
Copy link
Contributor Author

Additionally, packaging all of those together would be presumably useful for developers outside of PhET.

jonathanolson added a commit to phetsims/phet-lib that referenced this issue Oct 25, 2022
jonathanolson added a commit to phetsims/axon that referenced this issue Oct 25, 2022
jonathanolson added a commit to phetsims/chipper that referenced this issue Oct 25, 2022
jonathanolson added a commit to phetsims/perennial that referenced this issue Oct 25, 2022
jonathanolson added a commit that referenced this issue Oct 25, 2022
jonathanolson added a commit to phetsims/scenery-phet that referenced this issue Oct 25, 2022
jonathanolson added a commit to phetsims/sun that referenced this issue Oct 25, 2022
jonathanolson added a commit to phetsims/phet-info that referenced this issue Oct 25, 2022
jonathanolson added a commit to phetsims/chipper that referenced this issue Oct 25, 2022
@jonathanolson
Copy link
Contributor Author

https://phetsims.github.io/phet-lib/doc/layout-exemplars.html is up and running!

AgustinVallejo added a commit to phetsims/phet-lib that referenced this issue Oct 25, 2022
AgustinVallejo added a commit to phetsims/phet-lib that referenced this issue Oct 25, 2022
marlitas added a commit to phetsims/phet-lib that referenced this issue Oct 25, 2022
marlitas added a commit to phetsims/phet-lib that referenced this issue Oct 26, 2022
@marlitas
Copy link
Contributor

We have converted all the sun demos over to the exemplar documentation. Next steps:

  • Removing layout demo from Sun
  • Finding more best practice exemplars from PhET sims
  • Adding intro examples (using HBox, VBox, how padding is used, etc.)

marlitas added a commit to phetsims/phet-lib that referenced this issue Oct 27, 2022
marlitas added a commit to phetsims/sun that referenced this issue Oct 28, 2022
marlitas added a commit to phetsims/phet-lib that referenced this issue Nov 8, 2022
marlitas added a commit to phetsims/phet-lib that referenced this issue Nov 10, 2022
@jonathanolson
Copy link
Contributor Author

Reviewed with @marlitas, and it looks like the normal layout documentation (with adjusted layoutOptions) covers all of the basic examples. The "Removing layout demo from Sun" is done, and it sounds like it will be best to add case-by-case examples to here in the future. Closing!

jonathanolson added a commit to phetsims/phet-lib that referenced this issue Jul 17, 2024
jonathanolson added a commit that referenced this issue Jul 17, 2024
samreid pushed a commit to phetsims/perennial that referenced this issue Oct 21, 2024
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

2 participants