Re: CfC: publish LCWD of Screen Orientation API; deadline September 18

On Fri, 12 Sep 2014, at 08:52, Jonas Sicking wrote:
> Sorry, my first comment is a naming bikeshed issue. Feel free to
> ignore as it's coming in late, but I hadn't thought of it until just
> now.

I remember a wise person who once said "never count on me to bikeshed
names". I think he was named Jonas Sicking :)

> It's somewhat inconsistent that we use the term "natural" to indicate
> "the most natural direction based on hardware", but we use the term
> "primary" when indicating "the most natural portrait/landscape
> direction based on hardware".
> 
> Why do we use "primary" for one and "natural" for the other?

"natural" and "primary" have very different meaning. There can be only
one "natural" orientation for a device, it's when angle = 0. However,
portrait-primary and portrait-secondary would depend of the context. For
example, I have two monitors in front of me. They are both in portrait
orientation but they could both have different angles, if that was the
case, one device would have angle = 90, one would have angle = 270 but I
would expect to both be portrait-primary.

> Second, I'm still very worried that people will interpret
> screen.orientation.angle=0 as portrait. I don't expect to be able to
> convince people here to remove the property. However I think it would
> be good to at least make it clear in the spec that the .angle property
> can not be used to detect portrait vs. landscape.
> 
> A informative note in the description of the angle property saying
> something like:
> 
> "The value of this property is relative to the "natural" angle of the
> hardware. So for some devices angle will be 0 when the device is in
> landscape mode, and on other devices when the device is in portrait
> mode. Thus this property can not be used to detect landscape vs.
> portrait. The primary use case for this property is to enable doing
> conversions between coordinates relative to the screen and coordinates
> relative to the device (such as the ones returned from the
> DeviceOrientationEvent interface).
> 
> In order to check if the device is in portrait or landscape mode,
> instead use the orientation.type property."

Isn't "Best Practice 1: orientation.angle and orientation.type
relationship" what you are looking for?

> Also, I can't find any normative definition of if orientation.angle
> should increase or decrease if the user rotates a device 90 degrees
> clockwise?

I believe you found the definition in the specification according to
your reply.

-- Mounir

Received on Friday, 12 September 2014 15:07:48 UTC