[FlexJS] MDL Help Needed

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

[FlexJS] MDL Help Needed

Peter Ent
Hi,

I've finalized the changes I wanted to make to get the core of FlexJS to be more efficient. Most of the projects seem to work now, except MDL. The MDLExample was working for me before I undertook this last change, but now it fails and it looks like it is failing down in some Google JS code.

I think the problem is that I changed the Container inheritance chain and MDL classes need to be altered a bit. But I'm not sure which MDL class(es) would be the place to start.

Could someone make a much simpler alternative to MainNavigation.mxml in the MDLExample so I can switch to that?  I'm looking for just a couple of classes. I can build out the example on my own until I get the failure.

I would love to merge my changes into the develop branch on Tuesday if I can resolve this.

Thanks so much.
—peter

In case this helps, the class structure is now this (I will update the FlexJS wiki with a real diagram):

GroupBase extends UIBase
+ Group extends GroupBase and adds MXML support

ViewBase extends GroupBase
+ View extends ViewBase and adds MXML support

ContainerBase extends GroupBase (adding in the hidden contentView for the SWF side)
+ Container extends Container and adds MXML support

DataContainerBase extends ContainerBase (adding in data mapping)
+ DataContainer extends DataContainerBase

ListBase extends List
+ List extends ListBase

ChartBase extends ListBase
+ BarChart, ColumnChart, etc. extend ChartBase

The view beads in this chain are:

GroupView (has the layout engine in it)
+ ContainerView (has viewport/scrolling support for SWF)
++ DataContainerView extends ContainerView
+++ ListView extends DataContainerView
++++ ChartView extends ListView

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

piotrz
Hi Peter,

I will try to expose bug in simpler example over the weekend. I will let you know.

Piotr
Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
Thanks so much. I'm pretty sure it will be an easy fix, depending on how
MDL thinks of things, container-wise.

‹peter

On 3/31/17, 4:51 PM, "piotrz" <[hidden email]> wrote:

>Hi Peter,
>
>I will try to expose bug in simpler example over the weekend. I will let
>you
>know.
>
>Piotr
>
>
>
>-----
>Apache Flex PMC
>[hidden email]
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p60947
>.html&data=02%7C01%7C%7C54d14089e95f488c9e7b08d47878e1d5%7Cfa7b1b5a7b34438
>794aed2c178decee1%7C0%7C0%7C636265907958364327&sdata=LtwRV3ExMoGaDATTz6Dev
>mJCiYh8uZixrfg9tSX2KtM%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

piotrz
Peter,

I got it! :) After 3 hours of fight I was able to expose problem. I've prepared simple application where you can reproduce it [1].

In general for some reason compiler is not generating second span:


     - this span will be missing in HTML.


If you launch even simpler application than my example [2] you will see in the HTML DOM that second span is missing:



[1] https://1drv.ms/u/s!ApVpLyjpHDC2zQBWadDWCpbMMBKM
[2] https://paste.apache.org/7ImM

Piotr
Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
Thanks. I will try this as soon as I can.

Peter


> On Apr 1, 2017, at 1:54 PM, piotrz <[hidden email]> wrote:
>
> Peter,
>
> I got it! :) After 3 hours of fight I was able to expose problem. I've
> prepared simple application where you can reproduce it [1].
>
> In general for some reason compiler is not generating second span:
>
>
>     - this span will be missing in HTML.
>
>
> If you launch even simpler application than my example [2] you will see in
> the HTML DOM that second span is missing:
>
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-flex-development.2333347.n4.nabble.com%2Ffile%2Fn60950%2Fspan_span.png&data=02%7C01%7C%7Ce4cd079979434e380a9d08d479283621%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636266660989299044&sdata=gOO6acfka%2FGYGhqe5OQohzzCLtX%2BSRj9wb82Rn%2BxK8E%3D&reserved=0>
>
> [1] https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2F1drv.ms%2Fu%2Fs!ApVpLyjpHDC2zQBWadDWCpbMMBKM&data=02%7C01%7C%7Ce4cd079979434e380a9d08d479283621%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636266660989299044&sdata=%2BTzTxfZpu9sHw3x4gZfMliboJRM70Hubh9QA0tHxCBY%3D&reserved=0
> [2] https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F7ImM&data=02%7C01%7C%7Ce4cd079979434e380a9d08d479283621%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636266660989309056&sdata=yo6gCdGzzUvYYy%2BcxBjgnhODWW7RhB44ijWLmaEgR7U%3D&reserved=0
>
> Piotr
>
>
>
> -----
> Apache Flex PMC
> [hidden email]
> --
> View this message in context: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-flex-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p60950.html&data=02%7C01%7C%7Ce4cd079979434e380a9d08d479283621%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636266660989309056&sdata=FDbFl1ZyQ25CZ1b1f%2BWqpms4RwUx0B9Q2lk1ry7y%2FAQ%3D&reserved=0
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
In reply to this post by piotrz
HI,

I haven't got MDL working completely, but I found the cause of the
problem.  The Span class is extending ContainerBase. That won't work now
because ContainerBase no longer supports MXML children - I moved that into
Container (and Group and View).

I also don't think you need Container for HTML-only stuff like MDL, so I
have changed the HTML classes (A, Div, P, etc) to extend Group. Now a Span
inside of a Span works.

I am looking into MDL's List and probably a few others. In the end, the
MDL library should be better.

Thanks for your help.
‹peter

On 4/1/17, 1:46 PM, "piotrz" <[hidden email]> wrote:

>Peter,
>
>I got it! :) After 3 hours of fight I was able to expose problem. I've
>prepared simple application where you can reproduce it [1].
>
>In general for some reason compiler is not generating second span:
>
>
>     - this span will be missing in HTML.
>
>
>If you launch even simpler application than my example [2] you will see in
>the HTML DOM that second span is missing:
>
><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>ex-development.2333347.n4.nabble.com%2Ffile%2Fn60950%2Fspan_span.png&data=
>02%7C01%7C%7Ce4cd079979434e380a9d08d479283621%7Cfa7b1b5a7b34438794aed2c178
>decee1%7C0%7C0%7C636266660989299044&sdata=gOO6acfka%2FGYGhqe5OQohzzCLtX%2B
>SRj9wb82Rn%2BxK8E%3D&reserved=0>
>
>[1]
><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2F1drv.ms%2">https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2F1drv.ms%2
>Fu%2Fs!ApVpLyjpHDC2zQBWadDWCpbMMBKM&data=02%7C01%7C%7Ce4cd079979434e380a9d
>08d479283621%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6362666609892990
>44&sdata=%2BTzTxfZpu9sHw3x4gZfMliboJRM70Hubh9QA0tHxCBY%3D&reserved=0
>[2]
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>che.org%2F7ImM&data=02%7C01%7C%7Ce4cd079979434e380a9d08d479283621%7Cfa7b1b
>5a7b34438794aed2c178decee1%7C0%7C0%7C636266660989309056&sdata=yo6gCdGzzUvY
>Yy%2BcxBjgnhODWW7RhB44ijWLmaEgR7U%3D&reserved=0
>
>Piotr
>
>
>
>-----
>Apache Flex PMC
>[hidden email]
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p60950
>.html&data=02%7C01%7C%7Ce4cd079979434e380a9d08d479283621%7Cfa7b1b5a7b34438
>794aed2c178decee1%7C0%7C0%7C636266660989309056&sdata=FDbFl1ZyQ25CZ1b1f%2BW
>qpms4RwUx0B9Q2lk1ry7y%2FAQ%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

piotrz
Hi Peter,

I was thinking that would be a solution, but I prefered to leave fix for you cause I wasn't sure.

Thanks,
Piotr
Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
I've pushed changes to HTML and MDL libraries in the feature/chart-work
branch. In order to get the small example you made to work, I had to
change MDL's List. Actually, I simplified it a great deal so that is 90%
the HTML List with just a few changes now.

The main MDLExample still isn't running, but I was able to get your
smaller example to work. I will continue to work the MDL library to get
the MDLExample running.

When you have a chance, please re-try to smaller example to verify my
changes.

Thanks again,
Peter

On 4/2/17, 9:54 AM, "piotrz" <[hidden email]> wrote:

>Hi Peter,
>
>I was thinking that would be a solution, but I prefered to leave fix for
>you
>cause I wasn't sure.
>
>Thanks,
>Piotr
>
>
>
>-----
>Apache Flex PMC
>[hidden email]
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p60965
>.html&data=02%7C01%7C%7Ca8e1c2d1fa1f43d35ad508d479d0fa40%7Cfa7b1b5a7b34438
>794aed2c178decee1%7C0%7C0%7C636267385847753416&sdata=WOo9%2BdRbE7ZhVIuV7%2
>FoilVkCD7MKw%2FaFHd3kCROrQeg%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

piotrz
Hi Peter,

I just tried MDLExample and see where the problem is. In UIBase method getElementAt should return null in case of JS.

var children:Array = internalChildren();
                return children[index].flexjs_wrapper;

When there is no children in code above flexjs_wrapper is undefined.

I will try my small example and back to you.

Piotr

Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

piotrz
In reply to this post by Peter Ent
Peter,

My simple example is working for me. I was looking into the MDL library but it look there are also work with other components which are based on List.

If you are looking into that just let me know if you find some stoppers.

Piotr
Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Harbs
Our MDL is not working because it does not support MXML.

My understanding is that Peter is working on that, though.

Harbs

> On Apr 2, 2017, at 3:05 PM, piotrz <[hidden email]> wrote:
>
> Peter,
>
> My simple example is working for me. I was looking into the MDL library but
> it look there are also work with other components which are based on List.
>
> If you are looking into that just let me know if you find some stoppers.
>
> Piotr
>
>
>
> -----
> Apache Flex PMC
> [hidden email]
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Help-Needed-tp60946p60969.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
Yes. I hope to resolve this quickly.

What I did was move the MXML support from the
GroupBase/ViewBase/ContainerBase classes into the Group/View/Container
classes. I did this so that there was an easy inheritance chain:
ChartBase->ListBase->DataContainerBase->ContainerBase->GroupBase with each
of those bases contributing something along the way. But now anything that
relied on ContainerBase for its MXML needs to extend Group or Container.
For MDL, I think Group is best since it doesn't need the
viewport/contentView stuff.  The List-based classes are affected as well.

In the end, I think this will result in simpler code, cleaner HTML.
Fingers crossed anyway!

Thanks again for your help.
‹peter


On 4/2/17, 5:08 PM, "Harbs" <[hidden email]> wrote:

>Our MDL is not working because it does not support MXML.
>
>My understanding is that Peter is working on that, though.
>
>Harbs
>
>> On Apr 2, 2017, at 3:05 PM, piotrz <[hidden email]> wrote:
>>
>> Peter,
>>
>> My simple example is working for me. I was looking into the MDL library
>>but
>> it look there are also work with other components which are based on
>>List.
>>
>> If you are looking into that just let me know if you find some
>>stoppers.
>>
>> Piotr
>>
>>
>>
>> -----
>> Apache Flex PMC
>> [hidden email]
>> --
>> View this message in context:
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>ex-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p609
>>69.html&data=02%7C01%7C%7Cf8b367e8608c460ead2808d47a0c7788%7Cfa7b1b5a7b34
>>438794aed2c178decee1%7C0%7C0%7C636267641346880904&sdata=qEUjIY7CL13M7tdzw
>>sPhsqWeTftD121DoYyXLGmeN%2FM%3D&reserved=0
>> Sent from the Apache Flex Development mailing list archive at
>>Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
In reply to this post by Harbs
Hi,

I now have the MDLExample running. I've committed and pushed my changes
onto feature/chart-work. I have not sync'd with flex-falcon in a while -
so I don't know if that makes a difference.

I am hoping that any issues now are related to SWF-side layout code.

Going forward, if your component needs to accept MXML children, inherit
from Group or Container (depending on your SWF-side needs), not from
GroupBase or ContainerBase.

I will be writing all of this up in the FlexJS Wiki once I get it merged.
Targeting Wednesday (5 Apr 2017) for that now.

Thanks again for everyone's help trying this out.
‹peter

On 4/2/17, 5:08 PM, "Harbs" <[hidden email]> wrote:

>Our MDL is not working because it does not support MXML.
>
>My understanding is that Peter is working on that, though.
>
>Harbs
>
>> On Apr 2, 2017, at 3:05 PM, piotrz <[hidden email]> wrote:
>>
>> Peter,
>>
>> My simple example is working for me. I was looking into the MDL library
>>but
>> it look there are also work with other components which are based on
>>List.
>>
>> If you are looking into that just let me know if you find some
>>stoppers.
>>
>> Piotr
>>
>>
>>
>> -----
>> Apache Flex PMC
>> [hidden email]
>> --
>> View this message in context:
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>ex-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p609
>>69.html&data=02%7C01%7C%7Cf8b367e8608c460ead2808d47a0c7788%7Cfa7b1b5a7b34
>>438794aed2c178decee1%7C0%7C0%7C636267641346880904&sdata=qEUjIY7CL13M7tdzw
>>sPhsqWeTftD121DoYyXLGmeN%2FM%3D&reserved=0
>> Sent from the Apache Flex Development mailing list archive at
>>Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

piotrz
Peter,

I think falcon on your branch is synced, cause I did it.

Did you check whether MDLExample is running, cause yesterday when I was checking - I did run MDLExample but Tabs component did not display any Tab.

It look like to me that Tabs should extend List, but I thought that you will handle this one, so I left investigation.

Let me know what are you going to work.

Piotr


Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
I guess I forgot what the example actually looked like - so much stuff
appeared when I ran it! I will look into Tabs, and you are probably right,
it would extend List if it were a list.

‹peter

On 4/3/17, 11:28 AM, "piotrz" <[hidden email]> wrote:

>Peter,
>
>I think falcon on your branch is synced, cause I did it.
>
>Did you check whether MDLExample is running, cause yesterday when I was
>checking - I did run MDLExample but Tabs component did not display any
>Tab.
>
>It look like to me that Tabs should extend List, but I thought that you
>will
>handle this one, so I left investigation.
>
>Let me know what are you going to work.
>
>Piotr
>
>
>
>
>
>
>-----
>Apache Flex PMC
>[hidden email]
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p60981
>.html&data=02%7C01%7C%7C11be79c8a91348e6593608d47aa75b57%7Cfa7b1b5a7b34438
>794aed2c178decee1%7C0%7C0%7C636268306591754509&sdata=gfyAS8irauxCjhoJcCxhR
>cM5EvPWLlYRiBARIFEQgM4%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
In reply to this post by piotrz
Hi,
I think I need your help again. I noticed that when I tap on something I'm
taken to getmdl.io. Could you put another sample together that uses Tabs?
That should help make it go faster.

Thanks.
Peter

On 4/3/17, 11:28 AM, "piotrz" <[hidden email]> wrote:

>Peter,
>
>I think falcon on your branch is synced, cause I did it.
>
>Did you check whether MDLExample is running, cause yesterday when I was
>checking - I did run MDLExample but Tabs component did not display any
>Tab.
>
>It look like to me that Tabs should extend List, but I thought that you
>will
>handle this one, so I left investigation.
>
>Let me know what are you going to work.
>
>Piotr
>
>
>
>
>
>
>-----
>Apache Flex PMC
>[hidden email]
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p60981
>.html&data=02%7C01%7C%7C11be79c8a91348e6593608d47aa75b57%7Cfa7b1b5a7b34438
>794aed2c178decee1%7C0%7C0%7C636268306591754509&sdata=gfyAS8irauxCjhoJcCxhR
>cM5EvPWLlYRiBARIFEQgM4%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

piotrz
Peter,

There is such app in the example: MDLDynamicTabsExample :)

Try it out - it also do not display Tabs.

Piotr
Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
Thanks. I didn't see that. I will work on that next.

‹peter

On 4/3/17, 4:38 PM, "piotrz" <[hidden email]> wrote:

>Peter,
>
>There is such app in the example: MDLDynamicTabsExample :)
>
>Try it out - it also do not display Tabs.
>
>Piotr
>
>
>
>-----
>Apache Flex PMC
>[hidden email]
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p60986
>.html&data=02%7C01%7C%7C46e4ae0cdf604ff0050108d47ad2a216%7Cfa7b1b5a7b34438
>794aed2c178decee1%7C0%7C0%7C636268492465473589&sdata=%2BcHHrM5vs4fhxMzSZvM
>Nq3FS1VIiMf%2BA4GMDHDIJiJY%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] MDL Help Needed

Peter Ent
In reply to this post by piotrz
Much, much more of the MDLExample is now working the changes to Tabs and
TabBar.

- In the MDLDynamicTabsExample, the tabs appear and can be selected, but
when a new tab is added, the information about what tab was previously
selected is lost.
- In the MDLExample, Tabs selection, the first tab bar is blank and it
looks to me like it should be the same tab bar from the
MDLDynamicTabsExample, so that is strange.
- In the MDLExample, TextFields selection, there are no text fields.
- In the MDLExample, Menu selection, the menu is blank.

To get things to work I mostly removed code since the HTML classes do most
of the work now.

Let me know what you think.

‹peter


On 4/3/17, 4:38 PM, "piotrz" <[hidden email]> wrote:

>Peter,
>
>There is such app in the example: MDLDynamicTabsExample :)
>
>Try it out - it also do not display Tabs.
>
>Piotr
>
>
>
>-----
>Apache Flex PMC
>[hidden email]
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-MDL-Help-Needed-tp60946p60986
>.html&data=02%7C01%7C%7C46e4ae0cdf604ff0050108d47ad2a216%7Cfa7b1b5a7b34438
>794aed2c178decee1%7C0%7C0%7C636268492465473589&sdata=%2BcHHrM5vs4fhxMzSZvM
>Nq3FS1VIiMf%2BA4GMDHDIJiJY%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.