W3C home > Mailing lists > Public > public-forms@w3.org > November 2007

Re: Urgent: container form controls and display:block

From: John Boyer <boyerj@ca.ibm.com>
Date: Thu, 1 Nov 2007 11:19:21 -0700
To: "Mark Birbeck" <mark.birbeck@formsPlayer.com>
Cc: mark.birbeck@x-port.net, "new Forms WG" <public-forms@w3.org>
Message-ID: <OF135B7046.7C4109D3-ON88257386.00633211-88257386.0064C3D7@ca.ibm.com>
Hi Mark,

OK, that sounds great. 

Happily, we actually now have the "machinery" in the spec to say this kind 
of stuff efficiently.

Here is the snippet of spec xml text resulting from your words of wisdom 
here:

        <item>
           <p diff="add">The default styling of all form controls, 
including <termref def="def-container-form-control">container form 
controls</termref>, should be <code>display:inline</code>, and the default 
styling of a <termref def="def-repeat-item">repeat item</termref> should 
be <code>display:block</code>.</p>
        </item>

This has been placed in "Implementation Requirements Common to All Form 
Controls" (
http://www.w3.org/MarkUp/Forms/specs/XForms1.1/index-diff.html#ui-processing
)

 This version of the spec is being uploaded now...

Thanks!
John M. Boyer, Ph.D.
STSM: Lotus Forms Architect and Researcher
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer





"Mark Birbeck" <mark.birbeck@formsPlayer.com> 
Sent by: mark.birbeck@x-port.net
11/01/2007 10:55 AM

To
John Boyer/CanWest/IBM@IBMCA
cc
"new Forms WG" <public-forms@w3.org>
Subject
Re: Urgent: container form controls and display:block






Hi John,

But if you wanted rows in a table, you wouldn't need to make the
xf:repeat itself a block, you would simply make the 'groups' used for
each row into blocks. And even then, the easiest way to define that is
to set the default style for ::repeat item, since the groups might not
actually exist. (I.e., they are notional.)

The one I'm more concerned about though, is xf:group, since a common
use of xf:group is to do nothing more than provide an evaluation
context for further controls. This means that 'out of the box' XForms
should make the following two techniques indistinguishable:

A:

  <xf:input ref="contact/firstname">
    <xf:label>First name</xf:label>
  </xf:intput>

  <xf:input ref="contact/surname">
    <xf:label>Surname</xf:label>
  </xf:intput>

B:

  <xf:group ref="contact">
    <xf:input ref="firstname">
      <xf:label>First name</xf:label>
    </xf:intput>

    <xf:input ref="surname">
      <xf:label>Surname</xf:label>
    </xf:intput>
  </xf:group>

However, I think it would be confusing for people if the addition of a
xf:group to a form simply to allow for shorter XPath expressions was
to also change the layout.

I don't think the same applies to xf:switch/xf:case, so I don't really
mind which way they go (although as I said on the call yesterday,
since none of them are 'block level' in the proper meaning of the term
I think 'inline' is more appropriate).

So to recap, how about we stick with 'inline' for the elements--or at
least for xf:group--but we set the default style of ::repeat-item to
be a block. I think your justification for this--that, as you say, the
most common use-case for repeat will be 'rows'--is almost certainly
correct.

Regards,

Mark

-- 
  Mark Birbeck, formsPlayer

  mark.birbeck@formsPlayer.com | +44 (0) 20 7689 9232
  http://www.formsPlayer.com | http://internet-apps.blogspot.com

  standards. innovation.

On 01/11/2007, John Boyer <boyerj@ca.ibm.com> wrote:
>
> Just trying to finish up the last few LC comments, and the one from 
Steven
> about default styling of form controls is posing a bit of a problem for 
me.
>
> I am having a really hard time "living with" display:inline as the 
default
> for container form controls because it seems to mean that everyone 
*must*
> use styling to make a simple repeat behave as we all expect it to 
behave.
>
> Granted that there are cases where it can be beneficial to have a group,
> switch or repeat styled as inline, but these controls, as containers are
> generally big box-like things that you tend to want to put things above 
and
> below far more often than next to.
>
> In particular, consider the reasonable default behavior of a repeat. 
Each
> repeat object is a group.  We tend to expect each repeat object to be a
> "row" of the table, which means we vertically stack the repeat object
> groups.  Hence, these groups need to be display:block.
>
> It seems like the best default styling is display:inline for Core Form
> Controls, and display:block for Container Form Controls.
>
> Is anyone not OK with that?
> Steven, what do you think?
>
> John M. Boyer, Ph.D.
>  STSM: Lotus Forms Architect and Researcher
>  Chair, W3C Forms Working Group
>  Workplace, Portal and Collaboration Software
>  IBM Victoria Software Lab
>  E-Mail: boyerj@ca.ibm.com
>
>  Blog:
> http://www.ibm.com/developerworks/blogs/page/JohnBoyer
>
>
Received on Thursday, 1 November 2007 18:21:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:46 UTC