Skip to content

Commit

Permalink
Fix multiple documentation issues #trivial (#1073)
Browse files Browse the repository at this point in the history
  • Loading branch information
maicki authored and nguyenhuy committed Aug 20, 2018
1 parent 5f912d1 commit 022b6b7
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 42 deletions.
1 change: 0 additions & 1 deletion docs/_data/nav_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
- title: Advanced Technologies
items:
- asvisibility
- asenvironment
- asrunloopqueue
- title: Node Containers
items:
Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/asrunloopqueue.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: ASRunLoopQueue
layout: docs
permalink: /docs/asrunloopqueue.html
prevPage: asenvironment.html
prevPage: asvisibility.html
---

Even with main thread work, Texture is able to dramatically reduce its impact on the user experience by way of the rather amazing ASRunLoopQueue.
Expand Down
8 changes: 4 additions & 4 deletions docs/_docs/automatic-layout-containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Both nodes and layoutSpecs conform to the `<ASLayoutable>` protocol. Any `ASLay

### Single Child layoutSpecs

<table style="width:100%" class = "paddingBetweenCols">
<table style="width:100%" class="paddingBetweenCols">
<tr>
<th>LayoutSpec</th>
<th>Description</th>
Expand All @@ -39,10 +39,10 @@ Both nodes and layoutSpecs conform to the `<ASLayoutable>` protocol. Any `ASLay
</tr>
<tr>
<td><b><code>ASRatioLayoutSpec</code></b></td>
<td><p>Lays out a component at a fixed aspect ratio (which can be scaled).</p> <p><i>This spec is great for objects that do not have an intrinisic size, such as ASNetworkImageNodes and <code>ASVideoNodes</code>.</i></p> </td>
<td><p>Lays out a component at a fixed aspect ratio (which can be scaled).</p> <p><i>This spec is great for objects that do not have an intrinisic size, such as ASNetworkImageNodes and <code>ASVideoNodes</code>.</i></p></td>
</tr>
<tr>
<td><b><code>ASRelativeLayoutSpec<code></b></td>
<td><b><code>ASRelativeLayoutSpec</code></b></td>
<td><p>Lays out a component and positions it within the layout bounds according to vertical and horizontal positional specifiers. Similar to the “9-part” image areas, a child can be positioned at any of the 4 corners, or the middle of any of the 4 edges, as well as the center.</p> </td>
</tr>
<tr>
Expand Down Expand Up @@ -70,7 +70,7 @@ The following layoutSpecs may contain one or more children.
</tr>
</table>

# ASLayoutable Properties
### ASLayoutable Properties

The following properties can be applied to both nodes _and_ `layoutSpec`s; both conform to the `ASLayoutable` protocol.

Expand Down
70 changes: 35 additions & 35 deletions docs/_docs/layout2-layout-element-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,42 @@ nextPage: layout2-api-sizing.html
<th>Description</th>
</tr>
<tr>
<td><b>`CGFloat .style.spacingBefore`</b></td>
<td><b><code>CGFloat .style.spacingBefore</code></b></td>
<td>Additional space to place before this object in the stacking direction.</td>
</tr>
<tr>
<td><b>`CGFloat .style.spacingAfter`</b></td>
<td><b><code>CGFloat .style.spacingAfter</code></b></td>
<td>Additional space to place after this object in the stacking direction.</td>
</tr>
<tr>
<td><b>`CGFloat .style.flexGrow`</b></td>
<td><b><code>CGFloat .style.flexGrow</code></b></td>
<td>If the sum of childrens' stack dimensions is less than the minimum size, should this object grow?</td>
</tr>
<tr>
<td><b>`CGFloat .style.flexShrink`</b></td>
<td><b><code>CGFloat .style.flexShrink</code></b></td>
<td>If the sum of childrens' stack dimensions is greater than the maximum size, should this object shrink?</td>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.flexBasis`</b></td>
<td>Specifies the initial size for this object, in the stack dimension (horizontal or vertical), before the `flexGrow` / `flexShrink` properties are applied and the remaining space is distributed. </td>
<td><b><code><a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.flexBasis</code></b></td>
<td>Specifies the initial size for this object, in the stack dimension (horizontal or vertical), before the <code>flexGrow</code> / <code>flexShrink</code> properties are applied and the remaining space is distributed.</td>
</tr>
<tr>
<td><b>`ASStackLayoutAlignSelf .style.alignSelf`</b></td>
<td><b><code>ASStackLayoutAlignSelf .style.alignSelf</code></b></td>
<td>Orientation of the object along cross axis, overriding alignItems. Options include:
<ul>
<li>`ASStackLayoutAlignSelfAuto`</li>
<li>`ASStackLayoutAlignSelfStart`</li>
<li>`ASStackLayoutAlignSelfEnd`</li>
<li>`ASStackLayoutAlignSelfCenter`</li>
<li>`ASStackLayoutAlignSelfStretch`</li>
<li><code>ASStackLayoutAlignSelfAuto</code></li>
<li><code>ASStackLayoutAlignSelfStart</code></li>
<li><code>ASStackLayoutAlignSelfEnd</code></li>
<li><code>ASStackLayoutAlignSelfCenter</code></li>
<li><code>ASStackLayoutAlignSelfStretch</code></li>
</ul></td>
</tr>
<tr>
<td><b>`CGFloat .style.ascender`</b></td>
<td><b><code>CGFloat .style.ascender</code></b></td>
<td>Used for baseline alignment. The distance from the top of the object to its baseline.</td>
</tr>
<tr>
<td><b>`CGFloat .style.descender`</b></td>
<td><b><code>CGFloat .style.descender</code></b></td>
<td>Used for baseline alignment. The distance from the baseline of the object to its bottom.</td>
</tr>
</table>
Expand All @@ -75,8 +75,8 @@ nextPage: layout2-api-sizing.html
<th>Description</th>
</tr>
<tr>
<td><b>`CGPoint .style.layoutPosition`</b></td>
<td>The `CGPoint` position of this object within its `ASAbsoluteLayoutSpec` parent spec.</td>
<td><b><code>CGPoint .style.layoutPosition</code></b></td>
<td>The <code>CGPoint</code> position of this object within its <code>ASAbsoluteLayoutSpec</code> parent spec.</td>
</tr>
</table>

Expand All @@ -92,55 +92,55 @@ nextPage: layout2-api-sizing.html
<th>Description</th>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.width`</b></td>
<td>The `width` property specifies the width of the content area of an `ASLayoutElement`. The `minWidth` and `maxWidth` properties override `width`. Defaults to `ASDimensionAuto`.</td>
<td><b><code><a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.width</code></b></td>
<td>The <code>width</code> property specifies the width of the content area of an <code>ASLayoutElement</code>. The <code>minWidth</code> and <code>maxWidth</code> properties override <code>width</code>. Defaults to <code>ASDimensionAuto</code>.</td>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.height`</b></td>
<td>The `height` property specifies the height of the content area of an `ASLayoutElement`. The `minHeight` and `maxHeight` properties override `height`. Defaults to `ASDimensionAuto`.</td>
<td><b><code><a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.height</code></b></td>
<td>The <code>height</code> property specifies the height of the content area of an <code>ASLayoutElement</code>. The <code>minHeight</code> and <code>maxHeight</code> properties override <code>height</code>. Defaults to <code>ASDimensionAuto</code>.</td>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.minWidth`</b></td>
<td>The `minWidth` property is used to set the minimum width of a given element. It prevents the used value of the `width` property from becoming smaller than the value specified for `minWidth`. The value of `minWidth` overrides both `maxWidth` and `width`. Defaults to `ASDimensionAuto`.</td>
<td><b><code><a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.minWidth</code></b></td>
<td>The <code>minWidth</code> property is used to set the minimum width of a given element. It prevents the used value of the <code>width</code> property from becoming smaller than the value specified for <code>minWidth</code>. The value of <code>minWidth</code> overrides both <code>maxWidth</code> and <code>width</code>. Defaults to <code>ASDimensionAuto</code>.</td>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.maxWidth`</b></td>
<td>The `maxWidth` property is used to set the maximum width of a given element. It prevents the used value of the `width` property from becoming larger than the value specified for `maxWidth`. The value of `maxWidth` overrides `width`, but `minWidth` overrides `maxWidth`. Defaults to `ASDimensionAuto`.</td>
<td><b><code><a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.maxWidth</code></b></td>
<td>The <code>maxWidth</code> property is used to set the maximum width of a given element. It prevents the used value of the <code>width</code> property from becoming larger than the value specified for <code>maxWidth</code>. The value of <code>maxWidth</code> overrides <code>width</code>, but <code>minWidth</code> overrides <code>maxWidth</code>. Defaults to <code>ASDimensionAuto</code>.</td>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.minHeight`</b></td>
<td>The `minHeight` property is used to set the minimum height of a given element. It prevents the used value of the `height` property from becoming smaller than the value specified for `minHeight`. The value of `minHeight` overrides both `maxHeight` and `height`. Defaults to `ASDimensionAuto`.</td>
<td><b><code><a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.minHeight</code></b></td>
<td>The <code>minHeight</code> property is used to set the minimum height of a given element. It prevents the used value of the <code>height</code> property from becoming smaller than the value specified for <code>minHeight</code>. The value of <code>minHeight</code> overrides both <code>maxHeight</code> and <code>height</code>. Defaults to <code>ASDimensionAuto</code>.</td>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.maxHeight`</b></td>
<td>The `maxHeight` property is used to set the maximum height of a given element. It prevents the used value of the `height` property from becoming larger than the value specified for `maxHeight`. The value of `maxHeight` overrides `height`, but `minHeight` overrides `maxHeight`. Defaults to `ASDimensionAuto`</td>
<td><b><code><a href="layout2-api-sizing.html#values-cgfloat-asdimension">ASDimension</a> .style.maxHeight</code></b></td>
<td>The <code>maxHeight</code> property is used to set the maximum height of a given element. It prevents the used value of the <code>height</code> property from becoming larger than the value specified for <code>maxHeight</code>. The value of <code>maxHeight</code> overrides <code>height</code>, but <code>minHeight</code> overrides <code>maxHeight</code>. Defaults to <code>ASDimensionAuto</code></td>
</tr>
<tr>
<td><b>`CGSize .style.preferredSize`</b></td>
<td><b><code>CGSize .style.preferredSize</code></b></td>
<td><p>Provides a suggested size for a layout element. If the optional minSize or maxSize are provided, and the preferredSize exceeds these, the minSize or maxSize will be enforced. If this optional value is not provided, the layout element’s size will default to it’s intrinsic content size provided calculateSizeThatFits:</p>
<p>This method is optional, but one of either preferredSize or preferredLayoutSize is required for nodes that either have no intrinsic content size or should be laid out at a different size than its intrinsic content size. For example, this property could be set on an ASImageNode to display at a size different from the underlying image size.</p>
<p> Warning: calling the getter when the size's width or height are relative will cause an assert.</p></td>
</tr>
<tr>
<td><b>`CGSize .style.minSize`</b></td>
<td><b><code>CGSize .style.minSize</code></b></td>
<td><p>An optional property that provides a minimum size bound for a layout element. If provided, this restriction will always be enforced. If a parent layout element’s minimum size is smaller than its child’s minimum size, the child’s minimum size will be enforced and its size will extend out of the layout spec’s. </p>
<p>For example, if you set a preferred relative width of 50% and a minimum width of 200 points on an element in a full screen container, this would result in a width of 160 points on an iPhone screen. However, since 160 pts is lower than the minimum width of 200 pts, the minimum width would be used.</p></td>
</tr>
<tr>
<td><b>`CGSize .style.maxSize`</b></td>
<td><b><code>CGSize .style.maxSize</code></b></td>
<td><p>An optional property that provides a maximum size bound for a layout element. If provided, this restriction will always be enforced. If a child layout element’s maximum size is smaller than its parent, the child’s maximum size will be enforced and its size will extend out of the layout spec’s. </p>
<p>For example, if you set a preferred relative width of 50% and a maximum width of 120 points on an element in a full screen container, this would result in a width of 160 points on an iPhone screen. However, since 160 pts is higher than the maximum width of 120 pts, the maximum width would be used.</p></td>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#sizes-cgsize-aslayoutsize">ASLayoutSize</a> .style.preferredLayoutSize`</b></td>
<td>Provides a suggested RELATIVE size for a layout element. An ASLayoutSize uses percentages rather than points to specify layout. E.g. width should be 50% of the parent’s width. If the optional minLayoutSize or maxLayoutSize are provided, and the preferredLayoutSize exceeds these, the minLayoutSize or maxLayoutSize will be enforced. If this optional value is not provided, the layout element’s size will default to its intrinsic content size provided `calculateSizeThatFits:`</td>
<td><b><code><a href="layout2-api-sizing.html#sizes-cgsize-aslayoutsize">ASLayoutSize</a> .style.preferredLayoutSize</code></b></td>
<td>Provides a suggested RELATIVE size for a layout element. An ASLayoutSize uses percentages rather than points to specify layout. E.g. width should be 50% of the parent’s width. If the optional minLayoutSize or maxLayoutSize are provided, and the preferredLayoutSize exceeds these, the minLayoutSize or maxLayoutSize will be enforced. If this optional value is not provided, the layout element’s size will default to its intrinsic content size provided <code>calculateSizeThatFits:</code></td>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#sizes-cgsize-aslayoutsize">ASLayoutSize</a> .style.minLayoutSize`</b></td>
<td><b><code><a href="layout2-api-sizing.html#sizes-cgsize-aslayoutsize">ASLayoutSize</a> .style.minLayoutSize</code></b></td>
<td>An optional property that provides a minimum RELATIVE size bound for a layout element. If provided, this restriction will always be enforced. If a parent layout element’s minimum relative size is smaller than its child’s minimum relative size, the child’s minimum relative size will be enforced and its size will extend out of the layout spec’s.</td>
</tr>
<tr>
<td><b>`<a href="layout2-api-sizing.html#sizes-cgsize-aslayoutsize">ASLayoutSize</a> .style.maxLayoutSize`</b></td>
<td><b><code><a href="layout2-api-sizing.html#sizes-cgsize-aslayoutsize">ASLayoutSize</a> .style.maxLayoutSize</code></b></td>
<td>An optional property that provides a maximum RELATIVE size bound for a layout element. If provided, this restriction will always be enforced. If a parent layout element’s maximum relative size is smaller than its child’s maximum relative size, the child’s maximum relative size will be enforced and its size will extend out of the layout spec’s.</td>
</tr>
</table>
2 changes: 1 addition & 1 deletion docs/_docs/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permalink: /docs/team.html
</tr>
<tr>
<td><img src="https://d3vv6lp55qjaqc.cloudfront.net/items/2d1K0a372b1J3V2f071D/Michael-Avatar.jpg" width="100" /></td>
<td><p>Michael Schneider (<a href="https://github.com/maicki">@maicki</a>) is especially passionate about API design and recently led the re-architecture of the layout API for the <a href = "adoption-guide-2-0-beta1.html">2.0 release</a>. As our resident layout expert, Michael volunteers much of his own time to help developers on Texture's public <a href="/slack.html">slack channel</a>. Previous, Michael worked on <a href="https://itunes.apple.com/us/app/pocket-save-articles-videos/id309601447">Pocket</a> for iOS, Mac and Chrome and the <a href="https://itunes.apple.com/us/app/instapaper/id288545208">Instapaper</a> Mac app.</p></td>
<td><p>Michael Schneider (<a href="https://github.com/maicki">@maicki</a>) is especially passionate about API design and recently led the re-architecture of the layout API for the <a href = "adoption-guide-2-0-beta1.html">2.0 release</a>. As our resident layout expert, Michael volunteers much of his own time to help developers on Texture's public <a href="/slack.html">slack channel</a>. Before he joined Pinterest, Michael worked on <a href="https://itunes.apple.com/us/app/pocket-save-articles-videos/id309601447">Pocket</a> for iOS, Mac and Chrome and <a href="https://lifehacker.com/5890510/read-later-brings-instapaper-read-it-later-to-your-macs-desktop">Read Later</a> an Instapaper and Pocket Mac app.</p></td>
</tr>
<tr>
<td><img src="https://avatars.githubusercontent.com/nguyenhuy" width="100" /></td>
Expand Down

0 comments on commit 022b6b7

Please sign in to comment.