On Mon, Mar 5, 2012 at 8:33 PM, Chris Jones <
cjo...@mozilla.com> wrote:
> Stepping back a bit, we should start with high-level goals. Here's how
> things would work in an ideal world, IMHO
>
> 1. installed-by-default applications (Gaia) all have the same look&feel.
> This is a given.
>
Definitely agree.
> 2. third-party apps installed by the user have the same "native"
> look&feel as default applications.
>
I'm not sure I agree with this one. I can imagine that third party apps
like Facebook and Twitter would want a consistent look-and-feel and
branding across any browser or platform. I get that it's important that
desktop apps look native in Windows/Mac/Linux because of all the window
decorations, but if B2G has no "chrome" then this doesn't seem important
for us.
> 3. apps have "native" look&feel *when installed in multiple UIs*. For
> example, my email app "feels like Gaia" when installed in Gaia, and "feels
> like OWD" when installed in OWD.
>
Partners can always fork and customise Gaia apps for their own brand if
they want, but I'm not sure it's feasible or desirable to try and automate
this.
> 4. but, apps are free to be "alien spaceships", with inconsistent
> look&feel, if they choose. Most full-screen games fall into this category.
>
Sure.
>
> Now, how can we achieve this. In proprietary stacks like iOS and android,
> it's very simple: all apps are written for a proprietary toolkit. So, one
> option is to make a proprietary "Gaia toolkit", and have apps that want
> Gaia look&feel use that toolkit. But we've already seen from previous
> projects that that's not a winning strategy; it means developers will be
> writing "Gaia apps" instead of "Web apps". And of course, there's already
> another major b2g UI under development, OWD, so even now this solution
> doesn't really scale unless we want to fragment the app ecosystem a priori.
> (Hint: we don't.)
>
Strongly agree, we're writing web apps not Gaia or B2G apps.
>
> So ok, what else can we do.
>
> Currently, we achieve (1) above by hand-tailoring all the Gaia apps. That
> is, we get Gaia consistency through per-app effort, not through a more
> general mechanism. Of course the reason things are the way they are is
> expediency, but I think this is the wrong approach in the long run.
> Instead, all the Gaia apps should "feel like Gaia" because a Gaia "system
> style" is in effect.
>
I definitely agree common CSS should be shared but only between
pre-installed Gaia apps, not necessarily a "system style" that should apply
to all apps. There will of course be default system fonts and default
styles for some things like in any web browser.
>
> If we can't have Gaia apps "feel like Gaia" because of a system style,
> then we have no hope of achieving (2) above. And if we can't get (2), we
> can't get (3).
>
I wouldn't try and achieve 2 or 3.
>
> (4) is really easy to do with web technologies, of course: apps ship all
> their own style, overriding system style. So at least part of this is easy
> ;).
>
Agreed.
>
> So I suggest we start in the following way
>
> - make a system-wide gaia.css stylesheet
> - "modularize" consistency by extending gaia.css
>
Agreed.
>
> This is a very simplistic approach, but I think it gets us headed in the
> right direction. We're going to run into hard problems that probably will
> require new HTML/CSS features. In fact, we already know of one ---
> paginated flippable layout, like on the homescreen and in the gallery app.
> We can prototype solutions in JS/CSS, and then move them back to standards.
>
Interesting, I hadn't thought of making this part of HTML/CSS itself!
>
> Eventually, it should be possible to replace gaia.css with owd.css, and
> all of Gaia "feel like" OWD.
>
This seems ambitious to me on a practical level, but perhaps I'm missing
something.
>
> That's my opinion. If you disagree, please do so in the form of concrete
> counterexamples, specific use cases like "we can't do X using this
> approach, so the approach is dumb".
>
I mostly agree with what you say, my only disagreement is that we should
somehow have comprehensive Gaia system styles that apply to third party
apps, but I'm not clear on what the scope of this would be.
For example, iOS and Android have system-wide styles for things like menus
(list of items to select an option from). In HTML I would implement this as
an unordered list of hyperlinks, styled with CSS to look like a menu (100%
width, no bullets, border top and bottom, some padding etc). Applying this
as a system style to all unordered lists would seem overkill because the
web author may just intend a simple bulleted list.
The way I would apply the same menu style to multiple unordered lists would
be to give them class="menu" and then have a CSS style for ul.menu - but
this would require that all 3rd party web app developers add class="menu"
to their HTML so that B2G treats it as a menu.
I'm sure this can't be what you meant, so perhaps I'm missing something?
Ben
--
Ben Francis
http://tola.me.uk