On Fri, Oct 14, 2016 at 10:25 AM, Carlos Rovira <carlosrov...@apache.org>
> I'm trying to setup a MDL library to start making some components with that
> look and feel.
> I'm following the Flat library project indications, and right now I'm
> building it ok with maven (didn't test Ant, but as a copy/paste from Flat,
> I think it should work as well).
> Then I tried in a sample project. Again, new dependencies set and mdl
> declarations are working, but result is not looking as I expect, maybe due
> to some low level constructions that I still doesn't dominate (mainly the
> internals in the "createElement():WrappedHTMLElement" overload, that I
> to try to give some love today as I get a bit more time.
> Ok, from here,...I'm still trying to understand more things... for example:
> 1.- MDL requires some CSS files to be linked. I'm using it with
> -html-template tag in the example project, but, maybe this should be
> provided by the MDL.swc ? if so, why could we do this?
> 2.- To start implementing components, maybe it'd be better that someone
> review what I'm doing (to avoid work in things that not conform to
> standards setup here). Maybe I should upload the branch for people (Maybe
> Alex, Peter,...) to take a look?
> 3.- I started trying to make a simple Colored Fab MDL button... (as
> described here https://getmdl.io/components/index.html#buttons-section)
> and find that using a simple mxml declaration almost worked (it's not
> right, only an approximation, since I can't write "low level" HTML in MXML
> like an <I> with HTMLElement). So, this:
> <js:Button className="mdl-button mdl-js-button mdl-button--fab
> Shows a pink circle button, without icon.
Sounds like a fantastic first step :-))
> My MDL button has the following createElement code:
> * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
> * @flexjsignorecoercion HTMLButtonElement
> override protected function createElement():WrappedHTMLElement
> element = button = document.createElement('button') as
> button.className = 'mdl-button mdl-js-button mdl-button--fab
> positioner = element;
> positioner.style.position = 'relative';
> (button as WrappedHTMLElement).flexjs_wrapper = this;
> element.flexjs_wrapper = this;
> return element;
> and I'm using at my example project : <mdl:Button/>
> But instead to throw the pink empty circle button as the MXML example, it
> shows a normal button as if my declaration was <js:Button/> (the same
> someone knows where I could be failing ?
Sounds like some manifest.xml file has not been updated.
I don't know the exact errors, but if I may suggest another option - just
create these new buttons, etc. as custom components in your FlexJS
project. We can worry about making it a proper FlexJS library project
> PD: I saw Justin posting about MDL license, I don't want to integrate MDL
> in the project, instead, I want to declare external links to use them, if
> this is not right I think there should be other methods to be license
I think you should be fine with this approach.
Thanks for taking this initiative. Very exciting :-)
> Carlos Rovira