Closed Bug 317518 Opened 16 years ago Closed 15 years ago

Support repeat appearance="compact"

Categories

(Core Graveyard :: XForms, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

References

Details

(Keywords: fixed1.8.0.5, fixed1.8.1)

Attachments

(3 files, 1 obsolete file)

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
XBLizing repeat would solve that. See bug 306247

*** This bug has been marked as a duplicate of 306247 ***
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Summary: repeat layout → Make it possible to change repeat layout
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
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).
Assignee: aaronr → surkov
Status: UNCONFIRMED → NEW
Depends on: 306247
Ever confirmed: true
Status: NEW → ASSIGNED
(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 :)
(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.
(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 */
}
(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?
(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.
Attached file xhtml testcase
Attached file xul testcase
Attached patch patch (obsolete) — Splinter Review
Attachment #219964 - Flags: review?(allan)
Attachment #219964 - Flags: review?(Olli.Pettay)
Attached patch patchSplinter Review
Sorry previously attached file is not a patch. :)
Attachment #219964 - Attachment is obsolete: true
Attachment #219965 - Flags: review?(allan)
Attachment #219964 - Flags: review?(allan)
Attachment #219964 - Flags: review?(Olli.Pettay)
Attachment #219965 - Flags: review?(Olli.Pettay)
Attachment #219965 - Flags: review?(allan) → review+
Attachment #219965 - Flags: review?(Olli.Pettay) → review+
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago15 years ago
Resolution: --- → FIXED
Summary: Make it possible to change repeat layout → Support repeat appearance="compact"
Whiteboard: xf-to-branch
Keywords: fixed1.8.1
Keywords: fixed1.8.0.5
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.