Re: [w3c/screen-orientation] Editorial: 2.1 Orientation attribute, 3. Screen Orientation and enums (#139)

marcoscaceres approved this pull request.

Looks great. Approved with nits! 

> @@ -140,7 +140,11 @@ <h2>
         </h2>
         <p>
           The <a data-link-for="Screen">orientation</a> attribute is an
-          instance of <a>ScreenOrientation</a>.
+          instance of <a>ScreenOrientation</a>. This attribute provides the

We need to remember here to figure out some hook for this. That is, we need to look at how HTML initializes the document, and somehow use that to initialize these values. 

We don't need to do it in this PR, but we should file a bug to fix this. 

> +            "any",
+            "natural",
+            "landscape",
+            "portrait",
+            "portrait-primary",
+            "portrait-secondary",
+            "landscape-primary",
+            "landscape-secondary"
+          };
+
+          enum OrientationType {
+            "portrait-primary",
+            "portrait-secondary", 
+            "landscape-primary",
+            "landscape-secondary"
+          };
         </pre>

```suggestion
      </pre>
```

>          </pre>
+      <p data-dfn-for="OrientationLockType">
+        The <dfn>OrientationLockType</dfn> enum represents the screen
+        orientations to which a screen can be locked: the "<dfn>any</dfn>" enum
+        value represents the <a>any</a> orientation, the "<dfn>natural</dfn>"
+        enum represents the <a>natural</a> orientation, the
+        "<dfn>landscape</dfn>" enum represents the <a>landscape</a>
+        orientation, the "<dfn>portrait</dfn>" enum represents the
+        <a>portrait</a> orientation, the "<dfn>portrait-primary</dfn>" enum
+        represents the <a>portrait-primary</a> orientation, the
+        "<dfn>portrait-secondary</dfn>" enum represents the
+        <a>portrait-secondary</a> orientation, the
+        "<dfn>landscape-primary</dfn>" enum represents the
+        <a>landscape-primary</a> orientation and the

Please use Oxford commas (insert Brexit joke here). 

```suggestion
        <a>landscape-primary</a> orientation, and the
```

> +        "<dfn>portrait-secondary</dfn>" enum represents the
+        <a>portrait-secondary</a> orientation, the
+        "<dfn>landscape-primary</dfn>" enum represents the
+        <a>landscape-primary</a> orientation and the
+        "<dfn>landscape-secondary</dfn>" enum represents the
+        <a>landscape-secondary</a> orientation.
+      </p>
+      <p data-dfn-for="OrientationType">
+        The <dfn>OrientationType</dfn> enum represents the actual current
+        screen orientation that the screen is in irrespective of which lock is
+        applied: the "<dfn>portrait-primary</dfn>" enum represents the
+        <a>portrait-primary</a> orientation, the
+        "<dfn>portrait-secondary</dfn>" enum represents the
+        <a>portrait-secondary</a> orientation, the
+        "<dfn>landscape-primary</dfn>" enum represents the
+        <a>landscape-primary</a> orientation and the

```suggestion
        <a>landscape-primary</a> orientation, and the
```

> @@ -280,6 +299,67 @@ <h2>
         initially set to <code>null</code>, which is a promise whose associated
         operation is to lock the screen orientation.
       </p>
+      <section>
+        <h2>
+          Screen orientation types and locks
+        </h2>
+        <p>
+          <dfn>landscape-primary</dfn> is an orientation where the screen width

```suggestion
          <dfn>Landscape-primary</dfn> is an orientation where the screen width
```

> @@ -280,6 +299,67 @@ <h2>
         initially set to <code>null</code>, which is a promise whose associated
         operation is to lock the screen orientation.
       </p>
+      <section>
+        <h2>
+          Screen orientation types and locks
+        </h2>
+        <p>
+          <dfn>landscape-primary</dfn> is an orientation where the screen width
+          is greater than the screen height. If the device's natural
+          orientation is landscape, then it is in landscape-primary when held
+          in that position. If the device's natural orientation is portrait,
+          the <a>user agent</a> sets landscape-primary from the two options as
+          shown <a>screen orientation values table</a>.
+        </p>
+        <p>
+          <dfn>landscape-secondary</dfn> is an orientation where the screen

```suggestion
          <dfn>Landscape-secondary</dfn> is an orientation where the screen
```

> +        <h2>
+          Screen orientation types and locks
+        </h2>
+        <p>
+          <dfn>landscape-primary</dfn> is an orientation where the screen width
+          is greater than the screen height. If the device's natural
+          orientation is landscape, then it is in landscape-primary when held
+          in that position. If the device's natural orientation is portrait,
+          the <a>user agent</a> sets landscape-primary from the two options as
+          shown <a>screen orientation values table</a>.
+        </p>
+        <p>
+          <dfn>landscape-secondary</dfn> is an orientation where the screen
+          width is greater than the screen height. If the device's natural
+          orientation is landscape, it is in landscape-secondary when rotated
+          180º from it's natural orientation. If the device's natural

```suggestion
          180º from its natural orientation. If the device's natural
```

> +          orientation is landscape, then it is in landscape-primary when held
+          in that position. If the device's natural orientation is portrait,
+          the <a>user agent</a> sets landscape-primary from the two options as
+          shown <a>screen orientation values table</a>.
+        </p>
+        <p>
+          <dfn>landscape-secondary</dfn> is an orientation where the screen
+          width is greater than the screen height. If the device's natural
+          orientation is landscape, it is in landscape-secondary when rotated
+          180º from it's natural orientation. If the device's natural
+          orientation is portrait, the <a>user agent</a> sets
+          landscape-secondary from the two options as shown in the <a>screen
+          orientation values table</a>.
+        </p>
+        <p>
+          <dfn>portrait-primary</dfn> is an orientation where the screen width

```suggestion
          <dfn>Portrait-primary</dfn> is an orientation where the screen width
```

> +        <h2>
+          Screen orientation types and locks
+        </h2>
+        <p>
+          <dfn>landscape-primary</dfn> is an orientation where the screen width
+          is greater than the screen height. If the device's natural
+          orientation is landscape, then it is in landscape-primary when held
+          in that position. If the device's natural orientation is portrait,
+          the <a>user agent</a> sets landscape-primary from the two options as
+          shown <a>screen orientation values table</a>.
+        </p>
+        <p>
+          <dfn>landscape-secondary</dfn> is an orientation where the screen
+          width is greater than the screen height. If the device's natural
+          orientation is landscape, it is in landscape-secondary when rotated
+          180º from it's natural orientation. If the device's natural

Check for other its and it's, just in case. 

> +          orientation is landscape, it is in landscape-secondary when rotated
+          180º from it's natural orientation. If the device's natural
+          orientation is portrait, the <a>user agent</a> sets
+          landscape-secondary from the two options as shown in the <a>screen
+          orientation values table</a>.
+        </p>
+        <p>
+          <dfn>portrait-primary</dfn> is an orientation where the screen width
+          is less than or equal to the screen height. If the device's natural
+          orientation is portrait, then it is in portrait-primary when held in
+          that position. If the device's natural orientation is landscape, the
+          <a>user agent</a> sets portrait-primary from the two options as shown
+          in the <a>screen orientation values table</a>.
+        </p>
+        <p>
+          <dfn>portrait-secondary</dfn> is an orientation where the screen

```suggestion
          <dfn>Portrait-secondary</dfn> is an orientation where the screen
```

>            rotation. In other words, if a device is turned 90 degrees on the
           right, the <a>current orientation angle</a> would be 270 degrees.
           </li>
         </ol>
       </section>
-      <section data-dfn-for="OrientationLockType">
+      <section data-dfn-for="OrientationLockType" data-link-for=

This shouldn't define `OrientationLockType` things... if it does, then that's a bug.  

```suggestion
      <section data-link-for=
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/screen-orientation/pull/139#pullrequestreview-198513248

Received on Thursday, 31 January 2019 10:27:18 UTC