Re: View modes and sizes, was Re: Application window state and size

On Thursday, May 9, 2013 at 4:33 PM, Mounir Lamouri wrote:

> On 25/04/13 16:10, Marcos Caceres wrote:
> > (Sorry for top posting … but this is more of a summary…)  
> >  
> > Ok, so it sounds like we are having the old "view modes" discussion:) Thankfully, we already have a W3C Rec for that [1], which supports windowed | floating | fullscreen | maximized | minimized.  
> >  
> > The current manifest supports "fullscreen": true | false.  
> >  
> > If people are really serious about supporting other view modes, then we can change the manifest to allow the various view mode values. Something like:
> >  
> > {
> > …
> > "viewModes": ["fullscreen", "maximized"]
> > ...
> > }
> >  
> > Where viewMode is: A list that denotes the author's preferred view mode, followed by the next most preferred view mode and so forth. When the value is missing, or is left empty, it implies that the author expects the user agent to select an appropriate viewmode for the application.
>  
> Sounds good to me.
>  
> > With regards to width and height, we will need those for the "floating" case. But they only serve as a *hint* for the preferred width and height when the app starts up. I don't think we should add other window positioning information (leave that to the window manager).  
>  
> "width" and "height" information would be needed for the "floating" and
> the "windowed" modes, right?

Yep (well, windowed can be left up to the window manager, but sizing hint is nice).  
> I would prefer to specify "viewModes" if we also fix that. There are a
> lot of stuff that could be defined here like the minimum size the window
> would accept to be in, the maximum maybe? Definitely the preferred size.
> If the three are the same, the UA should know that the window can't be
> resized for example.
>  
> What about:
> "viewSize": { "width": { "min": x, "pref": x, "max": x },
> "height": { "min": y, "pref": y, "max": y} }
>  
It would then be nice to combine these to support either a string or an object (and not to go deeper than one level of nesting, otherwise it gets unmanageable):

 "view_modes": ["fullscreen", {"view_mode": "floating", "min_width": x, "min_height": x, "max": x }]

It almost feels like we are redefining CSS here :)  

Received on Thursday, 9 May 2013 17:29:10 UTC