Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Side menu scroll feature locks after switching servers OR displaying liveview in landscape #337

Closed
PartialVolume opened this issue Sep 25, 2016 · 36 comments

Comments

@PartialVolume
Copy link
Contributor

PartialVolume commented Sep 25, 2016

Platform & OS Version
Android V5.1

The version of the app you are reporting:
1.2.24 and 1.2.25 (Android build 5.1 only, cannot reproduce on HTC M8 Android 6.0) (Linux desktop build does not show bug even if you resize window so the sidebar menu needs scroll) untested on IOS

Device details:
UMI Fair Android 5.1 (UMI Fair is a rooted device) (Cannot reproduce on HTC M8 Android 6.0)

What is the nature of your issue
Bug

Details
There are two different ways of reproducing this bug. Both methods only work with Android 5.1

Method 1
With this method you will need 2 or more servers set up on zmNinja and an Android device running 5.1

Start zmNinja, it will connect to the last server you used.
Switch to a different server.
Try to scroll the side menu to the bottom of the menu. You won't be able to, however the buttons you can see all work.
Exit zmNinja
Restart zmNinja
Auto connects to last used server.
Side menu scrollbar now works.

Method 2
To trigger the bug using this method you only need one server.

Start ZmNinja, holding the phone in portrait fashion.
Makesure the side menu is scrollable.
Click either montage or monitor and bring up a liveview.
Rotate the phone into landscape
Rotate the phone back to portrait
Exit liveview using the expanding buttons
Check side menu, can no longer scroll.
With side menu still showing rotate phone to landscape and back to portrait, scroll now works.

Method 3
This is similiar to method to but starts with phone being held in landscape

Start ZmNinja, holding the phone in landscape fashion.
Makesure the side menu is scrollable.
Click either montage or monitor and bring up a liveview.
Rotate the phone to portrait
Exit liveview using the expanding buttons
click the 3 bars to bring in the side menu
Check scroll, it's locked !

As mentioned above this only seems to happen on Android 5.1 on a UMI Fair and not on Android 6.0 (HTC M8) or on the Linux64 desktop version. On my UMI Fair Android 5.1 it is 100% reproducible.

@PartialVolume PartialVolume changed the title Side bar scroll feature does not work after switching servers Side menu scroll feature does not work after switching servers Sep 25, 2016
@PartialVolume
Copy link
Contributor Author

PartialVolume commented Sep 26, 2016

After a bit more playing with this, those exceptions have nothing to do with the side menu. They are exceptions generated by the content drop down, ie authentication successful messages which is a different issue.

The side bar menu not scrolling may be caused by this float in index.html which apparently breaks the scroll structure ? ( I know bugger all about about Ionic so could be talking total bs here, but that's what I've read )

<span style="float:right;margin-top:-18px;background-color:#444444;color:#fff;font-size:11px;opacity:0.7;width:90px;border-radius: 0px 0px 5px 5px;:text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;text-align:center;">&nbsp;{{$root.getProfileName();}}&nbsp;</span>

By rotating the phone into landscape mode the scroll feature is restored as Ionic now knows the height again.

Why it works in Android V6 ive no idea. Just got to test this theory out now.

Instead of float use margin-left:auto and margin-right:auto

Until I give it a try this is all a bit theoretical.

@pliablepixels
Copy link
Member

pliablepixels commented Sep 26, 2016

does removing the complete <span> fix the issue? if so, it should not be related to multi-server switching. I have another theory - this may be due to the native transition plugin. Try the float first and if it doesn't fix, go to dev options and disable native transition. You'll need to kill the app and restart after that (make sure disable native trans is on)

@PartialVolume
Copy link
Contributor Author

PartialVolume commented Sep 26, 2016

No just the float, I've not tested it yet. Having trouble with my Android build.

@PartialVolume
Copy link
Contributor Author

PartialVolume commented Sep 26, 2016

I tried disabling transitions, quiting zmN and restarting, scroll still locks up after server change (scroll unlocks if you rotate the phone and then works in portrait & landscape) same as before. I've not tried changing float yet, may need to email a couple of questions re building on Android.

@PartialVolume
Copy link
Contributor Author

PartialVolume commented Sep 28, 2016

I've taken out the whole <span> and the side menu scroll is now working after switching servers. Not had a chance to play with the float yet, but certainly something in that <span> is causing the scroll to lock. I'll use my modified 1.2.24 for the next couple of days just to make sure the scroll lock has not become intermittent. Certainly before it locked 100% every attempt so it's looking quite positive.

@pliablepixels
Copy link
Member

pliablepixels commented Oct 1, 2016

Okay, so if you are sure the float is causing the issue, it must be a quirk for the browser for that specific platform. I'm going to have to rely on you trying some other ways to fix it (display top right) as I can't replicate it. Thanks for investigating!

@PartialVolume
Copy link
Contributor Author

@pliablepixels OK, I think I've fixed the code for both methods of reproducing the scroll lock bug as described above. The following changes were made ..
<ion-side-menu>
to
<ion-side-menu side="left" overflow-scroll="true">

and wrapped <ion-list> with <ion-scroll zooming="true" direction="xy" style="height:95%">

And that's with the existing span for the server info left in place including the float.

I need to check it all works fine on Android 6 and the Linux desktop.

If all good, do you want me to do a pull request on the forked copy of the master I have ? (first time doing this on Github so not quite sure of the procedure yet)

@pliablepixels
Copy link
Member

@PartialVolume - thanks for investigating.
I don't want to add all these tags - they will likely cause issues elsewhere.

Can we try this:
Just do:

<ion-side-menu side="left" >

And

wrap <ion-list> with <ion-scroll  direction="y" >

I'd like to see what is the minimal set that fixes that lock issue.

@PartialVolume
Copy link
Contributor Author

@pliablepixels Just tried that on 5.1, doesn't work, menu locks. I'll work out what is the minimum set required is. I've a sneaky suspicion it might be the style="height:95%" but I'll get back to you once I've tested all the variations.

@PartialVolume
Copy link
Contributor Author

This appears to be the minimum that works.
<ion-side-menu side="left" >
<ion-scroll style="height:95%">

95% leaves a small white band at the bottom of the menu. Not sure if the 95% is significant to the fix, discovered the fix here will try 98%/99% or 100% and see what happens.

@pliablepixels
Copy link
Member

The key issue I think is why does this only occur when switching servers. What's the relation? If it really was a scroll issue, then it should occur all the time. So I'd be more inclined to see what is going on in the "switch server" code from the UI perspective that is causing this. The issue however is I can't replicate this.

@PartialVolume
Copy link
Contributor Author

PartialVolume commented Oct 3, 2016

It doesn't only occur when switching servers, see method 2 in my description of how to reproduce the bug. Just viewing a liveview in landscape also triggers the bug.

@pliablepixels
Copy link
Member

Okay and all of this also goes away if you take away the <span> completely right?

@PartialVolume
Copy link
Contributor Author

Yes

@PartialVolume
Copy link
Contributor Author

Although I do like those little info labels, would be a shame if they were removed

@pliablepixels
Copy link
Member

Agree - I'm not going to remove them. I'll experiment with some other ways

@PartialVolume
Copy link
Contributor Author

Just checking, but have you a device running 5.1 ?
If you have I'm just wondering if screen size has anything to do with it. On the UMI Fair the screen is smaller than the HTC M8, on the UMI if I scroll the side menu so Montage is at the top, the bottom visible item in the menu is help, do you see more items than that ?

@pliablepixels
Copy link
Member

pliablepixels commented Oct 3, 2016

Yes - the device I am using is a Moto E running 5.1

@pliablepixels
Copy link
Member

<ion-side-menus delegate-handle="sideMenu" ng-cloak> --> does it help if you remove the delegate-handle part and keep side="left" ?

@PartialVolume
Copy link
Contributor Author

I'll try removing delegate handle next but finishing off the other fix first.

The absolute minimum that fixes this is simply wrapping <ion-list> with
<ion-scroll style="height:100%">

As height is now 100% there is no white band at the bottom of the side menu as with 95%. It's also not necessary to change <ion-side-menu> by adding side="left"

Menus do not lock which ever method i use to trigger the bug (single server, liveview in landscape, or multi server switching).

@PartialVolume PartialVolume changed the title Side menu scroll feature does not work after switching servers Side menu scroll feature locks after switching servers OR displaying liveview in landscape Oct 3, 2016
@pliablepixels
Copy link
Member

That looks good. Yes please see if removing delegate handle helps. Please do a PR as well once you conclude on this. Thanks!

@PartialVolume
Copy link
Contributor Author

Starting with a fresh download of the shrinking header branch.

Changed <ion-side-menus delegate-handle="sideMenu" ng-cloak>
To <ion-side-menus ng-cloak>

Changed <ion-side-menu>
To <ion-side-menu side="left">

Using both single server liveview in landscape & switching servers both cause scroll to lock up with this change.

Just had a thought, can you try something for me ?. With your moto can you start zmN and hold it in landscape (do not turn it to portrait) check the menu scrolls, switch servers, keeping it in landscape click the three bars to bring in the side menu, check to see if it scrolls. Thanks

I just found a variation of method #2 for locking the scroll using liveview starting in landscape mode.

Start ZmNinja, holding the phone in landscape fashion.
Makesure the side menu is scrollable.
Click either montage or monitor and bring up a liveview.
Rotate the phone to portrait
Exit liveview using the expanding buttons
click the 3 bars to bring in the side menu
Check scroll, it's locked !

Check side menu, can no longer scroll.
With side menu still showing rotate phone to landscape and back to portrait, scroll now works.

@pliablepixels
Copy link
Member

@PartialVolume - no lock for me in your modified case. I think now that you've brought it down to a minimal set of changes (which also looks logical to me), feel free to do a PR. I'll merge and test on my devices to make sure it doesn't cause any issues.

PartialVolume added a commit to PartialVolume/zmNinja that referenced this issue Oct 3, 2016
@PartialVolume
Copy link
Contributor Author

@pliablepixels I've updated my local master, checked for your changes <ion-content has-header="true" mouse-wheel-scroll> , all good. Built and installed on my two Android devices. All seems to be working fine. No scroll lockups. I can see a very thin scroll bar down the right side of the side menu but it doesn't look too bad, although I still think there is an option to hide that. Slight user type issue with the shrinking headers but I'll document that in a different thread. I'll test over the next couple of days.

@pliablepixels
Copy link
Member

I am unfortunately going to have to revert this change. Its causing scrolling issues on iOS where the menu does not scroll enough for the last item to be visible.

@PartialVolume
Copy link
Contributor Author

That's a shame, setting the percentage to 95% doesn't improve things ?

On 12 Oct 2016 00:57, "Pliable Pixels" [email protected] wrote:

I am unfortunately going to have to revert this change. Its causing
scrolling issues on iOS where the menu does not scroll enough for the last
item to be visible.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pliablepixels/zmNinja/issues/337#issuecomment-253081315,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVD9EdJq3WqMfD90ALpKBcLL49hXubqVks5qzCJngaJpZM4KF5BU
.

@pliablepixels
Copy link
Member

Not sure - I am trying to clean up/implement some other features - I'll get back to this after that. I think we are close to a compatible solution - just that I have some other high priority stuff to do for now. I'll put it back after that and investigate.

@pliablepixels
Copy link
Member

@PartialVolume - can you please update and check if the new display resolves this issue - I've taken the float out

@PartialVolume
Copy link
Contributor Author

@pliablepixels I'll check it out later this evening.

@pliablepixels
Copy link
Member

pliablepixels commented Oct 13, 2016

Thanks. Also I just made a commit pliablepixels@62f8844 - let me know if that solves overlapping windows. I took a hammer to the problem.

@PartialVolume
Copy link
Contributor Author

I thought the Montage was loading real fast & packed out correctly . I'll test the montage some more.

Bad news re the menu. Always locking now as per the method I use to make this bug show. I took out the <span class="item-note" style="width:90px"> {{$root.getProfileName();}} </span>
but it still locks. Also did you mean to put {{'kMenuZMSettings'|translate}} inside the span. You've not done that on the other menu entries. I took it outside the span but the menus still lock. I've been looking for other changes to index.html compared to earlier versions but have not spotted any yet.

                    `<span class=" item-icon-left">
                        <i class="icon ion-person"></i>
                     {{'kMenuZMSettings'|translate}}
                        <span class="item-note" style="width:90px">
                            {{$root.getProfileName();}}
                        </span>
                    </span>`

@PartialVolume
Copy link
Contributor Author

Changed <!--<ion-content has-header="true" mouse-wheel-scroll>--> to <ion-content has-header="true"> menu still locks.

@pliablepixels
Copy link
Member

hmm, so then its not the float that was causing the issue, then

@PartialVolume
Copy link
Contributor Author

Doesn't look like it. But on the earlier code taking out the span fixed it. Very odd. I'm assuming if I put the <ion-scroll scrollbar-y="false" style="height:100%" > back in it would be ok. Maybe I need to go back to 1.2.24 or earlier and try and figure it out again.

pliablepixels added a commit that referenced this issue Oct 24, 2016
Former-commit-id: 97b443ad19d097bda21c077ec0b0355d76ed341d
pliablepixels added a commit that referenced this issue Oct 24, 2016
Former-commit-id: a032aca2255526391552fffb9bd2e7c544f42b20
pliablepixels added a commit that referenced this issue Oct 24, 2016
Former-commit-id: 97b443ad19d097bda21c077ec0b0355d76ed341d
pliablepixels added a commit that referenced this issue Oct 24, 2016
Former-commit-id: a032aca2255526391552fffb9bd2e7c544f42b20
@pliablepixels
Copy link
Member

is this resolved / can we close?

@PartialVolume
Copy link
Contributor Author

PartialVolume commented Feb 7, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants