Renaming thread...

On 10/21/16, 9:12 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
<carlos.rov...@gmail.com on behalf of carlos.rov...@codeoscopic.com> wrote:
>Right now I'm doing components in the "mdl"
>namespace, but this is not the ideal scenario, since it would be great to
>get a MDL style in a js:Button without the need to change it to
>mdl:Button,
>only applying styles.

Remember that the "js" in "js:Button" is only an xmlns prefix.  Somewhere
at the top of your MXML file you have:
  xmlns:js="library://ns.apache.org/flexjs/basic"

What should be possible in FlexJS, is for people to easily switch between
components sets by simply changing the URI assigned to the prefix:
  xmlns:js="library://ns.apache.org/flexjs/mdl"


As long as the APIs used in the app are the same between the Basic set and
the MDL set, this will cause the app to start using the MDL widgets.

>
>I'm finding some more few things:
>* With MDL I'm inserting classNames inside class components, what I don't
>like since is a clear mixing of AS3 code declaration with CSS styles.

What would you prefer instead?

>* from the experience I'm getting with MDL (and suppose that other
>libraries like bootstrap will be the same), those good looking styles are
>dependent from a concrete way of implementing the html tags and use of
>html
>class. Maybe a component need to create a surrounding div and then nest a
>span, and this maybe is not what our HTML implementation does. I think a
>right approach should be to use the HTML swc and be able to change the
>output to match what a concrete style demands.

IMO, this is why there will be more than one SWC full of components.
AIUI, each popular JS UI framework does have its favorite composition of
low-level HTML tags for creating a "Button".  The HTML swc is intended to
be the most basic Button/Checkbox/DropDownList, etc.  It simply create an
HTMLButtonElement or HTMLInputElement or HTMLSelectElement.  The Flat
DropDownList, because Flat is a Bootstrap theme, re-creates the
sub-DOM-tree that Bootstrap expects in its createElement call.  If you
look, you'll see a div and span and no select element.  You may have to
create a different sub-DOM-tree for MDLs widgets.  I think Jquery has yet
another topology.   I don't think we want a single Button class in
HTML.swc to know how to generate different trees.  That would require
conditional code and we are trying to eliminate conditional code where
possible.

Also, the SWC is supposed to package its default.css with the components
that will generate the expected sub-DOM-tree.  Then you have
self-contained deployable component sets.  But you are right that the
defaults.css from HTML.swc is leaking through and that needs to be fixed.

My 2 cents,
-Alex

Reply via email to