Side menu on top and transitions problem

154 views
Skip to first unread message

Carlos Verdier

unread,
Oct 31, 2017, 10:41:12 AM10/31/17
to CodenameOne Discussions
Hi

I've been trying the new side menu, and I've noticed what it seems to be a bug. In the following test case, you can see it clearly:

        Form f = new Form(new BorderLayout(BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE));
        Button btn = new Button("Click me");
        Label lbl = new Label("Replace this");
        Label lbl2 = new Label("Label replaced");        
        Container cont = new Container(new BoxLayout(BoxLayout.Y_AXIS));
        cont.addAll(lbl, btn);
        f.add(BorderLayout.CENTER, cont);
        f.getToolbar().addComponentToSideMenu(new Label("Side Menu"));        
        f.show();
        btn.addActionListener((evt) -> {
            if (cont.contains(lbl))
                cont.replace(lbl, lbl2, CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, false, 300));
            else
                cont.replace(lbl2, lbl, CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, true, 300));                
        });


If you press the button without opening the side menu, the transition works fine. Once you open and close the side menu, the transition no longer works. Reproducible on simulator and devices.

Shai Almog

unread,
Nov 1, 2017, 1:22:49 AM11/1/17
to CodenameOne Discussions
Hi,
there was an issue with form navigation that's fixed in git and should be up this Friday. We might even push it sooner on Thursday as there are a lot of fixes & enhancements.

Carlos Verdier

unread,
Nov 1, 2017, 6:22:32 AM11/1/17
to CodenameOne Discussions
Ok, done.

Thank you

Carlos Verdier

unread,
Nov 14, 2017, 5:45:49 AM11/14/17
to CodenameOne Discussions
Was this issue resolved? I'm still experiencing the same issue.

Shai Almog

unread,
Nov 15, 2017, 12:14:53 AM11/15/17
to CodenameOne Discussions
I think it was. Did you define command behavior in your theme or invoke setCommandBehavior? If so remove it.

Carlos Verdier

unread,
Nov 15, 2017, 10:19:16 AM11/15/17
to CodenameOne Discussions
No, I have no command behavior defined. The test case I posted shows the problem, that persists for me. Could you please give it a try?

Shai Almog

unread,
Nov 16, 2017, 12:22:40 AM11/16/17
to CodenameOne Discussions
That doesn't happen to me anymore in the current code. Does it happen to you with a hello world application after a library update?

Carlos Verdier

unread,
Nov 16, 2017, 10:38:36 AM11/16/17
to CodenameOne Discussions
Yes, it happens after the update. I made a Video working with the code I first posted:

Shai Almog

unread,
Nov 17, 2017, 1:40:27 AM11/17/17
to CodenameOne Discussions
Thanks the video helps. I was referring to a different problem.
Can you file an issue on this? I'll try to address it soon.

Carlos Verdier

unread,
Nov 17, 2017, 3:45:05 AM11/17/17
to CodenameOne Discussions
Ok, I've just filed the issue. Thank you.

Shai Almog

unread,
Nov 18, 2017, 12:23:19 AM11/18/17
to CodenameOne Discussions
Thanks it's fixed and should be there by the next update.

Carlos Verdier

unread,
Jan 28, 2018, 2:30:05 PM1/28/18
to CodenameOne Discussions
Hi

After the very last update, this problem seems to be back. Could you please guys take a look to this regression?

Thanks!

Shai Almog

unread,
Jan 28, 2018, 11:59:22 PM1/28/18
to CodenameOne Discussions
Hi,
I just re-ran the test case and it seems to be working fine.

Carlos Verdier

unread,
Jan 29, 2018, 6:54:05 AM1/29/18
to CodenameOne Discussions
That's weird... My libraries are up to date and the issue is there for me.

Are your sure you are not missing something? Have you followed the steps in my video? You need to open the side menu first, and after that animations are broken.

Shai Almog

unread,
Jan 30, 2018, 12:16:01 AM1/30/18
to CodenameOne Discussions
Sorry, I totally forgot how to reproduce this and just copied the code. I see it. Was there an issue associated with this?
If not can you please open one?

Carlos Verdier

unread,
Jan 30, 2018, 4:41:10 AM1/30/18
to CodenameOne Discussions
Yes, there was an issue open. I've just added a new comment.


Thanks

Shai Almog

unread,
Jan 31, 2018, 12:21:57 AM1/31/18
to CodenameOne Discussions
It wasn't even closed but it has a reference to the commit which might help tracking down what happened.

Carlos Verdier

unread,
Jan 31, 2018, 6:24:44 AM1/31/18
to CodenameOne Discussions
Ok, thank you

Carlos Verdier

unread,
Feb 5, 2018, 7:17:00 AM2/5/18
to CodenameOne Discussions
Hi again, Shai

I've seen that this issue has been assigned to 4.0. What is the schedule for that version, please? Notice that I can't do any release until this is fixed, as it impacts severely on its behavior.

Thanks

Shai Almog

unread,
Feb 6, 2018, 12:08:21 AM2/6/18
to CodenameOne Discussions
Hi,
this was marked fixed 2 hours before you posted ;-)
In general you can see the milestones planned dates in the github project. 4.0 is the coming milestone which is currently planned for March 7th if I remember correctly but might be bumped a bit because I'm barely scratching my tasks for this release.
Reply all
Reply to author
Forward
0 new messages