flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OmPrakash Muppirala <bigosma...@gmail.com>
Subject Re: [FlexJS] How to add html content?
Date Sun, 01 Jan 2017 00:40:10 GMT
On Sat, Dec 31, 2016 at 3:10 PM, Alex Harui <aharui@adobe.com> wrote:

> On 12/31/16, 8:52 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
> <carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com>
> wrote:
> >Hi Alex,
> >
> >although I think that is a valid approach for other of components, I think
> >this is not in this case. Imagine users need to extend lots of containers
> >to append html text. I don't think that as an easy way. For that reason I
> >use to discuss with you how to do that.
> >
> >In use cases where the need is isolated and focused only on that case, I
> >think that's the way to go, but considere how many MDL containers we
> >hace....that approach would be very cumbersome for final users.
> >
> >For example in Grids.mxml I have
> >
> ><mdl:GridCell column="1"><mdl:beads><js:InnerHTML
> >text="1"/></mdl:beads></mdl:GridCell>
> >
> >Just to output a "1" inside a div. I think that, although more verbose is
> >the way to use in final app.For that case in particular...
> Well, IMO, we are in the business of looking for patterns and
> encapsulating them into components.  The whole point of composition is,
> once people get tired of typing "js:InnerHTML text=" that someone, maybe
> us, will publish a component that is GridCell with InnerHTML via a text or
> html property, just to save typing.  Can't really prevent it.

The question is does a HTMLText component exist in the default component
set?  That is a common enough pattern that we do seem to need it to be part
of the default component set.  Much like a button or an image.

Right now, we do not have a good way to display HTML content, while with
direct HTML/JS development, that is a no-brainer operation.  We cannot ship
without an easy way to display HTML.  Given that the runtime cost of this
component is almost nothing, we really don't lose anything by having such a

> That said, it might be worth revisiting whether we can create non-IUIBase
> children in the default property for Containers.

Not really sure why this is required.  I am looking for usage patterns like


        <Button />
        <HTMLText />

I guess the HTMLText component has to be a UIBase for this to work, right?

Maybe I am not understanding the point you are trying to make.


> We can probably modify
> the compiler to do it, but then components that need to handle mixed
> content have to have code that checks for mixed content which slows up
> startup time when lots of children are being created and added.
> Thoughts?
> -Alex

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message