-
Notifications
You must be signed in to change notification settings - Fork 12
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
Review Scenery Layout documentation #1418
Comments
In Slack#developer, @jonathanolson said:
|
I've completed my review of the Scenery Layout documentation. The FlowBox and GridBox sections are very nice. After reading, I feel like I have a good general understanding of them, and could get to work with them immediately. The Sizeables section is a little abstract (necessarily, I guess). But I think I understand what's going on here, and how it applies to FlowBox et. al. The Constraints sections are too sparse, not an effective overview. I was left with so many general questions: When do I use Constraints vs Flowbox/Gridbox? Can I use them together? When do I use ManualConstraint vs FlowConstraint vs GridConstraint? Will I need to use them often, or will FlowBox et.al. generally be sufficient? etc. If it's important that developers understand Constraints, then I recommend putting more work into this section. Other specific things that need attention are in the checklist below.
There are many places that use LayoutBox, assuming that they are the base class of HBox and VBox. That is no longer the case. Should LayoutBox be converted to extend FlowBox? Or should uses of LayoutBox be eagerly replaced with FlowBox? Or at the very least, should LayoutBox be deprecated?
If I understand correctly,
- <p>Dividers are also available for easy of use (dividers at the visible start/end and duplicates will be marked as invisible, while all other dividers will be marked as visible:</p>
+ <p>Dividers are also available for easy of use (dividers at the visible start/end and duplicates will be marked as invisible, while all other dividers will be marked as visible):</p>
- <p>Justification controls how extra space is allocated around cells (after any growing possible has been done):</p>
+ <p>Justification controls how extra space is allocated around cells (after any possible growing has been done):</p> - <p>Similarly, alignment can also be customized to individual cells:</p>
+ <p>Similarly, alignment can also be customized by individual cells:</p>
- <p>Spacing between lines (rows/cols) can also be added, which applies when wrapped:</p>
+ <p>Spacing between lines (rows/columns) can also be added, which applies when wrapped:</p> |
Discussed this one with @jonathanolson:
I deprecated LayoutBox in the above commit: /**
* @deprecated use FlowBox
*/
export default class LayoutBox extends Node { And I'm going to replace LayoutBox with HBox or VBox pro-actively, whereever possible in my code. |
Yep, this is very helpful. Changes look great, thanks @jonathanolson! |
Intro looks great, thanks for adding it. |
Assigning @zepumph based on his comment above. |
review:
Overall good job. Things are clear, and I learned a lot. Thanks for all the hard work. |
|
I mentioned it above in the index docs (and put in links to exemplars). However I'm not sure a direct layout link from the tutorial is appropriate. Scenery docs in this format are woefully incomplete, we'll want to restructure to better documentation pages in the future. |
Can you check https://phetsims.github.io/phet-lib/doc/layout-exemplars? (I think it is more fleshed out than the copy you saw in scenery-phet). Additionally, I think it is handled by the issue in #1474 as a separate item. @zepumph can you review the changes above to see if those look good to you? If all looks good, I think we can close this. |
This is all excellent. Thanks! |
Thanks, closing! |
See https://phetsims.github.io/scenery/doc/layout
I'll hopefully have the documentation browsable more easily soon (and at a public URL).
Please check yourself off and unassign once you've reviewed it!
The text was updated successfully, but these errors were encountered: