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

bug: Refresher is not visible in CDK virtual scroll list with multiple instances

Open WillooWisp opened this issue 1 year ago • 11 comments

Prerequisites

Ionic Framework Version

  • [ ] v4.x
  • [ ] v5.x
  • [X] v6.x
  • [ ] Nightly

Current Behavior

Refresher only works, gets visible, on active page upon reload.

Expected Behavior

Expects refresher to be visible on every page upon refresh, even if not active page upon refresh.

Steps to Reproduce

Use the tabs sample. Add a cdk virtual scroll list with refresher to each single tab page. Refresher only works on one of the pages, the one being active upon refresh in browser.

Code Reproduction URL

https://stackblitz.com/edit/ionic6-angular13-bat2vm

Ionic Info

Ionic:

Ionic CLI : 6.19.0 (npm\node_modules@ionic\cli) Ionic Framework : @ionic/angular 6.1.9 @angular-devkit/build-angular : 14.0.1 @angular-devkit/schematics : 13.3.5 @angular/cli : 14.0.1 @ionic/angular-toolkit : 6.1.0

Capacitor:

Capacitor CLI : 3.5.1 @capacitor/android : 3.5.1 @capacitor/core : 3.5.1 @capacitor/ios : 3.5.1

Utility:

cordova-res : 0.15.2 native-run : 1.5.0

System:

NodeJS : v14.17.5 (C:\Program Files\nodejs\node.exe) npm : 7.22.0 OS : Windows 10

Additional Information

This issue https://github.com/ionic-team/ionic-framework/issues/25318 solved the problem where the refresher got visible too often, not sure if this bug fix actually causes this new problem.

WillooWisp avatar Jun 16 '22 20:06 WillooWisp

I also noticed this. For me the refresher has this issue in iOS mode where the refresher isnt visible on the second (or any other aside from the first loaded) page I try to use the refresher. It does fire the refresh event but the animation is not visible. On md mode the refresher appears to be working for me on all my pages.

TimGels avatar Jun 17 '22 06:06 TimGels

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

ionitron-bot[bot] avatar Jun 17 '22 14:06 ionitron-bot[bot]

Here is a sample reproducing the problem, https://stackblitz.com/edit/ionic6-angular13-bat2vm. Make sure to toggle device toolbar, device view, and select an Android device for example. Refresh now only shows up for the view that was visible, active route, upon refresh.

WillooWisp avatar Jun 18 '22 15:06 WillooWisp

@WillooWisp thanks for the reproduction. The refresher appears to be attaching to the scroll events from the ionRefresh event firing, but the element is not visible.

I'm not exactly sure why multiple instances would effect the refresher's visibility, but we can capture as a bug and investigate in an upcoming sprint.

sean-perkins avatar Jun 23 '22 16:06 sean-perkins

Any progress solving this?

WillooWisp avatar Jul 13 '22 10:07 WillooWisp

We are in active 6.2 feature development, this bug has not been prioritized in our backlog yet.

Would gladly welcome further debugging from the community or a PR if someone identifies the problematic code and has a proposed resolution.

sean-perkins avatar Jul 13 '22 14:07 sean-perkins

Hello @WillooWisp!

Can you test with this dev-build and let me know if you run into any issues?

6.2.2-dev.11660183625.1a3e60c7

sean-perkins avatar Aug 11 '22 02:08 sean-perkins

@sean-perkins looks very promising so far!

WillooWisp avatar Aug 16 '22 12:08 WillooWisp

@sean-perkins it works in browser on desktop, but not on actual Android device, all refresher are rendered completely black and not visible.

WillooWisp avatar Aug 19 '22 15:08 WillooWisp

@WillooWisp can you share more about your environment?

I tested with this dev-build: 6.2.4-dev.11660836281.1a11712b due to this issue: https://github.com/ionic-team/ionic-framework/issues/25782

On emulator with a Pixel 5 (API 32), pull to refresh works as expected with no black/invisible state.

sean-perkins avatar Aug 22 '22 16:08 sean-perkins

@sean-perkins tested again now, with 6.2.3 and it works in dark mode I saw now, but the incorrect look is shown in light mode.

WillooWisp avatar Aug 23 '22 08:08 WillooWisp