Last Comment Bug 317518 - Support repeat appearance="compact"
: Support repeat appearance="compact"
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core
Classification: Components
Component: XForms (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: ---
Assigned To: alexander :surkov
: Stephen Pride
Mentors:
Depends on: 306247
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-22 20:51 PST by alexander :surkov
Modified: 2006-06-06 06:59 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
xhtml testcase (904 bytes, application/xhtml+xml)
2006-04-25 20:44 PDT, alexander :surkov
no flags Details
xul testcase (1.19 KB, application/vnd.mozilla.xul+xml)
2006-04-25 20:44 PDT, alexander :surkov
no flags Details
patch (17.72 KB, patch)
2006-04-26 19:04 PDT, alexander :surkov
no flags Details | Diff | Review
patch (1.06 KB, patch)
2006-04-26 19:09 PDT, alexander :surkov
allan: review+
bugs: review+
Details | Diff | Review

Description alexander :surkov 2005-11-22 20:51:58 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051116 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051116 Firefox/1.6a1

Now items generated by repeat have vertical layout. I guess repeat should have a possibility to specify what layout should be used.

Reproducible: Always
Comment 1 Allan Beaufour 2005-11-24 06:13:50 PST
XBLizing repeat would solve that. See bug 306247

*** This bug has been marked as a duplicate of 306247 ***
Comment 2 alexander :surkov 2006-04-24 19:49:04 PDT
I prefer to provide repeat orient support here instead that to do it in bug 306247. I guess repeat for xul and xhtml should provide a common way to set orient. Allan proposes to use appearance="compact" attribute. But if I understand right then he don't like a much a "compact" value. Also there are issues with contextcontainer flex for horizontal repeats. Default xul behaviour is that contextcontainer should be flexed. But I cannot find a way how xforms author can remove contextcontainer flexing without using css styles for contextcontainer (imo using such styles is not right way).
Comment 3 Allan Beaufour 2006-04-25 00:26:49 PDT
(In reply to comment #2)
> I prefer to provide repeat orient support here instead that to do it in bug
> 306247. I guess repeat for xul and xhtml should provide a common way to set
> orient. Allan proposes to use appearance="compact" attribute. But if I
> understand right then he don't like a much a "compact" value.

That's just grumpy old Allan :) The spec. defines the values:
http://www.w3.org/TR/2006/REC-xforms-20060314/slice8.html#attrs-ui-common
So we should probably have vertical layout as the default, and then horisontal layout as "compact".

> Also there are issues with contextcontainer flex for horizontal repeats.
> Default xul behaviour is that contextcontainer should be flexed. But I cannot
> find a way how xforms author can remove contextcontainer flexing without using
> css styles for contextcontainer (imo using such styles is not right way).

I on the other hand think that CSS styling is the right way :)
Comment 4 alexander :surkov 2006-04-25 00:33:19 PDT
(In reply to comment #3)
> The spec. defines the values:
> http://www.w3.org/TR/2006/REC-xforms-20060314/slice8.html#attrs-ui-common
> So we should probably have vertical layout as the default, and then horisontal
> layout as "compact".

It's fine.

> 
> > Also there are issues with contextcontainer flex for horizontal repeats.
> > Default xul behaviour is that contextcontainer should be flexed. But I cannot
> > find a way how xforms author can remove contextcontainer flexing without using
> > css styles for contextcontainer (imo using such styles is not right way).
> 
> I on the other hand think that CSS styling is the right way :)
> 

I have in view that it's not very good if xforms author will do:
repeat contextcontainer {
  /* some styles */
}
because contextcontainer is a part of internal structure of repeat element.
Comment 5 Allan Beaufour 2006-04-25 00:43:35 PDT
(In reply to comment #4)
> I have in view that it's not very good if xforms author will do:
> repeat contextcontainer {
>   /* some styles */
> }
> because contextcontainer is a part of internal structure of repeat element.

xf|repeat .xf-repeat-item {
  /* some styles */
}
Comment 6 alexander :surkov 2006-04-25 00:47:38 PDT
(In reply to comment #5)

> xf|repeat .xf-repeat-item {
>   /* some styles */
> }
> 

It's very fine. There is one question. Should contextcontainer be flexed by default in horizontal repeats?
Comment 7 Allan Beaufour 2006-04-25 00:54:58 PDT
(In reply to comment #6)
> (In reply to comment #5)
> 
> > xf|repeat .xf-repeat-item {
> >   /* some styles */
> > }
> > 
> 
> It's very fine. There is one question. Should contextcontainer be flexed by
> default in horizontal repeats?

Eh. Whatever is natural. I guess that flex is off per default for controls, so it should also be off per default for repeats.
Comment 8 alexander :surkov 2006-04-25 20:44:04 PDT
Created attachment 219832 [details]
xhtml testcase
Comment 9 alexander :surkov 2006-04-25 20:44:27 PDT
Created attachment 219833 [details]
xul testcase
Comment 10 alexander :surkov 2006-04-26 19:04:11 PDT
Created attachment 219964 [details] [diff] [review]
patch
Comment 11 alexander :surkov 2006-04-26 19:09:56 PDT
Created attachment 219965 [details] [diff] [review]
patch

Sorry previously attached file is not a patch. :)
Comment 12 Allan Beaufour 2006-04-27 03:07:59 PDT
Fixed on trunk.

Note You need to log in before you can comment on or make changes to this bug.