Re: [FlexJS] get rid of inline styles (was Re: [FlexJS]Layout problems)

2016-12-10 Thread flex capacitor
In Radiate I convert Flex UIComponents to HTML components and had this problem. I made an option to allow styles to be defined inline or in a style sheet. If the option was stylesheet then if the component had an id the styles were declared by id. This included position, size, etc: #myLabel {

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-03 Thread Alex Harui
I took a look and saw that your ListItemRenderer is in the application project, not a library project, but it contains conditional compile code. I'm not sure we've ironed out that workflow. The main idea was that application developers wouldn't need conditional compilation. All APIs they would ne

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-03 Thread Carlos Rovira
Hi Alex, I uploaded all my code in the two last commits so you can see it. Is mostly Peter's Code but the itemRenderer is a copy of StringItemRenderer but put the class in the project example (since people will use normaly a List with different IRs. I had to remove the related SWF code since compi

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Alex Harui
What does your code look like? Sounds like DataItemRenderers are still being created and added. I think the display: block is from VerticalLayout. It uses that to tell the browser to lay things out vertically. position: relative might also come from the layout or some container logic as we've s

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Carlos Rovira
One more thing, Where come from the 8px width in List? The styles in items are as well suspicious 2016-12-03 1:37 GMT+01:00 Carlos Rovira : > Hi, > > just integrate the new List component and beads in MDL. As I changed it > and introduced a custom item renderer (called > itemRenderers/ListItemR

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Carlos Rovira
Hi, just integrate the new List component and beads in MDL. As I changed it and introduced a custom item renderer (called itemRenderers/ListItemRenderer.as) in MDLExample (that is what people will do), I found a strange behaviour. The custom IR is running since I put a trace statement and I see on

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Carlos Rovira
Hi Peter, so cool! I just created the pom.xml and fill the licenses to build with maven. Run the example and check the code. I still eating that food to be able to comment, but seems what I expect :) So many thanks, I'll be playing with it in the following days to apply to MDL components I think

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Alex Harui
This seems mostly right to me. The top-level component is aggregating the interfaces onto itself. More inline... On 12/2/16, 12:41 PM, "Peter Ent" wrote: > >GenericListView does not extend ListView because that leads to this >nesting business we are trying to avoid. Instead, it just extends >Be

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Peter Ent
I've checked in a new example: flex-asjs/examples/flexjs/ListExample. Let me know if this is close to what you are looking for. —peter On 12/2/16, 3:41 PM, "Peter Ent" wrote: >I have something working now. It took a bit more doing than I'd like, but >it is relatively clean. I have to create a n

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Peter Ent
I have something working now. It took a bit more doing than I'd like, but it is relatively clean. I have to create a new example for this or add it to an existing example. But here is the overview: I created a new component called GenericList (since SimpleList is already taken). On the SWF side th

Re: [FlexJS] get rid of inline styles (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Carlos Rovira
Hi Josh, right. As I get some few components more, I think I could refactor removing the dependencies from some HTML comps so we could manage better MDL set. So for example, I will took things from Core, like UIBase or ContainerBase while removing html things like TextButton, Container and so on..

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Carlos Rovira
excelent Peter! I'll be waiting for this :) 2016-12-02 15:47 GMT+01:00 Peter Ent : > I will be looking into this, this morning (shortly). Just for background: > > The ListView creates two things: an outer containment area (div) to house > the chrome (scroll bars, title bars, footer bars, etc) and

Re: [FlexJS] get rid of inline styles (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Josh Tynjala
Alex's first point about using the same beads, but not subclassing sounds cleaner to me, Carlos. Kind of the same idea from the other day where all components should be possible to recreate from UIBase with the right set of beads. You should consider trying that out for MDL. - Josh On Dec 1, 2016

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-02 Thread Peter Ent
I will be looking into this, this morning (shortly). Just for background: The ListView creates two things: an outer containment area (div) to house the chrome (scroll bars, title bars, footer bars, etc) and the content area (ContainerContentArea). When we first set this up, the JS side wasn't sup

Re: [FlexJS] get rid of inline styles (was Re: [FlexJS]Layout problems)

2016-12-01 Thread Alex Harui
Re-ordering your post so I can address higher-level points first: On 12/1/16, 4:55 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" wrote: > >But Basic set is at the core of >all. Is at the core of MDL set > > This statement doesn't have to be true, and makes me think that the old Flex

Re: [FlexJS] get rid of inline styles (was Re: [FlexJS]Layout problems)

2016-12-01 Thread OmPrakash Muppirala
On Thu, Dec 1, 2016 at 4:55 PM, Carlos Rovira wrote: > > I wish I could agree, but I don't think I can. IMO, some component > > features can only be implemented by setting style properties. In the > > example above, to keep Label as single-line (so you don't have to us >   > > and can just use

Re: [FlexJS] get rid of inline styles (was Re: [FlexJS]Layout problems)

2016-12-01 Thread Carlos Rovira
> I wish I could agree, but I don't think I can. IMO, some component > features can only be implemented by setting style properties. In the > example above, to keep Label as single-line (so you don't have to us   > and can just use space), we must set white-space:no-wrap. Allowing folks > to twe

Re: [FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-01 Thread Peter Ent
I'll look into this tomorrow. Peter On Dec 1, 2016, at 7:09 PM, Carlos Rovira wrote: >> >> Anyway, Peter might be able to better answer your question, but it appears >> that if you create some new subclass of UIBase and have it return 'this' >> for layoutHost and contentView, that the ListV

Re: [FlexJS] get rid of inline styles (was Re: [FlexJS]Layout problems)

2016-12-01 Thread Alex Harui
On 12/1/16, 4:01 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" wrote: >to separate things: > >Such as? Depending on your layout, left, top, width, and height will be >> set in CSS. In UIBase, setting the x value sets style.left, etc. If >> there is an alternative, please let me kn

[FlexJS] (Att: Peter Ent) Get rid of extra divs layers we don't want (was Re: [FlexJS]Layout problems)

2016-12-01 Thread Carlos Rovira
> > Anyway, Peter might be able to better answer your question, but it appears > that if you create some new subclass of UIBase and have it return 'this' > for layoutHost and contentView, that the ListView might then just stick > the children in the outer div. See how MXMLItemRenderer (which I > m

[FlexJS] get rid of inline styles (was Re: [FlexJS]Layout problems)

2016-12-01 Thread Carlos Rovira
to separate things: Such as? Depending on your layout, left, top, width, and height will be > set in CSS. In UIBase, setting the x value sets style.left, etc. If > there is an alternative, please let me know what it is. > -Alex > > I get this: some texta button from this:

Re: [FlexJS]Layout problems

2016-12-01 Thread Alex Harui
On 12/1/16, 2:43 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" wrote: >> Can you be more specific? I thought most components were picking up all >> of their styles from defaults.css. Which components aren't doing this? >> >> >Most used like Container, Label or Button not. If you ch

Re: [FlexJS]Layout problems

2016-12-01 Thread Carlos Rovira
> Can you be more specific? I thought most components were picking up all > of their styles from defaults.css. Which components aren't doing this? > > Most used like Container, Label or Button not. If you check html output you will see kilometric properties assigned to style attribute. > I don'

Re: [FlexJS]Layout problems

2016-12-01 Thread Alex Harui
On 12/1/16, 1:57 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" wrote: > >In MDL we don't need any style tag and percents works ok. But if I use >some >HTML.swc comps I get the styles bloating my html and I don't want that. So >for that reason I think we should refactor styles to CSS.

Re: [FlexJS]Layout problems

2016-12-01 Thread Carlos Rovira
If a VIEW bead could solve that problem and remove the nested div, that would be right for me...but we need some working example and a description of how to make that. With js:List I was searching without luck how to remove the extra div layer 2016-12-01 11:12 GMT+01:00 Harbs : > That’s something

Re: [FlexJS]Layout problems

2016-12-01 Thread Harbs
That’s something I alluded to in my post. Container components have double divs to accommodate View and (scroll viewports?). I don’t think this is generally needed in HTML and I think it causes more problems than it solves. There should probably be “lightweight” Container and “heavyweight” Cont

Re: [FlexJS]Layout problems

2016-12-01 Thread Carlos Rovira
Hi, just to add something more here. I already mentioned the problems of div relative positioning in other threads. I as well think that having the basic set with predefined styles is not PAYG, and we get a bloated html full of tags with style attributes (div, span...). The problem Alex comment in

Re: [FlexJS]Layout problems

2016-11-27 Thread Harbs
I’m not blaming the concepts. I’m just stating that as it stands, layout is really hard. Part of the problem I was able to see was due to the fact that there were nested divs with alternating absolute and relative positioning. This killed all padding settings to the sub-objects. Basically the d

Re: [FlexJS]Layout problems

2016-11-27 Thread Alex Harui
On 11/27/16, 3:31 AM, "Harbs" wrote: >FlexJS makes it way too hard to solve simple layout challenges. I don't know if it is fair to blame the patterns and principles of FlexJS for that, but it certainly is possible that the Layout you need hasn't been written yet. Keep in mind that regular Fl

[FlexJS]Layout problems

2016-11-27 Thread Harbs
FlexJS makes it way too hard to solve simple layout challenges. 1. I have an application with a bunch of buttons. I want to buttons to take up the width of the view with a 5 px margin on each side. In classic Flex, this was easy. You’d just specify right=“5” left=“5”, and you’re done. In FlexJS,