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

Impossible to pull down to refresh if the content is not larger than the screen #2009

Closed
teolemon opened this issue May 26, 2022 · 3 comments · Fixed by #2618
Closed

Impossible to pull down to refresh if the content is not larger than the screen #2009

teolemon opened this issue May 26, 2022 · 3 comments · Fixed by #2618
Labels

Comments

@teolemon
Copy link
Member

teolemon commented May 26, 2022

What

  • Impossible to pull down to refresh if the content is not larger than the screen (in that case, we had a failure on knowledge panels, when we still did 2 queries)
  • This might not happen at all now, or very seldomly. It could happen on project variants where we haven't deployed knowledge panels yet (like OBF, OPFF, OPF)
@g123k
Copy link
Collaborator

g123k commented May 30, 2022

Do you have some other barcodes to test with this issue?
I think it can be easily solved

@teolemon
Copy link
Member Author

use world.openbeautyfacts.org where knowledge panels are not deployed yet, and scan any cosmetic

@monsieurtanuki
Copy link
Contributor

Hey @cli1005, I think I read in a code of yours (that I recently reviewed) that you have a magic parameter used in KP, like "alwaysScroll" or something like that, am I right?

@teolemon teolemon moved this from To discuss and validate to Todo (ready 2 dev) in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Jul 10, 2022
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Jul 18, 2022
…fresh

For the record, tested on `3489940014075` on server `world.openbeautyfacts.org`.

I've also written the explanation behind the trick - perhaps that would make sense to create a wiki about nice tricks:
```dart
// /!\ Smart Dart
// `physics: const AlwaysScrollableScrollPhysics()`
// means that we will always scroll, even if it's pointless.
// Why do we need to? For the RefreshIndicator, that wouldn't be
// triggered on a ListView smaller than the screen
// (as there will be no scroll).
```

Impacted file:
 `new_product_page.dart`: forced the page content to scroll even when not necessary
teolemon pushed a commit that referenced this issue Jul 18, 2022
For the record, tested on `3489940014075` on server `world.openbeautyfacts.org`.

I've also written the explanation behind the trick - perhaps that would make sense to create a wiki about nice tricks:
```dart
// /!\ Smart Dart
// `physics: const AlwaysScrollableScrollPhysics()`
// means that we will always scroll, even if it's pointless.
// Why do we need to? For the RefreshIndicator, that wouldn't be
// triggered on a ListView smaller than the screen
// (as there will be no scroll).
```

Impacted file:
 `new_product_page.dart`: forced the page content to scroll even when not necessary
Repository owner moved this from Todo (ready 2 dev) to Done in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants