ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Ionic View transition flickering

Open svsool opened this issue 11 years ago • 48 comments

Type: bug

Platform: ios 8 webview

There are problem with view transition in latest version, leaving view takes half display and overlap enter view, here bug localization View animations in 1.0.0-beta.13, is ok, animations smooth http://plnkr.co/edit/jxnbgCABggbqTTOwGPIp?p=preview View animations in 1.0.1 flickering http://plnkr.co/edit/1LYhSNLo5fxzMg1uzVGY?p=preview, many stage and leaving views created in dom on transition with style translate3d(33%, 0, 0) and not removed (http://joxi.ru/gV2VRBdiBdDv2v.jpg) On my ipad mini, 1.0.0-beta.13 working much faster than 1.0.1

svsool avatar Jul 01 '15 14:07 svsool

for localize bug example (sidebarapp), only background .scroll element changed, all other native

svsool avatar Jul 02 '15 10:07 svsool

Can confirm have this issue on multiple iPhones as well here with ionic lib 1.0.1. Thought we had broken something. Any temp fix welcome but hopefully fixed in next release. :)

nowcodingaway avatar Jul 07 '15 16:07 nowcodingaway

Still having this issue on 1.1.0 fyi

nowcodingaway avatar Aug 19 '15 16:08 nowcodingaway

So there is a lot of noise in the plunkr, it a bit hard to illustrate the issues. The constant transition back and forth doesn't really help...

So the change you are talking about form beta 13 to nightly are around the navigations style, which are much more closes to iOS. Pulled do the plunkr with the latest version of ionic and loaded it on an iphone and nexus 5. Wasn't getting any flickers using that test.

If you could provide a more clear demo on how I could recreate the issue, that would be great.

mhartington avatar Aug 19 '15 16:08 mhartington

Stand by. Will try and screen record it from the iOS simulator.

nowcodingaway avatar Aug 19 '15 16:08 nowcodingaway

Simulator has the power of the mac and is just a touch to quick to properly illustrate what I get on the iPhone 6 (and worse on older devices).

Ultimately it's as if two copies of the view you are 'leaving' slide over the view you are entering. One goes all the way to the left (as it should) the other only moves about 1/4 of the way to the left then freezes until the end of the transition, then the remain 3/4 vanish.

This didn't use to happen for sure as I am working on the UI aspects while others are dealing with the controllers etc. It makes it quite jerky / strange. It isn't a show stopped so we have just left it on this bug report for the time being.

The second plunkr above does demo the issue but could do with some delays put in so it doesn't keep repeating so quickly, or could be triggered manually. I am unaware of how to edit it for that purpose.

I tried to get a screen shot. What you see is a full width of an iPhone screen (I have had to crop top and bottom to avoid leaking info about the app ;) ).

You can see that one copy of the old view has slid over while another copy is stuck 1/4 of the way across. This happens on every view where we transition from a list to a sub view.

I could perhaps share the app privately via ionic view.

screen shot 2015-08-19 at 17 34 59

As an addition to this, when we transition into the view we also notice that the nav bar icons show as 'grey blobs' during the transition and only become the final ion-icon once the transition is complete like this:

img_0042

becomes this after transition complete

img_0043

nowcodingaway avatar Aug 19 '15 16:08 nowcodingaway

So I tested the animations and compared them to a native app.

Ionic's https://youtu.be/Vl-j_8-1qBY

Native https://youtu.be/UKltEjyJdWk

Both animations are practically identical. So I'm thinking the flickering or issues with the animations are from code you have added Can you start slowly removing some css/js and see where the bottleneck is?

mhartington avatar Aug 19 '15 19:08 mhartington

For my app I use old version of ionic, because sometimes after manually triggering route transition i get flickering (for my particularly case app while disconnected from remote hardware will transition to connect page and if connection very fast return back on previouse page without delay and in this moment i get flickering), for debuging this case, with canary i toggle animation delay to 0.1x in devtools and notice that many in/out layout generated by ionic. I think it's problem with rendering queue, in corner version if ionic used css animations instead of angular animation, with angular animation perfomance is ok, with css animations there are some troubles with rendering queue, if transitions really fast between pages it will be seen

svsool avatar Aug 20 '15 08:08 svsool

@svsool would you be able to email me? It would be good to know the specifics of this to help resolve the issue.

mike at ionic dot io

mhartington avatar Aug 20 '15 14:08 mhartington

@svsool & @mhartington, hi guys.

I got the same transition issue that @svsool is talking about. Started happening recently, maybe as of last week.

Went back to ionic 1.0.0, as suggested and I am still getting that jump. It only happens going from a Parent List > to Child List. Parent List's State Cache is disabled, but not on the Child.

I am testing on iPhone 4 iOS 7.1, iPhone 5 iOS 8.4, same thing. BUT, on Galaxy S4 Android 5.1. the transition jump does not show up.

angular 1.3.13 ionic lib 1.0.0 & 1.0.1 cordova 5.1.1 ionic CLI 1.6.4

Hope this helps finding the issue. \ carlos

carloslema avatar Aug 20 '15 16:08 carloslema

@carloslema your case, it's probably due to the cache being disabled.

mhartington avatar Aug 20 '15 16:08 mhartington

@mhartington just tried. nope. What is puzzling, why on Android works fine but iOS has that overshooting hiccup. By the way, @mhartington have you been able to recreate this on your end?

carloslema avatar Aug 20 '15 17:08 carloslema

No I have not, I posted a video above and the animations are smooth for me, and that was on an old iphone 5

mhartington avatar Aug 20 '15 17:08 mhartington

@mhartington here we go, http://youtu.be/ChbBXPiZM-M -- didn't find a ios video screen recorder

I just updated to ionic lib 1.1.0 -- still same.

carloslema avatar Aug 20 '15 18:08 carloslema

@mhartington following up with you guys, I updated the video, this time is iPhone 5, http://youtu.be/ErBLb0l5H3g

The sequence: After I click on the list item.. -- "From window" moves to the left, it looks like it is masked. A black bar jumps in 37px from left to right (seams to be a background). -- The "To window" continues to slide in from the right, in between the Tabs & the "from window" -- the black bar is moving to the left. -- When the "To window" passes the half way point, the "To window" jumps back to the right. -- Tabs move back to place, the "From window" & back bar slide out, as the "To window" slides in. -- Transition animation is completed. This happens in about 17 frames.

ng-cloak is also not working, but that is another issue.

ionic-transition

This happens on both, iOS Simulators and iPhone 4 & 5, iPad 2. Also, as I said before, this does not show up on an actual Android Phone or the Android Simulator.

Your system information: Cordova CLI: 5.1.1 Gulp version: CLI version 3.8.11 Gulp local: Local version 3.9.0 Ionic Version: 1.1.0 Ionic CLI Version: 1.6.4 Ionic App Lib Version: 0.3.8 ios-deploy version: 1.7.0 ios-sim version: 3.1.1 OS: Mac OS X Yosemite Node Version: v0.12.7 Xcode version: Xcode 6.4 Build version 6E35b

carloslema avatar Aug 22 '15 19:08 carloslema

So there are a few obvious things that stand out there.

  1. ion-view shouldn't be animating over the ion-tabs. What does your structure look like for this?
  2. the animations aren't correct. Are you using any custom animations or have some css that could be interfering in anyway?

The video raises more questions if anything and it's not clear what the issue is just from watching. You'd need to go through the code, figure out if everything is setup correctly, checkout any conflicting css, etc.

Let me know if you find anything.

mhartington avatar Aug 24 '15 21:08 mhartington

Thanks @mhartington for the follow up.

So, I found the issue. Nothing to do with the set up of the Tabs (which resolves an ID before loading the view) or CSS animation (which I had none on this view).

I had a "Hidden" Div (alternative UI to add a new List Item, temporary solution, back to a modal, yikes!):

-- Markdown: Single Quotes, affects the rendering of code in comments.

ion-view view-title="{{ 'sportTitle' | translate}}" class="app_genBkg"

<ion-nav-buttons side="right">
    <button class="button button-clear" ng-click="toggle()">
        <i class="icon ion-android-add"></i>
    </button>
</ion-nav-buttons>

<ion-content>
    <ion-list>

        <!-- item-remove-animate crashes on iOS7-9 & Android 4.2-5.1-->
        <ion-item class="item-icon-left" ng-repeat="task in sportCheckList" type="item-text-wrap" >
            <i class="icon checkbox">
                <input type="checkbox" ng-click="completedTask($index)" ng-model="task.checked">
            </i>
            <h2>{{task.title}}</h2>
            <ion-option-button class="button-assertive" ng-click="removeItem(task)">
                <i class="icon ion-ios-trash"></i>
            </ion-option-button>
        </ion-item>

       ** <!-- Adding a div after an ng-repeat causes a jump between views iOS7/iOS8/iOS9 but not on Android -->
        <!-- removing ng-class/ng-cloak which doesn't work anyways, has no effect, still jumps-->
        <div class="item item-icon-right" ng-class="{'hidden' : visible}" ng-cloak>
            <input type="text" placeholder="Insert new item" ng-model="item.title" autofocus>
            <div class="icon ion-ios-checkmark-outline balanced" ng-click="saveToChecklist(item)"></div>
        </div>**

    </ion-list>
</ion-content>

'

Thanks for a kick @ss product ladies & gents!

carloslema avatar Aug 25 '15 10:08 carloslema

:+1: Happy to hear that you got it resolved.

Now for anyone else on this thread. Have you been able to resolve your issues? Itching to close this one.... :grin:

mhartington avatar Aug 25 '15 14:08 mhartington

Not been able to resolve yet. Am trying stripping out different DIVs etc based on the above comments but nothing results in a fix as yet. Will aim to update again within 24 hours.

nowcodingaway avatar Aug 25 '15 14:08 nowcodingaway

Right - so, appears the other day that ionic lib update wasn't actually updating things. I've removed everything, set up everything fresh from scratch and re-added the iOS platform. Now, running on the device with NO changes to the templates or code, the flicker is gone. So whatever issue was introduced appears to have been fixed in the latest version as far as I can see.

However, I am still seeing the same issue with the menubar icons being a grey blob / button until the view is fully in view before it then turns into the expected ionic-icon. Perhaps a separate issue with regard to menubar rendering?

nowcodingaway avatar Aug 25 '15 15:08 nowcodingaway