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

Update constrained layout documentation #746

Merged
merged 2 commits into from
Mar 24, 2021
Merged

Conversation

jwiggins
Copy link
Member

Resolves #706

Copy link
Contributor

@notmatthancock notmatthancock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the additional explanations. Just one question.

@@ -90,43 +90,54 @@ also available in Enable. The layout helpers are:

:data:`spacer`: Creates space between two adjacent components.

.. function:: horizontal(*components[, spacing=10])
.. function:: hbox(*components[, spacing=10, margins=...])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ... instead of 0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because margins has several possible values which are enumerated below this line

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I thought this line was meant to indicate the default value that the parameter takes on, not to indicate the range of types that it accepts, which is why I thought it might read 0 instead.

It doesn't matter too much; I was just curious since I hadn't seen ellipsis used like this.

Copy link
Contributor

@aaronayres35 aaronayres35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM

I notice that none of the links to classes, traits, etc. in this file actually successfully link to api docs which would be a nice improvement.

Also, doesn't need to go in to this PR by any means, but a full fledged example and/or some screenshots showing different layouts and code to achieve them might make the documentation much easier/quicker to understand

docs/source/enable/constraints_layout.rst Outdated Show resolved Hide resolved
@jwiggins jwiggins merged commit 4198da2 into master Mar 24, 2021
@jwiggins
Copy link
Member Author

Thanks for the reviews

@jwiggins jwiggins deleted the docs/constrained-optimism branch March 24, 2021 09:44
jwiggins added a commit that referenced this pull request Mar 24, 2021
jwiggins added a commit that referenced this pull request Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable: Fill holes in constraints layout documentation
3 participants