Re: [css-device-adapt] Wording regarding orientation.

On Nov 7, 2012, at 3:25 PM, Ryan Betts <rbetts@adobe.com> wrote:

> Kenneth and Brad - both really good points. There might be two context-dependent recommended default behaviours.
> 
> Kenneth's point about the "normal browser" disabling orientation change is well heard. This is broadly covered where the last line states "It is recommended that it is ignored for normal web navigation to avoid confusing the user." In that context, modifying orientation of the DOM contents is more overtly experienced as a `behaviour` rather than an element of `presentation,` so I agree that defaulting to (b) and then allowing user action to instigate the switch seems logical. 
> 
> Brad and I have the same gut instinct about mimicking the way native apps honour orientation preferences. But this is probably only (or at least more significantly) relevant in a standalone/fullscreen context. Because there is an expressed desire on the part of the user to treat this as an app, (a) makes more sense to me as the default. Incidentally, the fullscreen browser toggle on iOS is only available via landscape mode so at least on that platform it'd be pretty harmonious with the way the browser works.
> 
> If we defaulted to (a) in the browser w/ chrome, it'd be a bit of a weird experience. In native apps, the orientation only ever forces a change based on user action (even if that action is just launching the app). If the user hits your URL in portrait and the content really only works in landscape, then there should probably be an interstitial instructing them the rotate their device, or (as Kenneth has suggested) a button that makes use of a programmatic interface [1] to lock the orientation to landscape.

I think if a button or message can up every time the pop hone thought I was a little to vertical (which can be often when the phone is held most flat, such as when resting the hands holding it in your lap), that would be very annoying. It needs to be able to lock for things like games if a certain kind or for video. 

> But I think it's best that people don't have to be rotating their phones by default in the "normal browser."

I think that if the content really only works in landscape, we should honor the author's choice. Otherwise, authors will resort to hacks like using media queries to detect portrait and then applying a transform to turn the content 90deg. If authors can't tell if or control when full screen mode is on, they will likely use script to keep the top chrome scrolled off screen. 

> Thoughts? I'm really leaning to (a) for app-like contexts and (b) for the "normal browser". 

I suppose if author-controlled ability to go full screen was guaranteed, and that was considered an app-like context, then that could be OK. I'm concerned though that Apple or Android or MS or Opera might support orientation control but not full screen control. 

> 
> Cheers.
> -Ryan
> 
> [1] http://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html#current-orientation
> 
> On 2012-11-07, at 2:52 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> 
>> On Nov 7, 2012, at 9:52 AM, Ryan Betts <rbetts@adobe.com> wrote:
>> 
>>> Hey Kenneth,
>>> 
>>> Good point about potential conflicts between the @viewport orientation attribute and UA/OS restrictions. I think the way this is clarified might warrant more discussion, as I can think of a number of instances when I've been using devices locked in an orientation and the app's preference has over-ridden it (landscape-locked games are a great example).
>>> 
>>> The question at hand: in the instance of a conflict should it be the @viewport attribute or the UA / OS that is allowed to narrow the scope of available orientation options? 
>>> 
>>> Where '->' expresses the direction of the orientation override, the options seem to be:
>>> a) @viewport -> UA -> OS
>>> b) OS -> UA -> @viewport
>>> 
>>> So, if the OS says "portrait only" and @viewport says "no - landscape only," then (a) would result in `landscape` being honoured whereas (b) would result in `portrait` being honoured. Given that (b) could break the user experience I think that (a) would be the desired behaviour. Does that sound reasonable?
>> 
>> I think that's right If I lock the orientation of my iPhone screen to vertical, then AFAIK, none of my apps will know the difference between that and the situation where I've never rotated my phone out of that orientation. But this does not prevent some apps from using the device's long dimension as width (and some apps are like that, as you point out). So the browser app should be consistent. If @viewport is telling the browser to go landscape, then it should (or at least let the viewport go landscape), regardless of what is known or not about orientation. 
>> 
>> Otherwise, your fixed width/height HTML app might end up letterboxed and tiny on a vertical screen. While I have seen some video that acts that way in some apps, I've also seen some that will always play the video in device landscape regardless of orientation and orientation lock. So that kind of thing should be allowed via @viewport.
> 

Received on Thursday, 8 November 2012 18:43:34 UTC